-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description
Good suggestion from @bajtos, original discussion: #1067 (comment)
Copied here:
Ideally, /openapi.json should be returning application/json content type.
Eventually, when OpenAPI spec working group decides on the content type for OAI documents (see OAI/OpenAPI-Specification#110), we should switch to that one instead.
Their latest proposal (21 days old, see OAI/OpenAPI-Specification#110 (comment)):
application/vnd.oai.openapi (YAML variant)
application/vnd.oai.openapi+json (JSON only variant)
With an optional version parameter:
application/vnd.oai.openapi;version=3.0.0
As for /openapi.yaml endpoint, it looks like there is no official IANA-registered content type yet :( Looks like text/yaml may be the best option, even if it's not entirely spec-conforming. Alternatively, application/x-yaml and test/x-yaml are spec-conforming options we can use instead. See https://www.ietf.org/mail-archive/web/media-types/current/msg00693.html