FSharp.Data.JsonSchema icon indicating copy to clipboard operation
FSharp.Data.JsonSchema copied to clipboard

Question: How does one generate the JsonSchema "required" field

Open dergraf opened this issue 4 years ago • 3 comments

Hello

F# beginner here.. I was playing with generating a Json Schema from a simple record type. To my understand all record properties are required, but this isn't reflected in the generated JsonSchema using the "required" field (https://json-schema.org/understanding-json-schema/reference/object.html#required-properties) What I have seen the underlying Njsonschema should support this using DataAnnotations, but I am not sure if this is the way to go here. Anyways, I guess I am missing something, I would appreciate if you can point me towards the right direction. Thanks!

dergraf avatar Jan 07 '21 09:01 dergraf