json-schema
json-schema copied to clipboard
Add if then else schema validation
Replay of #581
Any plans merging this PR?
Any plans merging this PR?
Short answer: Not yet.
Long answer: We've been putting effort in reviving this repository, which meant a lot of cleanup, triage en updating to current PHP versions. At this point we are working on those items. Adding additional drafts is definitely our goal but not our priority at this point in time.
+1 I would love this functionality ❤️
@Norda-AD thank you for all the feedback on the PR. In all honestly I’m not sure if the PR in this form will ever get merged. I really like your efforts but also don’t want to disappoint about the PR never making it into main( currently still called master)
The difficulty lies in only adding if then else logic in the current flow. With draft3 and 4 being very alike adding support for the if then else would break those drafts as it would add more keywords then documented.
Thinking ahead I would like to add support for more drafts (including the one that has the if then else support) like this PR which is currently pending for Draft 6
@DannyvdSluijs Thank you for your feedback. I started digging into this PR since I need this to validate my own code. I understand that you have other priorities. In the meantime, I am trying to decorate the class to fit my needs.
I am currently working on adapting this PR to the new code. Basically fixing my comments. Are you interested if I continue or should I just not bother?
@Norda-AD I've just merged and released the draft-6 support. So this makes draft-7 next. I'll close this PR for now as I'll be opening a draft 7 PR in the upcoming days.
Your feedback has been very helpful in this PR. I'll use it when doing the fresh draft-7 PR. Thanks for your help.
@DannyvdSluijs Can't wait to see it. Thank you for the feedback!
@DannyvdSluijs Can't wait to see it. Thank you for the feedback!
You can find it under https://github.com/jsonrainbow/json-schema/pull/847