-
-
Notifications
You must be signed in to change notification settings - Fork 314
Add "contentSchema" #673
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
Add "contentSchema" #673
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What are the expectations on implementations here? There are a LOT of media types. Are we expected to be able to identify (if not validate) them all?
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.
See the Implementation Requirements section. The short version is that you aren't expected to be ably to identify or validate any of them. The slightly longer version is that it's basically like
format
, except we are not picking a default set of recognizable values.I kind of expect most implementations to handle these as annotations passed on to the application, maybe with a callback mechanism to automatically validate the decoded text against
contentSchema
.Since this is not changed in this PR (I just moved the phrase "media type" from the first paragraph to the second), I'm not going to hold up this PR on it. Although if you think there is something specific to
contentSchema
(as opposed tocontentMediaType
) that needs clarification I would be happy to work on that a bit more.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.
Hmm... I could see that people might expect
contentSchema
to always be implemented, without really thinking about the dependency on having the right plugin (or whatever) for the underlyingcontentMediaType
andcontentEncoding
values. Is that your concern, @gregsdennis ?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.
My concern is that the "MUST" implies that implementations are required to be able to validate that a given value is a media type as defined by RFC 2046.
If it's like
format
, then maybe similar language can be used that allows implementations to defer that validation to the application in the form of returning the value as an annotation, as you said.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.
@gregsdennis the "Implementation Requirements" section is practically copy-pasted from the
format
section. What is missing? I don't want to repeat them for each keyword, if you read the spec outside of the diff lines I think it's already clear. Can you point to specific problems in that section?Also, I don't hear anything specific to
contentSchema
here (you're talking about moved text, not new requirements) so please file it as a new issue. This PR is just forcontentSchema
.