Skip to content

v3.3: replace "array schema" with clearer definition#5334

Open
karenetheridge wants to merge 1 commit into
OAI:v3.3-devfrom
karenetheridge:ether/v3.3-encoding-array-schema
Open

v3.3: replace "array schema" with clearer definition#5334
karenetheridge wants to merge 1 commit into
OAI:v3.3-devfrom
karenetheridge:ether/v3.3-encoding-array-schema

Conversation

@karenetheridge
Copy link
Copy Markdown
Member

  • no schema changes are needed for this pull request

@karenetheridge karenetheridge requested review from a team as code owners May 13, 2026 20:05
Copy link
Copy Markdown
Member

@handrews handrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@karenetheridge
Copy link
Copy Markdown
Member Author

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 items doesn't mean it has to be an array", and instead only looking for type (or const or enum which also implicitly require a type(s)).

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).

@handrews
Copy link
Copy Markdown
Member

@karenetheridge At this point requiring type: array would arguably be a breaking change. I suppose someone can argue that "array schema" means the same thing, but as I noted, I specifically did not mean type: array at the time.

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 type. If we hadn't shipped it yet we would have more options (and I'd be more inclined to go with this).

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.

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