Re: [RFC] JSON Schema validation support
| From: | Jakub Zelenka | Date: | Fri, 04 Jul 2025 23:30:02 +0000 |
| Subject: | Re: [RFC] JSON Schema validation support | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127897@lists.php.net to get a copy of this message | ||
Hi
On Sat, Jul 5, 2025 at 1:10 AM Ben Ramsey <ramsey@php.net> wrote:
> There are 9 versions of JSON Schema and 11 Internet-Drafts, all of which
> have expired. Many of these versions are still widely used in the wild
> (draft-04, draft-05, and draft-06 come to mind as heavily used, despite
> several newer versions).
>
> Which version do you plan to target with this RFC, or will it be able to
> parse all versions, depending on what the input has specified in the
>
$schema properties?
>
This is noted in the implementation section:
> The current status is almost complete draft 4 and 6 support. Draft 7
support is coming soon.
By almost I mean that it needs to implement dependencies (which I plan to
sort out before this goes to vote) and it didn't go through complete
regression pack which should happen before the first RC. Draft 7 is pretty
much just "if" so it should be supported as well as it's pretty similar
to dependencies. I will see about other drafts if they could make it to 8.5
but the plan to support eventually all. I will make it a bit clearer in the
RFC. Technically this is more library implementation thing but as it's
bundled it should be properly noted in the RFC as well.
>
> I think your RFC needs to address all these versions and how you plan to
> address compatibility issues between them all.
>
>
All drafts except 4 require $schema to be there so it's the way how to
currently select the version. The future scope actually lists the default
draft for schemas without $schema so it could be selected by users. We
could maybe look into some auto-identification in the future but again it
would be the future scope. I will add some note about it to the RFC.
Since all the I-Ds have expired without a formal IETF RFC being voted on
> and passing, you should probably call attention to the fact that JSON
> Schema, while not moving much right now, is still a moving target and any
> new versions will require updates to the core to support them.
>
Yeah good point I should mention that new version will be treated as
features.
Cheers
Jakub