Skip to content

Commit 5ab5cff

Browse files
committed
fix: add security scheme, license, and 4xx responses
1 parent d57e777 commit 5ab5cff

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

specs/petstore.openapi.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ info:
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

1013
servers:
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+
1420
paths:
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:
@@ -80,6 +92,12 @@ paths:
8092

8193

8294
components:
95+
securitySchemes:
96+
ApiKeyAuth:
97+
type: apiKey
98+
in: header
99+
name: X-API-Key
100+
83101
schemas:
84102
Pet:
85103
type: object

0 commit comments

Comments
 (0)