v3.3: replace "array schema" with clearer definition#5334
v3.3: replace "array schema" with clearer definition#5334karenetheridge wants to merge 1 commit into
Conversation
karenetheridge
commented
May 13, 2026
- no schema changes are needed for this pull request
handrews
left a comment
There was a problem hiding this comment.
This was intentional, as prior OAS versions literally required type: array to be present. But really, if the data is an array and is validated by the schema, it doesn't matter if there is a type keyword at all. That's what "array schema" is meant to convey.
|
The thing is, once we're validating the data it's too late to transform it, so I want to be sure what to look for. We've been good about sticking to the JSON Schema principle of "just because you see an array-requiring keyword like There have been a few places when parsing the partly-decoded content while walking down the encoding and schema trees that I've not been sure where a keyword dictates a behaviour, vs "disregard this if it doesn't match". I think for schemas, we should stick to the same logic as we use for style decoding (which is described in one of the appendices). |
|
@karenetheridge At this point requiring I agree that there's a bit of a chicken and egg problem, but I'm not sure we can go back and add requirements on I'm not 100% sure on all this, I'll need to go through and read all of the text closely and think on it more deeply. |
|
I would just like to fix the wording to whatever is actually intended, because "array schema" is not clear. |
Yeah, that's fair! I'm trying to figure out what I meant here. I have two options:
Option 2 is definitely something we can do in a patch release. Option 1... I think it hinges on this wording:
I'm hesitant to say that we can make these fields required in the I think I'm leaning towards option 2, but I am open to other arguments. I agree with you that this needs improvement. |
|
@ralfhandl why all the merges of the parent branch into these PRs? It doesn't do anything except add more clutter to the main branch when it's eventually merged. |
7841081 to
9f79453
Compare