-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
There is no way to disable strict mode when using cli #220
Comments
You can pass |
I wonder if this warrants bringing up an issue in VSCode as well to get them to just use |
It is documented at https://code.visualstudio.com/api/references/contribution-points#Configuration-property-schema and few other places. They did not make it secret. Regarding how wild is its use, probably https://sourcegraph.com/search?q=context:global+markdownDescription+lang:json&patternType=standard can give you some hints. For example all Ansible related schemas make use of it because YAML extension does also recognize and use it, having markdown tooltips being essential as rich explanations are often needed. Based on some discussions I had over time with the main brain behind JSON Schema Specification (@Relequestual) , I learnt that:
I did raise a proposal on json-schema-org/json-schema-vocabularies#42 few months back but I did not get enough time to advertise it so it kinda got lost. Maybe we can persuade few more to support it and document it, even if it might now be part of official spec for some time. Still, if the desire is, there is nothing preventing others from start using it, as being future proof. |
😆 So far everyone who has responded in this thread are part of the main brain behind JSON Schema. We're all part of the core team. I do remember seeing your proposal. I think that it might be better as a larger vocab that incorporates other keywords. However, even so, that specific keyword would be an annotation only, and 2020-12 already directs implementations to collect unknown keywords as annotations, so it's not really adding anything functionally that implementations don't already do. I still think the primary action here is for VSCode to use |
Apparently there is no way to disable strict mode when using ajv and that would not be such a big deal unless it would have allowed me to make use of
markdownDescription
property, something that is very popular among schema authors as it allows us to include markdown in descriptions and have nice popup in IDEs, like vscode.$ ajv compile -s f/ansible-meta.json error: strict mode: unknown keyword: "markdownDescription"
While I was able to fix the other problems, that one is impossible to address. This also make it impossible to use ajv-cli as part of CI/CD pipelines for validating the schema, as it would always be "invalid" due to this.
The text was updated successfully, but these errors were encountered: