Skip to content

schema-strict: Add Compile to JSON Schema #197

@jarofgreen

Description

@jarofgreen

We are looking to basically replicate the functionality of https://compiletojsonschema.readthedocs.io/en/latest/ in this tool.

So that's a command line feature to take a JSON Schema file and process it including:

  • Bringing in any $ref's that are there so the output is one JSON Schema file.
  • Have the option to preserve title and description when processing refs
  • Have the option for codelists - loading enum options from a csv in a given directory
  • Have the option to set additional properties false everywhere

Some of the current ocdskit commands modify files in place - the current compiletojsonschema tool writes to standard output and lets the user redirect. One of the common use cases for the compiletojsonschema tool is taking the schema files from a data standard and making one stricter file for CoVE apps, so in this case altering in place would not be a smooth workflow.

We'd want to make sure the $ref processing code is modular, as a later issue will want to go over a schema to build a report ( https://github.com/OpenDataServices/json-schema-auditor ) and this will want to use the $ref processing code.

Noting that we are currently having issues getting urn: refs to work, but we can tackle that later? gazpachoking/jsonref#73

This issue is to discuss approaches, before we start coding.

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