-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathpen_example.yaml
58 lines (57 loc) · 1.19 KB
/
pen_example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
openapi: 3.0.0
info:
version: "1.0.0"
title: "Swagger Pens"
paths:
/pens:
post:
tags:
- "pens"
summary: "Add a new pen"
requestBody:
description: "Pen object that needs to be added to the store"
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Pen"
responses:
"201":
description: "Created"
"400":
description: "Invalid input"
/pens/{pen_id}:
get:
tags:
- "pens"
summary: "Retrieve an existing pen"
parameters:
- name: "pen_id"
in: path
description: "Pen ID"
required: true
schema:
type: integer
format: int64
responses:
"200":
description: "OK"
content:
application/json:
schema:
$ref: "#/components/schemas/Pen"
"404":
description: "Not Found"
components:
schemas:
Pen:
type: "object"
properties:
name:
type: "string"
color:
type: "string"
enum:
- black
- blue
- red