To fix the array of hash with different key in each postion of the array #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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