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

Array properties with array items listed in enums does not validate properly #547

Closed
malinink opened this issue Nov 21, 2018 · 5 comments
Closed

Comments

@malinink
Copy link

malinink commented Nov 21, 2018

For example if we have array property:

{"data": ["a", "b"]}

And validation like:

{
    "type": "object",
    "properties": {
        "data": {
            "type": "array",
            "items": {
                "type": "string",
                "enum": ["b", "c"]
            }
        }
    }
}

Validation wrongly finished with success.
I will provide PR with test for that particular case.

@malinink malinink changed the title Of properties with array items listed in enums does not validate properly Array properties with array items listed in enums does not validate properly Nov 21, 2018
@erayd
Copy link
Contributor

erayd commented Nov 21, 2018

Thanks - good catch! That should definitely not be passing validation.

@erayd
Copy link
Contributor

erayd commented Jan 10, 2019

Fixed in master with #498, backported for 5.2.8 in #558.

@rbchasesc
Copy link

@erayd Finally got to writing some test cases for these. Can be found in #559

@malinink
Copy link
Author

@erayd tests are OK, there is no need of that Issue and PR.

@erayd
Copy link
Contributor

erayd commented Jan 15, 2019

@bighappyface Could you please close #547 (fixed in #498) and #549 (superseded by #559), and merge #559.

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

No branches or pull requests

4 participants