-
Notifications
You must be signed in to change notification settings - Fork 325
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
pattern validation for propertyNames #326
Comments
@kimtkyeom I am not aware that patterns are supported for the propertyNames. It might be added in the recent version but I couldn't find any test cases in the official test suite. Could you please point me out the specification? It should be easy to implement in my opinion as we have done that for the patternProperties. Also, I am wondering if you could open an issue to let the specification team fix the test suite. Thanks a lot for raising it up. |
https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.3.2.5 also can see this discussion: |
@ShaulEngler Thanks a lot for the links. It makes perfect sense in my opinion. I've marked help wanted and hope some team members can pick it up and get it implemented. |
@stevehu Please review related PR. |
Resolved in #397 |
We are using json-schema-validator for validate given json string is valid.
Recently, we need to validate json fields in object has valid format (using regex)
From draft-v6, json schema specification supports propertyNames.
However json-schema-validator currently not supports patterns, is there any plan to support propertyNames features (Seeing source code, currently only supports minLength and maxLength
Below shows validation with
patternProperties
using scala repl. I expected validation returns invalid messages but not (refer to web validator)The text was updated successfully, but these errors were encountered: