Skip to content

Content negotiation when application/openapi+json only applies to OpenAPI Objects #131

@ioggstream

Description

@ioggstream

Discussion

  • Imagine application/openapi+json to only apply to OpenAPI Objects
  • How to enable content negotiation of $ref'd resources?

Notes

Start this topic because it seems to me that it is not clear.

In closing #110 we decided not to convey the specific OpenAPI Object associated with the resource.
My understanding was that it was still possible to convey other objects (e.g., Schema Objects)
but let's imagine it's not possible.

How to negotiate the correct version for OAS3.0 vs OAS3.1 Schema Objects
(e.g., requesting a Schema Object to a server that can respond with an OAS 3.0 compatible or with a 3.1/JSON Schema object)?
Note that OAS3.0 Schema Objects are an extension of JSON Schema objects,
but clients may want a resource with that specific extension.

This content-negotiation is key to allow ecosystems based on OAS3.0 to migrate to OAS3.1/JSON Schema,
so that schema servers can reply with the best OAS version.

A client retrieving a Schema from an openapi: 3.0 document can then

Accept: application/openapi+json; version=3.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions