RicoSuter / NJsonSchema

JSON Schema reader, generator and validator for .NET
http://NJsonSchema.org
MIT License
1.4k stars 535 forks source link

Support flag enums in TypeScript code generator #719

Open RicoSuter opened 6 years ago

RicoSuter commented 6 years ago

Flag enums must be manually deserialized/serialized in TypeScript DTOs (interfaces cannot support it correctly).

Tasks:

See pr for x-enumFlag generation: https://github.com/RSuter/NJsonSchema/pull/713

YZahringer commented 5 years ago

Any news about this?

RicoSuter commented 5 years ago

I recommend to use an array of enums - x-enumFlag is NJS specific and not supported by other tooling...

RicoSuter commented 5 years ago

I dont have plans to implement this soon (mainly because I personally not need it and I don't recommend it).

YZahringer commented 5 years ago

Ok thanks, to follow: https://github.com/json-schema-org/json-schema-spec/issues/518