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

Fix list:true when referencing a cached schema #107

Merged
merged 1 commit into from Jul 19, 2014

Conversation

pd
Copy link
Contributor

@pd pd commented Jul 19, 2014

When using the list: true option, if the schema has already been cached in Validator.schemas, json-schema would not wrap the schema in { "type": "array", "items": ... } as expected.

Test included to demonstrate the failure; the fix was to use fake_uri as is done elsewhere to generate an identifier for the wrapper schema. I didn't add a test to the test_jsonschema_draft3 file, as this appears to be an identical code path, so the duplication shouldn't be necessary AFAICT.

@hoxworth hoxworth merged commit 6bef296 into voxpupuli:master Jul 19, 2014
@hoxworth
Copy link
Contributor

Thanks @pd . Moved the test to a separate 'test_list_option.rb' test file, as it isn't really a draft-04 test, but this is great. Released as 2.2.4.

@pd pd deleted the fix-list-validation branch July 19, 2014 21:17
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

Successfully merging this pull request may close these issues.

None yet

2 participants