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

fix(petstore): Update petstore to conform with OpenAPI 3.0.3 spec #4637

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions src/plugins/default-definitions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
description: Invalid ID supplied
'404':
description: Pet not found
'405':
'422':
description: Validation exception
security:
- petstore_auth:
Expand Down Expand Up @@ -107,8 +107,10 @@
application/xml:
schema:
$ref: '#/components/schemas/Pet'
'405':
'400':
description: Invalid input
'422':
description: Validation exception
security:
- petstore_auth:
- write:pets
Expand Down Expand Up @@ -249,7 +251,7 @@
schema:
type: string
responses:
'405':
'400':
description: Invalid input
security:
- petstore_auth:
Expand Down Expand Up @@ -364,8 +366,10 @@
application/json:
schema:
$ref: '#/components/schemas/Order'
'405':
'400':
description: Invalid input
'422':
description: Validation exception
/store/order/{orderId}:
get:
tags:
Expand Down Expand Up @@ -804,9 +808,9 @@
export const petStoreOas2Def = `swagger: "2.0"
info:
description: "This is a sample server Petstore server. You can find out more about\
\ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\

Check warning on line 811 in src/plugins/default-definitions/index.js

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \ .
\ For this sample, you can use the api key \`special-key\` to test the authorization\

Check warning on line 812 in src/plugins/default-definitions/index.js

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \ .
\ filters."

Check warning on line 813 in src/plugins/default-definitions/index.js

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \ .
version: "1.0.0"
title: "Swagger Petstore 2.0"
termsOfService: "http://swagger.io/terms/"
Expand Down Expand Up @@ -855,8 +859,10 @@
schema:
$ref: "#/definitions/Pet"
responses:
"405":
description: "Invalid input"
"400":
description: Invalid input
"422":
description: Validation exception
security:
- petstore_auth:
- "write:pets"
Expand Down Expand Up @@ -885,7 +891,7 @@
description: "Invalid ID supplied"
"404":
description: "Pet not found"
"405":
"422":
description: "Validation exception"
security:
- petstore_auth:
Expand Down Expand Up @@ -934,7 +940,7 @@
- "pet"
summary: "Finds Pets by tags"
description: "Multiple tags can be provided with comma separated strings. Use\
\ tag1, tag2, tag3 for testing."

Check warning on line 943 in src/plugins/default-definitions/index.js

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \ .
operationId: "findPetsByTags"
produces:
- "application/xml"
Expand Down Expand Up @@ -1019,8 +1025,10 @@
required: false
type: "string"
responses:
"405":
description: "Invalid input"
"400":
description: Invalid input
"422":
description: Validation exception
security:
- petstore_auth:
- "write:pets"
Expand Down Expand Up @@ -1141,7 +1149,7 @@
- "store"
summary: "Find purchase order by ID"
description: "For valid response try integer IDs with value >= 1 and <= 10.\
\ Other values will generated exceptions"

Check warning on line 1152 in src/plugins/default-definitions/index.js

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \ .
operationId: "getOrderById"
produces:
- "application/xml"
Expand Down Expand Up @@ -1169,7 +1177,7 @@
- "store"
summary: "Delete purchase order by ID"
description: "For valid response try integer IDs with positive integer value.\
\ Negative or non-integer values will generate API errors"

Check warning on line 1180 in src/plugins/default-definitions/index.js

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \ .
operationId: "deleteOrder"
produces:
- "application/xml"
Expand Down