Skip to content

Fix: #110. Interoperability considerations instead of new parameter #121

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 4 commits into
base: main
Choose a base branch
from

Conversation

ioggstream
Copy link
Collaborator

This PR

@@ -309,6 +334,9 @@ Q: Why this document?
This has some security implications too
(eg. wrt on identifying parsers or treat downloads)

Q: Do we support OpenAPI 2.0 / Swagger?
: No, this document is about OpenAPI 3.0 and above.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as in the other PR. Why would we limit this?

Copy link
Collaborator Author

@ioggstream ioggstream Mar 17, 2025

Choose a reason for hiding this comment

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

Let bygones be bygones :)

I think that OAS 3.0 is the first specification with a standardization base,
and referencing 2.0 does not help interoperability.

Moreover, it's in an FAQ that will be removed at publication.

@handrews
Copy link
Collaborator

I think that OAS 3.0 is the first specification with a standardization base,

What does this mean, exactly? OAS 2.0 (which was a tiny bit different from Swagger 2.0, but mostly just small fixes to errors) was the first version released under the OpenAPI Initiative. So it's as standardized as 3.0 or 3.1.

and referencing 2.0 does not help interoperability.

Didn't we define a version media type parameter for content negotiation on this? While I hate that this is true, there are still tools out there that can't use anything after 2.0. I'd love to do anything and everything to make 2.0 go away, but I'm not sure that forbidding it here will really help that goal. And it seems to prevent people who might want to try to bridge 2.0 to 3.x from making an effort in a standardized way that is consistent with what they will do to bridge 3.0 to 3.1+, or to 4.0

Moreover, it's in an FAQ that will be removed at publication.

Does this mean that in practice, 2.0 is not excluded? I'm a bit confused.

@ioggstream
Copy link
Collaborator Author

forbidding it here will really help that goal. And it seems to prevent people who might want to try to bridge 2.0 to 3.x

This makes sense, but I think that migration should be the only reason for that.

Actually, using version: 2.0 is not "forbidden". Just "undefined" here, because:

  • I did no proof-reading of the spec wrt OAS 2.0 and there are no statements such as:

dependently on the OAS version, the keyword associated with the version is different between 2.0 (swagger) and 3+ (openapi) ...

  • I don't know whether the terms of "OAD", "OAd", ... are still valid for v2.0...
  • 2.0 tools generally use application/vnd.swagger.whatever

Anyway, I'm not that into v2.0, but if you/ @darrelmiller think that this document suits OAS 2.0, we can extend the scope.

@ioggstream ioggstream force-pushed the ioggstream-110-quat branch from 9c04640 to 76c3820 Compare March 18, 2025 09:06
Comment on lines +270 to +273
A server can publish an OpenAPI resource that
does not contain an "OpenAPI Object".
In this case, the `version` parameter is useful to identify
the specification version.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is talking about using the version parameter in the Content-Type header of a response, or a similar usage, correct? Should this be made more clear when initially discussing the parameter usage? What happens when a version paramter is used in this way with an OpenAPI Document (with an OpenAPI Object) where the openapi field disagrees with the version parameter? "Disagrees" here needs to be handled with the same concerns over compatibility and version matching that I just brought up in #124.

Copy link
Collaborator Author

@ioggstream ioggstream Mar 19, 2025

Choose a reason for hiding this comment

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

using the version parameter in the Content-Type header of a response

Yes, this is stated in the document introduction: can you please check if it's clear enough here?

What happens when a version paramter disagrees with the version [specified in the OpenAPI object]

I think prescribing a behavior may go beyond the scope of the media type registration,
since:

  • it is responsibility of the sender to ensure the correct value of the media type;
  • it is a choice of the client to decide the tolerance threshold according to its use case.

Maybe the above wording could fit the Interoperability considerations.

Agree to discuss this further in #124.

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.

3 participants