-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
Allow ":" in user defined keyword names to support names like 'meta:license' and 'meta:enum' #1421
Labels
Comments
Thank you - no objections :) |
Where should I put the tests? |
Can be just an extension of this test, no need for a separate test probably: https://github.com/ajv-validator/ajv/blob/master/spec/keyword.spec.ts#L1089 |
This was referenced Mar 6, 2021
This was referenced Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Ajv you are you using?
7.0.4
What problem do you want to solve?
jsonschema2md allows the use of additional keywords such as
meta:enum
to supply descriptive information to enrich the generated documentation. Adobe use thismeta:*
pattern in their own schemas, for example XDM.Turning off strict mode allows these properties, but it would be nicer to be able to add these as user defined keywords while retaining strict validation for everything else. The regex currently used to validate new keyword names doesn't allow
:
characters.What do you think is the correct solution to problem?
Change the
KEYWORD_NAME
regex used to validate keyword names to allow:
, but not as the first character. Something like/^[a-z_$][a-z0-9_$-:]*$/i
Will you be able to implement it?
Yes.
The text was updated successfully, but these errors were encountered: