How should parameter examples be written? #4622
Unanswered
chrisradek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to understand whether or not to apply serialization to parameter examples. If I'm following #3041 and the changes added to 3.0.4, it looks like parameter examples should be serialized according to this table:
https://spec.openapis.org/oas/v3.0.4.html#style-examples
So then I'd have parameters specified like this:
However this seems to cause problems for the tooling I've tested with (swagger-ui, spectral, vacuum) and seems to contradict documentation around parameters elsewhere (where the serialization:
https://swagger.io/docs/specification/v3_0/describing-parameters/#parameter-examples
I work on a tool that generates Open API and am adding support for emitting parameter examples, but came across issues around tooling support as part of validation. I'm curious if there are any tools that do work with the serialized examples.
Beta Was this translation helpful? Give feedback.
All reactions