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

Not validating required property of merged array or object #107

Closed
vkarthikesan opened this issue Sep 15, 2017 · 2 comments
Closed

Not validating required property of merged array or object #107

vkarthikesan opened this issue Sep 15, 2017 · 2 comments

Comments

@vkarthikesan
Copy link

SchemaWithMerge.txt contains the schema with merge, but it is not failing the schema validation if "name" is not passed for "entitities" but the same is working fine if merge is not used as per attached SchemaWithoutMerge.txt

Test Schema with Merging:

SchemaWithMerge.txt

Test Schema without Merging:
SchemaWithoutMerge.txt

Test Json (This should fail as "name" is not available for the item of "entities"

{ "name":"test", "dataStoreType": "DOCUMENT", "entities": [ { "softDelete": true, "attributes": [ { "name": "parentMessageId", "type": "STRING" } ] } ] }

@erosb
Copy link
Contributor

erosb commented Sep 15, 2017

Hello, "$merge" is not a standard keyword of json schema, and it isn't supported by this library.

"$merge" and "$patch" is currently a proposal which was early adopted by a few implementations.

@vkarthikesan
Copy link
Author

Thanks for the reply

@erosb erosb closed this as completed Sep 15, 2017
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