Skip to content
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

/info/version incorrectly interpreted. #817

Open
dehora opened this issue Sep 3, 2024 · 0 comments
Open

/info/version incorrectly interpreted. #817

dehora opened this issue Sep 3, 2024 · 0 comments
Assignees

Comments

@dehora
Copy link
Member

dehora commented Sep 3, 2024

From #116, MUST use semantic versioning

OpenAPI allows to specify the API specification version in #/info/version.

This is not what the OAS specification says. From https://spec.openapis.org/oas/latest.html#info-object:

version | string | REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).

The version field points at the document version, not a specification version. It's unfortunately, the only field in the info object that is about the api document and not the api itself. This has always been a problem because the spec is vague but has become a bit more apparent since OAS allowed descriptions to be composed from multiple documents.

It's unclear apparently what to do with this field as the interpretation by these guidelines is probably the most common one (see this poll for example). But in any case, the field does not denote a specification (which itself is unclear) or a description (which is better understood).

For further context, the semantics of info/version were changed between 2.0 and 3.0. 2.0 was associated with the API the description talks about, 3.0 was associated with the description's document. That is, v2.0 was closer in meaning to these guidelines.

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

No branches or pull requests

2 participants