Skip to content

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

Merged
merged 2 commits into from
Jan 25, 2019

Conversation

handrews
Copy link
Contributor

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.

Copy link
Collaborator

@philsturgeon philsturgeon left a comment

Choose a reason for hiding this comment

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

Looks good!

@awwright
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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).

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

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".

@awwright
Copy link
Member

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.
@handrews
Copy link
Contributor Author

@awwright any thoughts on the changes I made for your comments?

Copy link
Member

@awwright awwright left a 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.

@handrews handrews merged commit b114d64 into json-schema-org:master Jan 25, 2019
@handrews handrews deleted the accept-behavior branch February 23, 2019 03:34
@gregsdennis gregsdennis added clarification Items that need to be clarified in the specification and removed Type: Maintenance labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Items that need to be clarified in the specification core Priority: Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants