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

propertyNames not work with enum or not enum #342

Closed
gchuyun opened this issue Nov 4, 2020 · 1 comment
Closed

propertyNames not work with enum or not enum #342

gchuyun opened this issue Nov 4, 2020 · 1 comment

Comments

@gchuyun
Copy link

gchuyun commented Nov 4, 2020

schema:
{"type": "object", "patternProperties": { "": { "enum": [1,2] } }, "propertyNames": { "enum": ["a"] } }

data:
{"a": 1, "abc": 2, "abcd": 3}

validate with SpecVersion.VersionFlag.V201909 get errors:
$.abcd: does not have a value in the enumeration [1, 2]

@stevehu
Copy link
Contributor

stevehu commented Nov 4, 2020

@guandong Good catch. The propertyNames only supports limited validation today based on the official test cases and we have another issue to add more validations against it. This should be addressed at the same time.

#326

JonasProgrammer added a commit to JonasProgrammer/json-schema-validator that referenced this issue Apr 11, 2021
- implement property names in terms of full schema validation
- add test case for complex property name
- added test case for networknt#342
- fix networknt#375 tests to expect standard messages
- closes networknt#396
- closes networknt#342
JonasProgrammer added a commit to JonasProgrammer/json-schema-validator that referenced this issue Apr 11, 2021
- implement property names in terms of full schema validation
- add test case for complex property name
- added test case for networknt#342
- fix networknt#375 tests to expect standard messages
- closes networknt#396
- closes networknt#342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants