Skip to content

Conversation

@Karan-Palan
Copy link
Contributor

@Karan-Palan Karan-Palan commented Aug 30, 2025

Description

This PR addresses the following linting issues in the nodemon.json schema:

  • Removed unknown keywords without x- prefix: Adjusted the schema to ensure compatibility with future versions of JSON Schema, which will refuse to evaluate unknown keywords without the x- prefix.
  • Resolved $ref sibling keyword issues: Removed or adjusted sibling keywords to $ref that are not evaluated in Draft 7 and older dialects.

These changes were made to ensure compliance with JSON Schema standards and to resolve the reported linting errors. The schema was updated using the jsonschema lint --fix command

Screenshots

Before and after:

Screenshot from 2025-08-31 00-05-45

Note

I, along with Juan (JSON Schema TSC member) are defining linting rules for JSON Schema as a Part of a GSoC (Google Summer of code) project here - https://github.com/Karan-Palan/JSON-Schema-Linting, 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
If beneficial to the project, I suggest integrating the linter with it to write the best schemas and catch any errors and follow best practices. Example of an integration - https://github.com/krakend/krakend-schema/blob/main/.github/workflows/validate-json-schema.yml#L10

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@Karan-Palan
Copy link
Contributor Author

The validation fails because AJV ran in strict mode and isn't fully compliant with JSON Schemas, ref - https://youtu.be/wJ7bK22n3IU?si=IOaTDkIGaP5EZ4HY&t=542

@hyperupcall
Copy link
Member

Thanks! Supporting more validators has been on my todo for a while: #3570. Unfortunately I won't be able to merge these until that is done. Is adding an alternative implementation something you would be interested in? If so, I can construct a list of more specific requirements or behaviors and maybe we can go from there

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale PR is stale and will be closed in 7 days(auto-generated by stale action)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants