Skip to content

Expose the intermediate schemas #86

Description

@thufschmitt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions