Skip to content
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

Explicitly state that Media Type Object schema field applies to responses as well as requests #1579

Merged
merged 2 commits into from
May 21, 2018

Conversation

jwalton
Copy link
Contributor

@jwalton jwalton commented May 12, 2018

Super minor nit-picky sort of change. :)

@@ -1363,7 +1363,7 @@ Each Media Type Object provides schema and examples for the media type identifie
##### Fixed Fields
Field Name | Type | Description
---|:---:|---
<a name="mediaTypeSchema"></a>schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the request body.
<a name="mediaTypeSchema"></a>schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the request body (or response body, if this is part of a response).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that Media Type Object is also used in Parameter Object, in cases where the parameter is specified by the content map, as opposed to schema and style. The content property is a Map[string, Media Type Object].

Maybe it would be simpler to say:

"The schema defining the content of the request, response, or parameter."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, sir. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that wording a lot better, actually, because the old wording:

The schema defining the type used

Implies that the schema uniquely identifies the "type" of a request, response, or parameter, but since a schema can validate multiple types, it doesn't really.

@handrews
Copy link
Member

I think #1576 identifies some confusion in this area as well. It should perhaps be a separate PR but as I'm confused on the topic myself I thought I'd use this to draw more attention to it.

TL;DR: To me, the schema of the media type object should have nothing to do with whether the media is streamed or not, but apparently that's a thing?

@darrelmiller darrelmiller merged commit b552f44 into OAI:v3.0.2-dev May 21, 2018
@jwalton jwalton deleted the patch-2 branch May 29, 2019 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants