Skip to content

fix(schema): remove redundant 'type' alongside 'enum' in JSON schema #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Karan-Palan
Copy link

@Karan-Palan Karan-Palan commented Jul 6, 2025

Description

This PR addresses warnings from the JSON schema linter regarding the use of type alongside enum in the openvex_json_schema.json file. According to best practices, specifying type with enum is redundant since the enumeration values already imply their types. The redundant type fields have been removed from the relevant properties (such as justification and status), ensuring cleaner and more standards-compliant schema definitions.

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. 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.

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.

1 participant