-
Notifications
You must be signed in to change notification settings - Fork 268
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
Support $schema reference to JSON schema #204
Comments
This feature would be incredible. |
I don't think that we can use the notation
because it means that the $schema should be part of the schema definition. It seems quite intrusive. All schemas would need to be updated. What about using a comment/modeline? such as:
or
or
nota: would be best to have it part of the specification but it doesn't seem to be part of priorities: json-schema-org/json-schema-spec#828 |
Signed-off-by: Aurélien Pupier <[email protected]>
Signed-off-by: Aurélien Pupier <[email protected]>
Lets open a sister ticket on YAML meta repository itself, maybe YAML spec authors can help us make a good/future proof decision? |
Can you precise which repository it is please? |
I think there is an existing ticket at yaml/yaml-spec#33 -- better to comment on it. Also a good channel to engage with spec people is |
I tried to put a not yet defined directive and unfortunately, they are not ignored. It is reporting a validation error. I think that we can go with a comment |
Signed-off-by: Aurélien Pupier <[email protected]>
Signed-off-by: Aurélien Pupier <[email protected]>
- association done using modeline "# yaml-language-server: $schema=<mySchemaURL"> Signed-off-by: Aurélien Pupier <[email protected]>
- association done using modeline "# yaml-language-server: $schema=<mySchemaURL"> Signed-off-by: Aurélien Pupier <[email protected]>
- association done using modeline "# yaml-language-server: $schema=<mySchemaURL"> Signed-off-by: Aurélien Pupier <[email protected]>
…veloper#204 it requires to cast the parameter in 2 places. Signed-off-by: Aurélien Pupier <[email protected]>
Signed-off-by: Aurélien Pupier <[email protected]>
…veloper#204 it requires to cast the parameter in 2 places. Signed-off-by: Aurélien Pupier <[email protected]>
Signed-off-by: Aurélien Pupier <[email protected]>
…at-developer#204 it ensures that the schema is well-applied also on documents with only the schema declaration Signed-off-by: Aurélien Pupier <[email protected]>
the "textEdit" is not provided due to an existing bug on master redhat-developer#288 Signed-off-by: Aurélien Pupier <[email protected]>
…veloper#204 Signed-off-by: Aurélien Pupier <[email protected]>
…veloper#204 Signed-off-by: Aurélien Pupier <[email protected]>
implemented using |
Currently JSON schema for a YAML file must be specified externally, either via settings or from the public schema store.
I'd like to be able to specify the schema to use in the YAML document itself. This is possible with JSON documents by specifying a $schema property, e.g.
It seems reasonable to me that the same convention could be supported for YAML documents (as this is defined as part of the JSON schema spec itself):
The text was updated successfully, but these errors were encountered: