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

Incorrect exception message in 2.5.0 #220

Closed
rbao opened this issue Jan 22, 2015 · 1 comment
Closed

Incorrect exception message in 2.5.0 #220

rbao opened this issue Jan 22, 2015 · 1 comment

Comments

@rbao
Copy link

rbao commented Jan 22, 2015

Consider the following code

schema = { type: 'object', properties: { a: { type: 'string' } } }
data = { a: 'abc', b: 'abc' }
JSON::Validator.validate!(schema,data,strict: true)

which gives the following error in 2.5.0

JSON::Schema::ValidationError: The property '#/' contained undefined properties: 'a, b in schema 1708c6d0-5b4d-5467-9252-9a46f84b29e4#

So the error says both 'a', 'b' are undefined properties but in fact 'a' is a defined property.

The same code in 2.4.1 produce the correct exception message:

JSON::Schema::ValidationError: The property '#/' contained undefined properties: 'b' in schema 1708c6d0-5b4d-5467-9252-9a46f84b29e4#
@iainbeeston
Copy link
Contributor

This should be closed now by #230

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

2 participants