Skip to content

Conversation

@Karan-Palan
Copy link
Contributor

Description

This PR addresses the following linting issues in the github-workflow.json schema:

  • Removed type alongside enum
  • Replaced single-value enum with const
  • Removed unnecessary allOf wrappers
  • Resolved $ref sibling keyword issues
  • Removed redundant additionalProperties and properties declarations

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:

image

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.

@hyperupcall
Copy link
Member

hyperupcall commented Sep 9, 2025

Thanks! I'm a bit worried about the loss of information though - there are $comments and descriptions that contain useful information that should show up in IDEs. If description is not allowed as a property if $ref also exists, is there a recommended way to add a description that will show up in IDEs when the property is hovered hover? I also feel like $comments should not be removed by the linter because its use is for the schema producer, rather than the consumer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants