Skip to content

Conversation

@dharanikumar-19
Copy link

When a hash have 2 different key in an array of hash
[{:updated_at=>"2021-03-04T14:09:39Z"}, {:created_at=>"2021-03-04T14:09:39Z"}]
The json-schema before the fix
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Generated from api/schema_validator/temp_central/ticket_schema.json with shasum 1c8f30491c9f48b5d44942b7ca0f04e60d8af2a6", "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "properties": { "updated_at": { "oneOf": [{"type": "string"}, {"type": "null"}] } } } }

After the fix
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Generated from api/schema_validator/temp_central/ticket_schema.json with shasum 1c8f30491c9f48b5d44942b7ca0f04e60d8af2a6", "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "properties": { "updated_at": { "oneOf": [{"type": "string"}, {"type": "null"}] } , "created_at": { "oneOf": [{"type": "string"}, {"type": "null"}] } } } }

It should consider both the key in different position of the hash

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

Successfully merging this pull request may close these issues.

2 participants