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

To fix the array of hash with different key in each postion of the array #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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