-
-
Notifications
You must be signed in to change notification settings - Fork 313
contentEncoding
is a confusing term
#1100
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
Comments
@ioggstream we try not to change existing keywords without strong reasons. Many formats have things named around encodings and media types and those names often collide. If we try to match OpenAPI we'll be confusing with someone else. There is no universal answer. Separately, I wrote the comments on JSON Schema's Regarding Understanding JSON Schema, if there are improvements you want there, you should file them under its repo. @jdesrosiers is working on updating it. |
@ioggstream we could definitely do better by explaining the derivation of the keyword in the spec. We point to some RFCs but a one-liner "this is analogous to MIME's |
I think we should spend some time (both in OAS and here) to understand how this kind of functionalities are expected to work together and eg: if the examples we provide with the schema must be "encoded" or not. For example, what happens when I have |
@ioggstream there is an extensive section of the OAS specification dedicated to the form submission media types. While it may look confusing at first, there is less going on here than people think. You have a representation of a resource in some media type. You parse the document into an internal representation that is more or less compatible with JSON Schema (this is why OAS does things like explain how to map multipart forms into array data structures - b/c that's what JSON Schema understands). Then you apply the schema. Each step happens in isolation, unaware of the others. There isn't an interaction. Keep in mind that |
In particular, |
I'll make PR clarifying this side of things to the extent that that is possible. The larger work is on the OAS side, which I'll get to at some point. |
@ioggstream Does the PR clarify the issue for you? |
@Relequestual sorry for the delay, it clarifies the origin thanks! If it's possible, I'd like to have some more time to proof-read the complete text. Thanks again for asking, R. |
@ioggstream I'll leave this open for another 7 days, and close then if you haven't done so already =] |
@Relequestual PTAL #1150 In the meantime I'll close this since it's generally ok. |
Question
the use of
contentEncoding
,contentMediaType
from here is very confusingconsidered the use of json-schema in OAS3.1 spec
https://json-schema.org/understanding-json-schema/reference/non_json_data.html
I suggest to use another term instead of
content
andcontentEncoding
.Suitable values could be
stringEncoding
orobjectEncoding
... anything that doesn't remind http :)The text was updated successfully, but these errors were encountered: