Skip to content

3.2: removes the OAS reference object from headers schema definition #4663

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

Open
wants to merge 2 commits into
base: v3.2-dev
Choose a base branch
from

Conversation

baywet
Copy link
Contributor

@baywet baywet commented Jun 5, 2025

I noticed the reference option was missing for the schema/item schema of parameter and media type, this PR addresses the oversight and will probably need to be back-ported to 3.1

EDIT: thanks to @karenetheridge input, I opted for the better alternative, to remove the OAS reference object from headers schema since that can rely on JSON schema ref instead.

…nd media type schema/item schema

Signed-off-by: Vincent Biret <[email protected]>
@baywet baywet requested review from a team as code owners June 5, 2025 20:13
@baywet
Copy link
Contributor Author

baywet commented Jun 5, 2025

The alternative I've considered would be to remove reference object from the headers schema fixed fields, so it relies on the JSON schema reference mechanisms. This would be a better alternative IMHO but I wanted to get feedback first. Happy to update the PR.

@karenetheridge
Copy link
Member

karenetheridge commented Jun 5, 2025

I don't think this is correct. The definition for "schema" already includes $ref, and it's the JSON Schema $ref that we want here, not the OpenAPI variant. That's why we don't have a definition called "schema-or-reference" in the OAD schema.

(edited to add, after your second comment:)

Consistency is good, so I agree with your other option that we remove the -or-reference bits from the other definitions that have them.

@baywet baywet changed the title 3.2: adds missing schema reference as an option of parameter schema and media type schema/item schema 3.2: removes the OAS reference object from headers schema definition Jun 5, 2025
@ralfhandl ralfhandl requested a review from a team June 6, 2025 10:08
@baywet
Copy link
Contributor Author

baywet commented Jun 6, 2025

@ralfhandl I think I have enough approvals for merge, but I don't have the merge permission.
Would you be so kind to merge it please?

Also do you want me to put together a PR to target 3.1 ?

@lornajane
Copy link
Contributor

Sorry, this one has a conflict now, could you take another look @baywet ?

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.

5 participants