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

Reorganize and streamline form media type guidance (3.0.4) #3923

Merged
merged 7 commits into from
Jun 23, 2024

Conversation

handrews
Copy link
Member

@handrews handrews commented Jun 20, 2024

It's probably best to look at this as individual commits- git is pretty confused about the overall diff so I went back and divided it up into five separate steps:

There has been a lot of duplication around form-urlencoded and form-data between the Media Type Object and the Encoding Object.

Figuring out form details has required reading through both sections, because some things only appear in one place, some only appear in the other (and not necessarily the way you'd guess), and some things are in both places but contradict each other (#3921 includes a fix for one in 3.1.1, #3922 fixes a similar problem in 3.0.4).

I've opted to handle everything under the Encoding Object, particularly as we have clarified that an absent encoding field in the Media Type Object is the same as having it with empty Encoding Objects for every field. I've kept the old Media Type Object section headings and linked to the new sections for folks who might be used to looking there.

I've given each example a section heading because they do distinct things and it's helpful to see that in the TOC.

Porting this to 3.1.1 will have to wait for PR #3921 to be merged, and it will also be similar but not quite identical because of the differences in handling binary data.

This just moves (and occasionally copies) blocks of text and/or
examples in preparation form more substantial streamlining.
No modifications were made to any block.
Make the Parameter, Encoding, and Header Object fixed fields
section organization the same in all three places, with the
same levels of indentation.

Add more headings under the Encoding Object for guidance on
each form media type, and sub-headings for each example in
each of those sections.

This will make the diff for the next commit much more legible.
This puts the useful part of the "An encoding attribute..."
text into the fixed fields table, and removes the duplication.

It also links the remaining stub or truncated sections to the
information's new location under the Encoding Object.
This re-organizes and streamlines the form-urlencoded guidance
that was consolidated from the Media Type Object.

It also adds an example of a base64-encoded URL query parameter.
@handrews handrews added clarification requests to clarify, but not change, part of the spec media and encoding Issues regarding media type support and how to encode data (outside of query/path params) labels Jun 20, 2024
@handrews handrews added this to the v3.0.4 milestone Jun 20, 2024
@handrews handrews requested a review from a team June 20, 2024 00:40
ralfhandl
ralfhandl previously approved these changes Jun 20, 2024
Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

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

No relevant content seems to have been removed 😄

This organizes and streamlines the guidance on multipart
that was incorporated from the Media Type Object.

Lots of duplication has been removed, and the examples
reworked to show distinct use cases.
I forgot to run the example through URL quoting, which is necessary.
@handrews
Copy link
Member Author

handrews commented Jun 20, 2024

I've added two more commits (and edited the commit list in the PR text above) that fix an error in the base64 example and restore a paragraph I didn't mean to delete. (@mikekistler I doubt it makes things more clear, but it's more correct).

I did not mean to remove this.
@miqui miqui merged commit 396064d into OAI:v3.0.4-dev Jun 23, 2024
1 check passed
@handrews
Copy link
Member Author

@miqui @mikekistler had asked for changes here, and the discussion was not resolved. This should not have been merged and I consider it to still be open for changes.

@mikekistler perhaps to avoid future confusion it would be best to use the "request changes" button in the review interface even if it's not yet clear what (if any) changes would be requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification requests to clarify, but not change, part of the spec media and encoding Issues regarding media type support and how to encode data (outside of query/path params)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants