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

validate_schema does not use value of $schema #59

Closed
kejadlen opened this issue Jul 3, 2013 · 2 comments
Closed

validate_schema does not use value of $schema #59

kejadlen opened this issue Jul 3, 2013 · 2 comments

Comments

@kejadlen
Copy link

kejadlen commented Jul 3, 2013

require 'json-schema'

schema = {
  '$schema' => 'http://json-schema.org/draft-03/schema#',
  'properties' => {
    'foo' => { 'type' => 'object', 'required' => 'true' }}}

json = '{"foo":{}}'

JSON::Validator.fully_validate(schema, json) #=> []
JSON::Validator.fully_validate(schema, json, validate_schema: true) # => ValidationError
@hoxworth
Copy link
Contributor

hoxworth commented Jul 3, 2013

Fixed in 2.1.1, thanks. Just released.

@hoxworth hoxworth closed this as completed Jul 3, 2013
@kejadlen
Copy link
Author

kejadlen commented Jul 3, 2013

Awesome, that was quick!

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