Skip to content

Not validating required property of merged array or object #107

Closed
@vkarthikesan

Description

@vkarthikesan

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" } ] } ] }

Activity

erosb

erosb commented on Sep 15, 2017

@erosb
Contributor

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

vkarthikesan commented on Sep 15, 2017

@vkarthikesan
Author

Thanks for the reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @erosb@vkarthikesan

        Issue actions

          Not validating required property of merged array or object · Issue #107 · everit-org/json-schema