Since the schemas can easily be quite convoluted (with a lot of oneOf in particular), it's hard for Nickel to output good error messages when things go wrong, and easy for the LSP to get lost.
To mitigate that, it would be nice to be able to add some contract annotations to intermediate nodes in a config. However, json-schema-to-nickel only exposes the toplevel schema, and there's no way to access the sub-schemas.
As a concrete example: I'd like to annotate this snippet to tell Nickel that it's of type normalJob, but this isn't exposed by the generated code.
What I would like
Expose all the items from the definitions or $defs field of the schema, so that they can be accessed from client-code.
Since the schemas can easily be quite convoluted (with a lot of
oneOfin particular), it's hard for Nickel to output good error messages when things go wrong, and easy for the LSP to get lost.To mitigate that, it would be nice to be able to add some contract annotations to intermediate nodes in a config. However,
json-schema-to-nickelonly exposes the toplevel schema, and there's no way to access the sub-schemas.As a concrete example: I'd like to annotate this snippet to tell Nickel that it's of type normalJob, but this isn't exposed by the generated code.
What I would like
Expose all the items from the definitions or $defs field of the schema, so that they can be accessed from client-code.