Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

fix: specialised object primitive #16

Merged
merged 13 commits into from
Mar 21, 2019
Merged

fix: specialised object primitive #16

merged 13 commits into from
Mar 21, 2019

Conversation

AndyOGo
Copy link

@AndyOGo AndyOGo commented Mar 20, 2019

fixes #15

Changes:

  • removes array type for single arg checks
  • replaces anyOf with oneOf
  • only allow object type, if object is empty, has more than 2 keys, or single key does not match existing operator name
  • adds ?: alias for if

@AndyOGo AndyOGo added the bug Something isn't working label Mar 20, 2019
@AndyOGo AndyOGo self-assigned this Mar 20, 2019
{ "type": ["boolean", "null", "number", "string", "array"] },
{
"type": "object",
"minProperties": 2
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjenny
@lina-salih
We should also allow object with single keys if their name isn't an operator.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

"$id": "http://jsonlogic.com/schemas/common/any-wo-array.json",

"title": "All",
"description": "Any valid JSON Logic data source.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clarify that this comes without array?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like Any valid JSON logic data source other than array.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjenny done

@AndyOGo AndyOGo requested a review from storm1ng March 21, 2019 08:52
@AndyOGo AndyOGo merged commit 241b4d7 into master Mar 21, 2019
@AndyOGo AndyOGo deleted the bugfix/any-object branch March 21, 2019 09:01
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

any is too generic
2 participants