Skip to content

v3.2: Explain Param/Header/Enc example serialization #4673

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

Draft
wants to merge 8 commits into
base: v3.2-dev
Choose a base branch
from

Conversation

handrews
Copy link
Member

@handrews handrews commented Jun 9, 2025

NOTE: This is another PR split out from PR #4647, and makes significant changes to the style serialization for headers compared to that PR, and clarifies the other policies that already existed in PR #4647. This should be more consistent than what was there before, as I commented in the last call when I was unsure of header serialization.

The rules for this have not been clear, and are not always intuitive. This states and explains them directly and ensures that the Style Examples table matches the rules.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

@handrews handrews added this to the v3.2.0 milestone Jun 9, 2025
@handrews handrews requested review from a team as code owners June 9, 2025 18:29
@handrews handrews added param serialization Issues related to parameter and/or header serialization example obj/keywords Issues with the Example Object or exampel(s) keywords labels Jun 9, 2025
@handrews
Copy link
Member Author

I have added updates to the Parameter and Header Object examples, as they fit here (and unlike with the Example Object, do not cause the diff to become unreadable).

If you would like more examples added, please help get this PR merged and then feel free to open further PRs. There are endless things we could add and I would like to get the existing things updated first.

@handrews
Copy link
Member Author

I have also added a more complex header example, which @karenetheridge I think addresses your concern in this area.

src/oas.md Outdated
@@ -2471,6 +2513,42 @@ ETag:
pattern: ^"
```

A `Link` header that, if present, must include links with the standard relation types `self`, `first`, `prev`, `next`, and `last`, as might be used on a paginated collection:
Copy link
Member

Choose a reason for hiding this comment

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

I love this example!

Copy link
Member Author

Choose a reason for hiding this comment

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

@karenetheridge I have (hopefully) improved it in the latest commit, which has the message:


Actually ensure each pattern is matched - in the previous way
the example was written, the uniqueItems was not sufficient
as a link with the same rel but different URI would have satisfied
the conditions.

Also, the text says "includes" these rels, so there could be more
entries.

Copy link
Member Author

Choose a reason for hiding this comment

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

Assuming the application/linkset PR gets accepted, this example is obsolete, but I can show a similar technique with Set-Cookie, which is also good because it has weird serialization requirements which we need to address for examples, which I will do. RFC9110 directs implementations to handle Set-Cookie as a special case, so I will follow that guidance and describe how to work with it rather than trying to change anything else to accommodate it. Stay tuned...

miqui
miqui previously approved these changes Jun 12, 2025
handrews added 8 commits June 22, 2025 15:39
The rules for this have not been clear, and are not always intuitive.
This states and explains them directly and ensures that the
Style Examples table matches the rules.
These updates are about header usage in the Response Object.
Actually ensure each pattern is matched - in the previous way
the example was written, the uniqueItems was not sufficient
as a link with the same rel but different URI would have satisfied
the conditions.

Also, the text says "includes" these rels, so there could be more
entries.
The `Link` header is now addressed in another PR.

Make the first example a real header instead of an `X-`.

Also provide a link to the Header Object for special cases
that will be documented there in other PRs.
@handrews
Copy link
Member Author

handrews commented Jul 5, 2025

Between the ongoing debate over serializedValue in the Example Object and the discussions here, I'm re-thinking how to explain this better. Putting this in draft for now- I might revive it or close it in favor of new PRs.

@handrews handrews marked this pull request as draft July 5, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example obj/keywords Issues with the Example Object or exampel(s) keywords param serialization Issues related to parameter and/or header serialization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants