-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
AKA "Add mediaTypes
to components
".
Apologies if this is a horse already flogged; I couldn't find it, so please point me in the right direction if this is noise.
Context
REST and HATEOS
In OpenAPI I can specify endpoints that include request and response specifications/schemas that can include media types. Part of what I believe Roy Fielding has detailed is that with HATEOS that media types are more important than hierarchies. I read this to mean that any single operation may respond with a link/media-type relation and that it's more important that the receiver understands the media type than have a priori knowledge of a URI.
Suggestion, Ask, Issue
Adding individual media types to components
would be hugely useful to support this sort of thing. (e.g. mediaTypes
in components
, but implementation isn't the important part.) A service could then operate with a canonical set of resource definitions then regardless what URI a requesting application uses it would understand the request and responses. This would enable servers to control their own namespace through media types and link relations (via Link header, etc.)