Skip to content

Fixes min/max properties validation for non objects #261

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

Conversation

schrobak
Copy link
Contributor

I've added a few tests that covers the problem described in #260.

Also I went the way that previous implementation was done with single if (is_object($property)).
Please have a look at https://github.com/bighappyface/json-schema/blob/1.6.1/src/JsonSchema/Constraints/UndefinedConstraint.php#L169-L186 for reference.

Fixes #260

/cc @mirfilip @bighappyface

@bighappyface
Copy link
Collaborator

+1

@mirfilip ?

@mirfilip
Copy link
Contributor

mirfilip commented May 6, 2016

I needed some time to get familiar with #215 and all the PRs that were tried there. So, this fixes both #260 and original #215. Verified.

@bighappyface go ahead with merge. We should probably release 2.0.2 even with just that single fix onboard. Anyway, there are some things about ObjectConstraint that still look sketchy to me.

@jojo1981
Copy link

jojo1981 commented May 7, 2016

+1 Go ahead.

@schrobak
Copy link
Contributor Author

schrobak commented May 9, 2016

@bighappyface any ETA on releasing this?

@bighappyface bighappyface merged commit dd73ab2 into jsonrainbow:master May 9, 2016
@schrobak schrobak deleted the bugfix/conditional-min-max-properties-validation branch May 9, 2016 20:42
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.

4 participants