-
Notifications
You must be signed in to change notification settings - Fork 9.1k
v3.2: Parameter and Header example updates #4801
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
base: v3.2-dev
Are you sure you want to change the base?
Conversation
This updates for both the new example fields and for examples with `content`
@ralfhandl the email notification contained this:
but I don't see it now... was this just because I had split this from PR #4802? (and accidentally posted them in the wrong order...) |
Co-authored-by: Ralf Handl <[email protected]>
Yes, I got confused for a minute and lost sight of the target picture. |
src/oas.md
Outdated
@@ -2545,6 +2638,7 @@ ETag: | |||
schema: | |||
type: string | |||
pattern: ^" | |||
example: xyzzx |
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.
I don’t understand why the example does not match the pattern required by the schema.
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.
LOL neither do I 🤦
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.
@ralfhandl OK so it turns out the ETag
header makes strange use of quotes, and I'm not really sure how to represent it. Here are examples from RFC9110:
ETag: "xyzzy"
ETag: W/"xyzzy"
ETag: ""
I was trying to ensure the first or third would be valid, but the second would not be. Which I guess means that unlike most headers where you strip the quotes (the quoted-string
ABNF production), the quotes are significant in the ETag
? I think?
So I think maybe this should be pattern: ^"
and example: "\"xyzzy\""
? Or maybe I should find a different example? I just want an example of a real header....
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.
@ralfhandl I updated it with that approach and added a comment about the unusual quote use.... I am open to dropping this as too confusing but it's actually a semantically significant documentation use case.
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.
(I have no idea if anyone would use this in an actual OAD, but it does tell you something useful).
Note: This replaces the other half of PR #4673 (the first half being replaced by PR #4800), and updates parameter and header examples for PRs #4800, #4799., and #4802.
This updates for both the new example fields and for examples with
content