Open jdegoes opened 3 years ago
There are multiple specs for JSON Schema out there - Draft 7 seems to be the most common but Draft 2019_09 is newer (there are other older ones as well) - maybe we should have implementations for both of these?
Agreed, would be nice to support the popular ones.
I'll be picking this up
@alexvanolst any progress on this? Our current json schema generator https://github.com/andyglow/scala-jsonschema and not many scala alternatives so I would be very interested in a new implementation :)
@bjornbak Unfortunately I ended up not having the time (or a concrete use case for it)
@jdegoes is this still relevant?
@987Nabil I think it is, because there are some popular use cases of JSON Schema without OpenAPI, such as [OpenAI].
JSON Schema is a protocol to describe the structure of JSON values.
It would be great if we could take an existing schema for a user-defined data type, and convert it into a JSON schema, in such a way that the JSON codec could read and write data in that format.
Probably, we should implement this as a method on
MetaSchema
, and then delegate to it fromSchema
, because aMetaSchema
is more than sufficient to document the structure of JSON values.