-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi-v1.yaml
More file actions
82 lines (82 loc) · 1.79 KB
/
openapi-v1.yaml
File metadata and controls
82 lines (82 loc) · 1.79 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
openapi: 3.0.3
info:
title: Todo API
version: 1.0.0
description: A simple todo list API.
paths:
/items:
get:
summary: List all items
operationId: listItems
responses:
"200":
description: A list of items
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Item"
post:
summary: Create an item
operationId: createItem
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewItem"
responses:
"201":
description: Item created
content:
application/json:
schema:
$ref: "#/components/schemas/Item"
/items/{id}:
get:
summary: Get an item by ID
operationId: getItem
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
"200":
description: A single item
content:
application/json:
schema:
$ref: "#/components/schemas/Item"
delete:
summary: Delete an item
operationId: deleteItem
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
"204":
description: Item deleted
components:
schemas:
Item:
type: object
required: [id, name, done]
properties:
id:
type: integer
name:
type: string
done:
type: boolean
NewItem:
type: object
required: [name]
properties:
name:
type: string