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

update to v5.18.2 to support openapi 3.1 #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion current_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.14.3
v5.18.2
3 changes: 1 addition & 2 deletions embed/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions embed/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui-es-bundle.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions embed/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion embed/swagger-ui.js.map

Large diffs are not rendered by default.

326 changes: 253 additions & 73 deletions example/spec/petstore.yml
Original file line number Diff line number Diff line change
@@ -1,112 +1,292 @@
---
openapi: 3.0.0
openapi: 3.1.0
info:
version: 1.0.0
title: Simple Petstore
description: This is an example of embedded spec served with API using flowchartsman/swaggerui
title: Swagger Petstore - OpenAPI 3.1
description: |-
This is a sample Pet Store Server based on the OpenAPI 3.1 specification.
You can find out more about
Swagger at [http://swagger.io](http://swagger.io).
termsOfService: http://swagger.io/terms/
contact:
email: [email protected]
license:
name: Apache 2.0 AND (MIT OR GPL-2.0-only)
identifier: Apache-2.0 AND (MIT OR GPL-2.0-only)
version: 1.0.7
summary: Pet Store 3.1
x-namespace: swagger
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: /api/v31
tags:
- name: pet
description: Everything about your Pets
externalDocs:
description: Find out more
url: http://swagger.io
- name: store
description: Access to Petstore orders
externalDocs:
description: Find out more about our store
url: http://swagger.io
- name: user
description: Operations about user
paths:
'/pet/{id}':
parameters:
- name: id
in: path
required: true
schema:
type: integer
/pet:
put:
tags:
- pet
summary: Update a pet
description: This operation will update a pet in the database.
- pet
summary: Update an existing pet
description: Update an existing pet by Id
operationId: updatePet
requestBody:
required: true
description: Pet object that needs to be updated in the store
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: A Pet in JSON Format
required:
- id
writeOnly: true
application/xml:
schema:
$ref: '#/components/schemas/Pet'
description: A Pet in XML Format
required:
- id
writeOnly: true
required: true
responses:
'200':
description: Pet updated
"200":
description: Successful operation
content:
application/json:
application/xml:
schema:
'$ref': '#/components/schemas/ApiResponse'
'404':
description: Pet not found
content:
$ref: '#/components/schemas/Pet'
description: A Pet in XML Format
readOnly: true
application/json:
schema:
'$ref': '#/components/schemas/ApiResponse'
'400':
description: Invalid id or pet object
$ref: '#/components/schemas/Pet'
description: A Pet in JSON Format
readOnly: true
"400":
description: Invalid ID supplied
"404":
description: Pet not found
"405":
description: Validation exception
security:
- petstore_auth:
- write:pets
- read:pets
post:
tags:
- pet
summary: Add a new pet to the store
description: Add a new pet to the store
operationId: addPet
requestBody:
description: Create a new pet in the store
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: A Pet in JSON Format
required:
- id
writeOnly: true
application/xml:
schema:
$ref: '#/components/schemas/Pet'
description: A Pet in XML Format
required:
- id
writeOnly: true
required: true
responses:
"200":
description: Successful operation
content:
application/json:
application/xml:
schema:
'$ref': '#/components/schemas/ApiResponse'
'401':
description: Unauthorized
content:
$ref: '#/components/schemas/Pet'
description: A Pet in XML Format
readOnly: true
application/json:
schema:
'$ref': '#/components/schemas/ApiResponse'
$ref: '#/components/schemas/Pet'
description: A Pet in JSON Format
readOnly: true
"405":
description: Invalid input
security:
- ApiKey: []
- petstore_auth:
- write:pets
- read:pets
/pet/{petId}:
get:
tags:
- pet
summary: Find a pet
description: This operation will find a pet in the database.
- pets
summary: Find pet by ID
description: Returns a pet when 0 < ID <= 10. ID > 10 or nonintegers will simulate
API error conditions
operationId: getPetById
parameters:
- name: petId
in: path
description: ID of pet that needs to be fetched
required: true
schema:
type: integer
format: int64
description: param ID of pet that needs to be fetched
exclusiveMaximum: 10
exclusiveMinimum: 1
responses:
'200':
description: pet retrieval
default:
description: The pet
content:
application/json:
schema:
'$ref': '#components/schemas/Pet'
'404':
description: Pet not found
content:
application/json:
$ref: '#/components/schemas/Pet'
description: A Pet in JSON format
application/xml:
schema:
'$ref': '#/components/schemas/ApiResponse'
'400':
description: Invalid id
content:
application/json:
schema:
'$ref': '#/components/schemas/ApiResponse'
security: []
$ref: '#/components/schemas/Pet'
description: A Pet in XML format
"400":
description: Invalid ID supplied
"404":
description: Pet not found
security:
- petstore_auth:
- write:pets
- read:pets
- api_key: []
components:
securitySchemes:
ApiKey:
type: apiKey
in: header
name: X-API-KEY
schemas:
Pet:
type: object
required:
- name
- pet_type
Category:
$id: /api/v31/components/schemas/category
description: Category
properties:
id:
type: integer
format: int64
readOnly: true
default: 0
example: 1
name:
type: string
example: francine
pet_type:
type: string
example: shark
ApiResponse:
type: object
example: Dogs
xml:
name: Category
Pet:
$schema: https://json-schema.org/draft/2020-12/schema
description: Pet
properties:
code:
id:
type: integer
format: int32
type:
format: int64
example: 10
category:
$ref: '#/components/schemas/Category'
description: Pet Category
name:
type: string
message:
example: doggie
photoUrls:
type: array
items:
type: string
xml:
name: photoUrl
xml:
wrapped: true
tags:
type: array
items:
$ref: '#/components/schemas/Tag'
xml:
wrapped: true
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
availableInstances:
type: integer
format: int32
example: 7
exclusiveMaximum: 10
exclusiveMinimum: 1
swagger-extension: true
petDetailsId:
type: integer
format: int64
$ref: /api/v31/components/schemas/petdetails#pet_details_id
petDetails:
$ref: /api/v31/components/schemas/petdetails
required:
- name
- photoUrls
xml:
name: Pet
PetDetails:
$id: /api/v31/components/schemas/petdetails
$schema: https://json-schema.org/draft/2020-12/schema
$vocabulary: https://spec.openapis.org/oas/3.1/schema-base
properties:
id:
type: integer
format: int64
$anchor: pet_details_id
example: 10
category:
$ref: /api/v31/components/schemas/category
description: PetDetails Category
tag:
$ref: /api/v31/components/schemas/tag
xml:
name: PetDetails
Tag:
$id: /api/v31/components/schemas/tag
properties:
id:
type: integer
format: int64
name:
type: string
xml:
name: Tag
securitySchemes:
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: https://petstore3.swagger.io/oauth/authorize
scopes:
write:pets: modify pets in your account
read:pets: read your pets
mutual_tls:
type: mutualTLS
api_key:
type: apiKey
name: api_key
in: header
webhooks:
newPet:
post:
requestBody:
description: Information about a new pet in the system
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: Webhook Pet
responses:
"200":
description: Return a 200 status to indicate that the data was received
successfully