-
-
Notifications
You must be signed in to change notification settings - Fork 315
Explain schema media type param and Accept #695
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I like this, but I want to double-check my reading of media types and repeated media-type parameters first. |
<t> | ||
As with Content-Type, multiple schema parameters in the same string | ||
requests an instance that conforms to all of the listed schemas. | ||
</t> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, this appears to be consistent with how e.g. profile is used.
different parameters, which requests that the instance conforms | ||
to one parameter value or the other. Such an instance can conform | ||
to all separately specified parameters but is not guaranteed to do so. | ||
</t> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I misread this the first time through, I thought this was saying a media type could have a property specified multiple times like application/json;schema="http://example.com/a";schema="http://example.com/b"
but I don't know what that would even mean. I suspect it's invalid.
This is all technically correct, so I don't have an objection as such, but I'd be clearer to me without this paragraph. I think the example above is sufficient to get the point across.
I can't find if there's a good way to distinguish the "type slash subtype" media type, versus the media type of a document (including its media type parameters).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awwright thanks, I'll take a look at the wording. I think I was trying to cover a question from the issue that was filed (this came from an outside request filed a number of months ago), but maybe it can be trimmed or reworded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awwright thanks for catching this, it really was confusing when I went back and read it. I think I have clarified it by just highlighting the example. Please let me know if this works for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@handrews thanks for making these changes - one minor suggested tweak. Instead of "conforms to at least one of the identified schemas", it might be clearer to say "conforms to both the first and second schema or conforms to the third".
Like I mentioned, this is acceptable, but I also hope I'm not lowering my standards just for the sake of being agreeable, and maybe it's possible to scrutinize that one paragraph a bit more. |
This explains how to use HTTP content negotiation to request representations that conform to multiple schemas, or conform to at least one schema out of several.
5e522df
to
114b8c6
Compare
@awwright any thoughts on the changes I made for your comments? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. This is great.
Resolves #607
This explains how to use HTTP content negotiation to request
representations that conform to multiple schemas, or conform
to at least one schema out of several.