-
Notifications
You must be signed in to change notification settings - Fork 4
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
Object Type parameter for OAS media type #110
Comments
Good catch! I think:
|
@ioggstream yeah leaving out 2.0 is probably for the best. With 3.0.4 and 3.1.1 we've substantially clarified how parsing and referencing work (it's a bit different in 3.0.x and 3.1.x — 3.1.x separates identity and location, 3.0.x doesn't), but we won't be re-visiting 2.0. |
@handrews what's the expected behavior here?
|
I might debate Hmm... I might have resolved my own bikeshedding, as "Object" includes non-referenceable Objects, but Components are always referenceable. So I agree that Thinking more, someone might think that So it might better to use |
I was guessing whether the usage of the new parameter is ok in the request/response. We can bikeshed the name later on. I just wanted to avoid overloaded names like type/object for now, since I initially confused |
It is common practice (particularly in OAS 2.0 and 3.0) to create documents that consist of a referenceable OAS Object (meaning any capitalized-in-the-spec Object type that either has an entry in the Components Object (3.0, 3.1) or is a 3.0 Path Item Object (it is referenceable but in that version did not have a Components Object section), or if 2.0 is covered any of the five different Definitions Objects.
If we want these to be able to have media types, then we probably need to support an
object-type
or similar Media Type parameter. While 3.1 added the ability to wrap re-usable components in complete documents without having to define API paths, this sort of split remains supported and in common use.I don't know if we want to add this complexity, but it's a significant use case. It also introduces the corner case that a JSON Schema document could alternatively have a media type like
application/openapi+yaml;object-type=Schema
, which would be useful if the OpenAPI media types are ready for standardization before the JSON Schema media types.The text was updated successfully, but these errors were encountered: