Skip to content

Conversation

@mchiocca
Copy link

Similar to Draft v3 divisibleBy, the Draft v4 multipleOf keyword basically does the same thing. It validates that the division of a numeric instance by the value of multipleOf is an integer. Implemented the functionality and enabled the Draft v4 unit tests.

Also implemented the Draft v4 not keyword. With not, an instance validates if it does not match the specified schema. Enabled the Draft v4 not tests and also wrote supplemental unit tests.

Implemented the Draft v4 allOf, anyOf, and oneOf keywords as well. These verify that an instance validates either all, at least one, or exactly one of the specified schemas. Enabled the Draft v4 unit tests for each of these new keywords.

@mchiocca
Copy link
Author

Implemented a new draft-04 feature, multipleOf, and fixed a minor bug whereby the incorrect operator was being used to concatenate strings together (i.e. + instead of .).

@mchiocca
Copy link
Author

Continuing to work on draft-04 features, implementing support for not. It was very simple and straightforward to add along with the appropriate unit testing.

@mchiocca
Copy link
Author

@justinrainbow Hello. Looks like a Travis issue. The PHP 5.4 build (job 90.2) ran fine. But the PHP 5.3 build (job 90.1) had some issues that we've seen before; something about Composer being out of date and GitHub credentials. I have PHP 5.3.8 installed and the unit tests run fine for me. I think the commit and overall pull request should be fine. With this request we're getting all of the remaining draft-04 features except for proper support for $ref, schema, and id.

@mchiocca
Copy link
Author

The property key value of the validation errors associative array was not always being computed properly, resulting in an incorrect path that tells where a validation error occurred. This most recent commit addresses those problems so that the property key value shows the correct path in the JSON string where an error happened.

justinrainbow added a commit that referenced this pull request Jun 20, 2013
Support for Draft v4 multipleOf, not, allOf, anyOf, and oneOf keywords.
@justinrainbow justinrainbow merged commit 6f877ff into jsonrainbow:master Jun 20, 2013
@justinrainbow
Copy link
Collaborator

Thanks for another great PR @mchiocca

hakre pushed a commit to hakre/json-schema that referenced this pull request Mar 26, 2015
Support for Draft v4 multipleOf, not, allOf, anyOf, and oneOf keywords.
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.

2 participants