You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to setup the schema to automatically support additions to enum - Json schema not OpenApi. https://www.gitmemory.com/issue/RicoSuter/NJsonSchema/1159/624497529
How? Example - generall support? Admitting not running latest version during simple test & some modification to generate file per file. The linked case for OpenApi is still opened & this is open-api specific then? Caught my eye & seemed nice/cool.
Can you have enum as string but still control the integer value of generated code?
The text was updated successfully, but these errors were encountered:
In general with JSON Schema/OpenAPI you can only describe the values so for integer enums you cannot describe the enum name only the enum value... That's why we introduced "x-enum-names" with which you can describe the name of each value... but this is only generated by NJS and also only picked up by NJS for code generation.
Integration/external contract - so first was if I can describe the enum since it changes other objects values or interpetation. Secondly so far only documentation say handling of enum changes, would be nice to have in json (could use int/string and document instead but decreases readability) - i.e. newtonsoft can inject and handle enum & make default/unkown for missmatch. Thirdly realized if I can internally control int value I could be lazy and cast instead of correctly convering, even thou I would obviously not take such shortcut...
Using schema for generating code/documenting structure rather then validation it is designed for.
How to add description in a json schema the best way? According to standard & be able to generate code - this code & generally/others
https://github.com/RicoSuter/NJsonSchema/wiki/Enums
https://groups.google.com/forum/#!topic/json-schema/w_5mVYB7OHg
json-schema-org/json-schema-spec#57
Is it possible to setup the schema to automatically support additions to enum - Json schema not OpenApi.
https://www.gitmemory.com/issue/RicoSuter/NJsonSchema/1159/624497529
How? Example - generall support? Admitting not running latest version during simple test & some modification to generate file per file. The linked case for OpenApi is still opened & this is open-api specific then? Caught my eye & seemed nice/cool.
Can you have enum as string but still control the integer value of generated code?
The text was updated successfully, but these errors were encountered: