Skip to content
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

add $schema and $id to all json schema #173

Merged
merged 1 commit into from
Dec 26, 2024
Merged

add $schema and $id to all json schema #173

merged 1 commit into from
Dec 26, 2024

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Dec 12, 2024

This will prevent bugs like #172 by showing JSON schema errors in your IDE

@tordans
Copy link
Collaborator

tordans commented Dec 25, 2024

Copy link
Collaborator

@tordans tordans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this improves working in VS Code.

I don't know a lot about those properties but Copilot is happy when I asked about it…

Yes, the $schema and $id properties in your field.json file are correct.

The $schema property specifies the version of the JSON Schema standard that this schema adheres to. In this case, it is using the draft-07 version of the JSON Schema standard.
The $id property provides a unique identifier for the schema, which is useful for referencing it in other schemas or documents.
Using the draft-07 version of the JSON Schema standard is a good choice as it is widely supported and provides a robust set of features for defining and validating JSON data structures.

@k-yle k-yle merged commit a345ed1 into main Dec 26, 2024
1 check passed
@k-yle k-yle deleted the kh/$schema branch December 26, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants