Skip to content
Discussion options

You must be logged in to vote

According to openapi 3.1 spec, there are 3 ways to specify example\examples for Query \ Path \ Header \ Cookie parameters:

1) example field of parameter object (notice that example is outside the schema):

       "parameters": [
          {
            "name": "x",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "X"
            },
            "example": 2
          }
        ]

2) examples field of parameter object (notice that examples is outside the schema):

       "parameters": [
          {
            "name": "x",
            "in": "query",
            "required": true,
            "schema": {
    …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@alv2017
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
3 participants