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
We could have something more automatic, where all the fields of a record are automatically turned into references, and being able to pull the definitions for those types at runtime just before actually creating the json for the whole schema. But at this point it feels overkill. And the result would be quite brittle, as two types from different modules but with the same name could create some clashes inside the defs object.
Maybe without going that far it would be useful to change the definition a bit. So that we would generate a type like type jsonschema_type = { typ: [ `Assoc of _ ]; refs: (string * jsonschema_type) list }. With typ being what is generated for now. And with refs being populated for all the fields that have a @ref annotations.
Right now the deriver will create things such as
But the definitions are not added to the final json schema
The text was updated successfully, but these errors were encountered: