RicoSuter / NJsonSchema

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

Adds configuration settings to influence required annotation #1563

Open tsinghammer opened 1 year ago

tsinghammer commented 1 year ago

Sometimes it would be useful, also with an OpenApi3 schema to generate non-required fields as Required.Default. Do you think it makes sense to follow such a toggle and elaborate it more?

jkone27 commented 8 months ago

is this available for merge @RicoSuter ? this seettings seems useful instead of having to register a custom serializer to allow nullable properties (openapi schemas can often be unprecise in the real world)

mjmadhu commented 4 months ago

Hitting https://github.com/RicoSuter/NSwag/issues/3851 issue.. can anyone help with ETA for fix??