Skip to content

Support for JSON Schema Draft 2020-12Β #138

@mfkaptan-motius

Description

@mfkaptan-motius

Hey there! πŸ‘‹

First off, thanks a ton for this awesome library! The work you've done here is really appreciated by the community.

I've been using graphql-to-json-schema for a project and noticed that the library currently supports JSON Schema Draft-06 as seen in this line.

I'm wondering if there are any plans to support the more recent JSON Schema Draft 2020-12 specification? The newer spec includes some nice improvements like better conditional schema support with if/then/else, enhanced $ref handling and some other ones.

Questions:

  • Are there any existing plans for supporting Draft 2020-12?
  • Would the maintainers be open to discussing contributions in this direction?
  • Would this be a good opportunity to potentially refactor the architecture to support multiple JSON Schema versions simultaneously?

I'd be happy to contribute to this effort if there's interest! I'm thinking we could potentially:

  • Add a configuration option to specify the target JSON Schema version
  • Refactor the schema generation logic to be more modular/pluggable
  • Maintain backward compatibility with the current Draft-06 output

Would love to hear your thoughts on this. Even if it's not on the immediate roadmap, I'd be interested in exploring what a contribution might look like.

Thanks again for the great work! πŸ™

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions