33 title : Petstore API
44 description : A simple API for managing a pet store
55 version : 1.0.0
6+ license :
7+ name : MIT
8+ url : https://opensource.org/licenses/MIT
69 contact :
710 name : API Support
811 email : support@petstore.example.com
912
1013servers :
11- - url : https://api.petstore.example.com /v1
14+ - url : https://api.petstore.io /v1
1215 description : Production server
1316
17+ security :
18+ - ApiKeyAuth : []
19+
1420paths :
1521 /pets :
1622 get :
@@ -38,6 +44,12 @@ paths:
3844 type : array
3945 items :
4046 $ref : ' #/components/schemas/Pet'
47+ ' 400 ' :
48+ description : Invalid request parameters
49+ content :
50+ application/json :
51+ schema :
52+ $ref : ' #/components/schemas/Error'
4153 ' 500 ' :
4254 description : Internal server error
4355 content :
@@ -77,43 +89,15 @@ paths:
7789 schema :
7890 $ref : ' #/components/schemas/Error'
7991
80- /pets/{petId} :
81- get :
82- summary : Get a pet by ID
83- description : Returns a single pet by its ID
84- operationId : getPetById
85- tags :
86- - pets
87- parameters :
88- - name : petId
89- in : path
90- required : true
91- description : ID of the pet to retrieve
92- schema :
93- type : string
94- format : uuid
95- responses :
96- ' 200 ' :
97- description : Successful response
98- content :
99- application/json :
100- schema :
101- $ref : ' #/components/schemas/Pet'
102- ' 404 ' :
103- description : Pet not found
104- content :
105- application/json :
106- schema :
107- $ref : ' #/components/schemas/Error'
108- ' 500 ' :
109- description : Internal server error
110- content :
111- application/json :
112- schema :
113- $ref : ' #/components/schemas/Error'
11492
11593
11694components :
95+ securitySchemes :
96+ ApiKeyAuth :
97+ type : apiKey
98+ in : header
99+ name : X-API-Key
100+
117101 schemas :
118102 Pet :
119103 type : object
@@ -137,7 +121,6 @@ components:
137121 enum :
138122 - dog
139123 - cat
140- - bird
141124 - rabbit
142125 description : Species of the pet
143126 breed :
@@ -185,7 +168,6 @@ components:
185168 enum :
186169 - dog
187170 - cat
188- - bird
189171 - rabbit
190172 description : Species of the pet
191173 breed :
0 commit comments