-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorial-api.yaml
146 lines (146 loc) · 3.71 KB
/
tutorial-api.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
openapi: 3.0.0
x-stoplight:
id: 70he5bttrcegx
info:
title: tutorial-api
version: '1.0'
servers:
- url: 'http://localhost:3000'
paths:
/contents:
post:
summary: Create New Content
operationId: post-content
responses:
'200':
description: Content Created
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Content'
examples: {}
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostContentRequest'
examples: {}
description: Post the necessary fields for the API to create a new content.
description: Create a new content.
parameters: []
get:
summary: Get Contents
operationId: get-contents
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Content'
tags:
- Content
'/contents/{contentId}':
parameters:
- schema:
type: string
name: contentId
in: path
required: true
get:
summary: Get Content Info by Content ID
tags:
- Content
responses:
'200':
description: Content Found
content:
application/json:
schema:
$ref: '#/components/schemas/Content'
examples:
Get Content Alice Smith:
value:
id: 142
firstName: Alice
lastName: Smith
email: [email protected]
dateOfBirth: '1997-10-31'
emailVerified: true
signUpDate: '2019-08-24'
operationId: get-contents-contentId
description: Retrieve the information of the content with the matching content ID.
delete:
summary: Delete a Content by Content ID
operationId: delete-contents-contentsId
responses:
'204':
description: No Content
tags:
- Content
put:
summary: Update a Content
operationId: put-contents-contentsId
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Content'
tags:
- Content
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostContentRequest'
description: 一部のパラメータのみの更新も可能とする
components:
schemas:
Content:
title: Content
type: object
description: ''
x-examples:
Alice Smith:
id: 142
firstName: Alice
lastName: Smith
email: [email protected]
dateOfBirth: '1997-10-31'
emailVerified: true
signUpDate: '2019-08-24'
properties:
id:
type: integer
description: Unique identifier for the given content.
title:
type: string
body:
type: string
createdAt:
type: string
format: date
description: The date that the content was created.
updatedAt:
type: string
required:
- id
- title
- body
PostContentRequest:
title: PostContentRequest
x-stoplight:
id: uyyane08s9ozp
type: object
properties:
title:
type: string
body:
type: string
requestBodies: {}