-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Reusable media types #2845
Comments
I think is too big of a change for 3.x, but it might be worth discussing over in the Moonwalk (4.0) repository, specifically: I'm not entirely sure I understand the ask here – at least not well enough to update the Moonwalk discussions myself, so I'm not going to close it yet. |
I'll check that thread out in moonwalk. |
@handrews I'm not sure that thread totally subsumes this. I think it could, I'll see if I can communicate the concept in there... |
@peteraritchie Is part of this just adding a section for Media Type Objects under the Components Object? Because that could be done in 3.2. But I feel like there's more here, and its not entirely clear to me how common Media Type Objects would be used unless you are avoiding resource-specific schemas. |
@handrews 3.2? Media Type Objects within Components would definitely add value in this context. I was avoiding suggesting a particular solution :). How would this be done in 3.2, or are you alluding to extensions? |
@peteraritchie I think these two issues/discussions might address what you're getting at here:
We could do more "put X in Components and allow I am hoping that the proposal in #3771 covers what you meant by there being more than just A registry (that could include how the XML and Encoding Objects work, but not be limited to those approaches) would allow defining how media types work in general, which is something we can't do right now. Is that what you were getting at with "reusable media types"? If so, would you be OK with closing this in favor of #3853 and #3771? Note that discussion 3771b will produce issues when we have an actionable plan - we're kind-of trying to move open-ended discussions to GitHub discussions and use issues for actionable things. |
@peteraritchie I'm taking that thumbs up as "OK to close in favor of the other issues/discussions" – if that is not what you meant please feel free to comment and I can re-open. |
AKA "Add
mediaTypes
tocomponents
".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
incomponents
, 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.)The text was updated successfully, but these errors were encountered: