You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.1.0info:
title: Swagger Petstore - OpenAPI 3.0description: |- This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach! You can now help us improve the API whether it's by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3. Some useful links: - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)termsOfService: http://swagger.io/terms/contact:
email: [email protected]license:
name: Apache 2.0url: http://www.apache.org/licenses/LICENSE-2.0.htmlversion: 1.0.11externalDocs:
description: Find out more about Swaggerurl: http://swagger.ioservers:
- url: https://petstore3.swagger.io/api/v3tags:
- name: petdescription: Everything about your PetsexternalDocs:
description: Find out moreurl: http://swagger.io
- name: storedescription: Access to Petstore ordersexternalDocs:
description: Find out more about our storeurl: http://swagger.io
- name: userdescription: Operations about userpaths:
/pet:
put:
tags:
- petsummary: Update an existing petdescription: Update an existing pet by IdoperationId: updatePetrequestBody:
description: Update an existent pet in the storecontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'application/xml:
schema:
$ref: '#/components/schemas/Pet'application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'required: trueresponses:
'200':
description: Successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'application/xml:
schema:
$ref: '#/components/schemas/Pet''400':
description: Invalid ID supplied'404':
description: Pet not found'405':
description: Validation exceptionsecurity:
- petstore_auth:
- write:pets
- read:petspost:
tags:
- petsummary: Add a new pet to the storedescription: Add a new pet to the storeoperationId: addPetrequestBody:
description: Create a new pet in the storecontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'application/xml:
schema:
$ref: '#/components/schemas/Pet'application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'required: trueresponses:
'200':
description: Successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'application/xml:
schema:
$ref: '#/components/schemas/Pet''405':
description: Invalid inputsecurity:
- petstore_auth:
- write:pets
- read:pets/pet/findByStatus:
get:
tags:
- petsummary: Finds Pets by statusdescription: Multiple status values can be provided with comma separated stringsoperationId: findPetsByStatusparameters:
- name: statusin: querydescription: Status values that need to be considered for filterrequired: falseexplode: trueschema:
type: stringdefault: availableenum:
- available
- pending
- soldresponses:
'200':
description: successful operationcontent:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/Pet'application/xml:
schema:
type: arrayitems:
$ref: '#/components/schemas/Pet''400':
description: Invalid status valuesecurity:
- petstore_auth:
- write:pets
- read:pets/pet/findByTags:
get:
tags:
- petsummary: Finds Pets by tagsdescription: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.operationId: findPetsByTagsparameters:
- name: tagsin: querydescription: Tags to filter byrequired: falseexplode: trueschema:
type: arrayitems:
type: stringresponses:
'200':
description: successful operationcontent:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/Pet'application/xml:
schema:
type: arrayitems:
$ref: '#/components/schemas/Pet''400':
description: Invalid tag valuesecurity:
- petstore_auth:
- write:pets
- read:pets/pet/{petId}:
get:
tags:
- petsummary: Find pet by IDdescription: Returns a single petoperationId: getPetByIdparameters:
- name: petIdin: pathdescription: ID of pet to returnrequired: trueschema:
type: integerformat: int64responses:
'200':
description: successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'application/xml:
schema:
$ref: '#/components/schemas/Pet''400':
description: Invalid ID supplied'404':
description: Pet not foundsecurity:
- api_key: []
- petstore_auth:
- write:pets
- read:petspost:
tags:
- petsummary: Updates a pet in the store with form datadescription: ''operationId: updatePetWithFormparameters:
- name: petIdin: pathdescription: ID of pet that needs to be updatedrequired: trueschema:
type: integerformat: int64
- name: namein: querydescription: Name of pet that needs to be updatedschema:
type: string
- name: statusin: querydescription: Status of pet that needs to be updatedschema:
type: stringresponses:
'405':
description: Invalid inputsecurity:
- petstore_auth:
- write:pets
- read:petsdelete:
tags:
- petsummary: Deletes a petdescription: delete a petoperationId: deletePetparameters:
- name: api_keyin: headerdescription: ''required: falseschema:
type: string
- name: petIdin: pathdescription: Pet id to deleterequired: trueschema:
type: integerformat: int64responses:
'400':
description: Invalid pet valuesecurity:
- petstore_auth:
- write:pets
- read:pets/pet/{petId}/uploadImage:
post:
tags:
- petsummary: uploads an imagedescription: ''operationId: uploadFileparameters:
- name: petIdin: pathdescription: ID of pet to updaterequired: trueschema:
type: integerformat: int64
- name: additionalMetadatain: querydescription: Additional Metadatarequired: falseschema:
type: stringrequestBody:
content:
application/octet-stream:
schema:
type: stringformat: binaryresponses:
'200':
description: successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'security:
- petstore_auth:
- write:pets
- read:pets/store/inventory:
get:
tags:
- storesummary: Returns pet inventories by statusdescription: Returns a map of status codes to quantitiesoperationId: getInventoryresponses:
'200':
description: successful operationcontent:
application/json:
schema:
type: objectadditionalProperties:
type: integerformat: int32security:
- api_key: []/store/order:
post:
tags:
- storesummary: Place an order for a petdescription: Place a new order in the storeoperationId: placeOrderrequestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Order'application/xml:
schema:
$ref: '#/components/schemas/Order'application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Order'responses:
'200':
description: successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/Order''405':
description: Invalid input/store/order/{orderId}:
get:
tags:
- storesummary: Find purchase order by IDdescription: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.operationId: getOrderByIdparameters:
- name: orderIdin: pathdescription: ID of order that needs to be fetchedrequired: trueschema:
type: integerformat: int64responses:
'200':
description: successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/Order'application/xml:
schema:
$ref: '#/components/schemas/Order''400':
description: Invalid ID supplied'404':
description: Order not founddelete:
tags:
- storesummary: Delete purchase order by IDdescription: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errorsoperationId: deleteOrderparameters:
- name: orderIdin: pathdescription: ID of the order that needs to be deletedrequired: trueschema:
type: integerformat: int64responses:
'400':
description: Invalid ID supplied'404':
description: Order not found/user:
post:
tags:
- usersummary: Create userdescription: This can only be done by the logged in user.operationId: createUserrequestBody:
description: Created user objectcontent:
application/json:
schema:
$ref: '#/components/schemas/User'application/xml:
schema:
$ref: '#/components/schemas/User'application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'responses:
default:
description: successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/User'application/xml:
schema:
$ref: '#/components/schemas/User'/user/createWithList:
post:
tags:
- usersummary: Creates list of users with given input arraydescription: Creates list of users with given input arrayoperationId: createUsersWithListInputrequestBody:
content:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/User'responses:
'200':
description: Successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/User'application/xml:
schema:
$ref: '#/components/schemas/User'default:
description: successful operation/user/login:
get:
tags:
- usersummary: Logs user into the systemdescription: ''operationId: loginUserparameters:
- name: usernamein: querydescription: The user name for loginrequired: falseschema:
type: string
- name: passwordin: querydescription: The password for login in clear textrequired: falseschema:
type: stringresponses:
'200':
description: successful operationheaders:
X-Rate-Limit:
description: calls per hour allowed by the userschema:
type: integerformat: int32X-Expires-After:
description: date in UTC when token expiresschema:
type: stringformat: date-timecontent:
application/xml:
schema:
type: stringapplication/json:
schema:
type: string'400':
description: Invalid username/password supplied/user/logout:
get:
tags:
- usersummary: Logs out current logged in user sessiondescription: ''operationId: logoutUserparameters: []responses:
default:
description: successful operation/user/{username}:
get:
tags:
- usersummary: Get user by user namedescription: ''operationId: getUserByNameparameters:
- name: usernamein: pathdescription: 'The name that needs to be fetched. Use user1 for testing. 'required: trueschema:
type: stringresponses:
'200':
description: successful operationcontent:
application/json:
schema:
$ref: '#/components/schemas/User'application/xml:
schema:
$ref: '#/components/schemas/User''400':
description: Invalid username supplied'404':
description: User not foundput:
tags:
- usersummary: Update userdescription: This can only be done by the logged in user.operationId: updateUserparameters:
- name: usernamein: pathdescription: name that need to be deletedrequired: trueschema:
type: stringrequestBody:
description: Update an existent user in the storecontent:
application/json:
schema:
$ref: '#/components/schemas/User'application/xml:
schema:
$ref: '#/components/schemas/User'application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'responses:
default:
description: successful operationdelete:
tags:
- usersummary: Delete userdescription: This can only be done by the logged in user.operationId: deleteUserparameters:
- name: usernamein: pathdescription: The name that needs to be deletedrequired: trueschema:
type: stringresponses:
'400':
description: Invalid username supplied'404':
description: User not foundcomponents:
schemas:
Order:
type: objectproperties:
id:
type: integerformat: int64example: 10petId:
type: integerformat: int64example: 198772quantity:
type: integerformat: int32example: 7shipDate:
type: stringformat: date-timestatus:
type: stringdescription: Order Statusexample: approvedenum:
- placed
- approved
- deliveredcomplete:
type: booleanxml:
name: orderCustomer:
type: objectproperties:
id:
type: integerformat: int64example: 100000username:
type: stringexample: fehguyaddress:
type: arrayxml:
name: addresseswrapped: trueitems:
$ref: '#/components/schemas/Address'xml:
name: customerAddress:
type: objectproperties:
street:
type: stringexample: 437 Lyttoncity:
type: stringexample: Palo Altostate:
type: stringexample: CAzip:
type: stringexample: '94301'xml:
name: addressCategory:
type: objectproperties:
id:
type: integerformat: int64example: 1name:
type: stringexample: Dogsxml:
name: categoryUser:
type: objectproperties:
id:
type: integerformat: int64example: 10username:
type: stringexample: theUserfirstName:
type: stringexample: JohnlastName:
type: stringexample: Jamesemail:
type: stringexample: [email protected]password:
type: stringexample: '12345'phone:
type: stringexample: '12345'userStatus:
type: integerdescription: User Statusformat: int32example: 1xml:
name: userTag:
type: objectproperties:
id:
type: integerformat: int64name:
type: stringxml:
name: tagPet:
required:
- name
- photoUrlstype: objectproperties:
id:
type: integerformat: int64example: 10name:
type: stringexample: doggiecategory:
$ref: '#/components/schemas/Category'photoUrls:
type: arrayxml:
wrapped: trueitems:
type: stringxml:
name: photoUrltags:
type: arrayxml:
wrapped: trueitems:
$ref: '#/components/schemas/Tag'status:
type: stringdescription: pet status in the storeenum:
- available
- pending
- soldxml:
name: petApiResponse:
type: objectproperties:
code:
type: integerformat: int32type:
type: stringmessage:
type: stringxml:
name: '##default'requestBodies:
Pet:
description: Pet object that needs to be added to the storecontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'application/xml:
schema:
$ref: '#/components/schemas/Pet'UserArray:
description: List of user objectcontent:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/User'securitySchemes:
petstore_auth:
type: oauth2flows:
implicit:
authorizationUrl: https://petstore3.swagger.io/oauth/authorizescopes:
write:pets: modify pets in your accountread:pets: read your petsapi_key:
type: apiKeyname: api_keyin: header
Describe the bug you're encountering
We're seeing OpenAPI 3.0.3 documentation links when editing OpenAPI 3.1.0 definition. IMHO the problem is related to the fact, that we rely on field omission pattern, example here.
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
We're seeing OpenAPI 3.0.3 documentation links when editing OpenAPI 3.1.0 definition. IMHO the problem is related to the fact, that we rely on field omission pattern, example here.
To reproduce...
Steps to reproduce the behavior:
OpenAPI.info
fieldExpected behavior
Documentation should provide links for the version of the OpenAPI spec that we're actually editing.
Screenshots
Additional context or thoughts
The fix would need to come from upstream ApiDOM fix.
The text was updated successfully, but these errors were encountered: