ietf-wg-httpapi / mediatypes

Other
5 stars 4 forks source link

openapi version parameter: `version` or `v` ? #34

Closed ioggstream closed 2 years ago

ioggstream commented 2 years ago

Question

ioggstream commented 2 years ago

@darrelmiller can you get some feedback from OAS svp?

dret commented 2 years ago

On 2022-04-01 17:22, Roberto Polli wrote:

  • the openapi document version should be conveyed by a parameter?
  • should the parameter be |version| or |v| ?

sticking with what OpenAPI itself uses (i.e., "version") may be a good idea:

https://spec.openapis.org/oas/latest.html#fixed-fields-0

that's unless there is established practice to use a media type parameter that's named differently, in which case that may be the better choice.

darrelmiller commented 2 years ago

The primary use case for the version parameter is in the accept header for conneg. I do not see a strong need for returning the version parameter in content-type headers as the version is already defined in the content. Therefore the bytes saved by the shorter name are less relevant and so I would recommend using the full version as the parameter name.

ioggstream commented 2 years ago

Close with no changes. Thanks D&E