Skip to content

Add Support for JSON Schema Linting Best Practices via jsonschema CLI #623

@Karan-Palan

Description

@Karan-Palan

ref modelcontextprotocol/modelcontextprotocol#1417 (review)

Hello maintainers,

I recently created a pull request in modelcontextprotocol. The PR focused on fixing linting issues using the jsonschema cli's auto-fixing command (jsonschema lint --fix).

For context, I, along with @jviotti (JSON Schema TSC member) are defining linting rules for JSON Schema as a Part of a GSoC (Google Summer of code) project here - https://summerofcode.withgoogle.com/programs/2025/projects/PjLfP7ZH, and implementing their auto-fixes here - https://github.com/sourcemeta/jsonschema/blob/main/docs/lint.markdown. We have recently added many rules prefixing unknown keywords with x- which will be introduced in the newer JSON Schema drafts.

Would it be possible to integrate these best practices into this project so that all the projects using it get the schemas with all best practices applied to them?

It would be great as other projects that use this package won't have to add the jsonschema cli as a dependency (modelcontextprotocol/modelcontextprotocol#1417 (review))

I could help with:

  1. Add an option to automatically apply these fixes during schema generation.
  2. Alternatively, provide a hook or configuration to run the jsonschema lint --fix command as part of the generation process or integrate it in the CI

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