-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
279 lines (279 loc) · 8.49 KB
/
Copy pathopenapi.yaml
File metadata and controls
279 lines (279 loc) · 8.49 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
openapi: 3.0.3
info:
title: Berkat Auto - Dokumen API Cloud Function
description: >-
Swagger ini adalah dokumentasi dan uji coba API untuk aplikasi website Berkat Auto.
termsOfService: https://github.com/berkatauto/
contact:
email: adam.ghafara.job@gmail.com
license:
name: Berkat Auto Backend Package
url: https://github.com/berkatauto/berkat-bepkg
version: v1.0.0
externalDocs:
description: Repo GCF
url: https://github.com/berkatauto/berkat-gcf
servers:
- url: https://asia-southeast2-spheric-entity-401507.cloudfunctions.net/
tags:
- name: CRUD
description: Data Article
externalDocs:
description: Deskripsi dan Kode Program
url: https://github.com/berkatauto/berkat-gcf/ArticlePost
- name: ACCOUNT
description: Account APIs with Using Tokenization
externalDocs:
description: Deskripsi dan Kode Program
url: https://github.com/berkatauto/berkat-gcf/signIn
paths:
/articlepost:
post:
tags:
- CRUD
summary: Post Articles
description: Post New Articles
operationId: postArticle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Articles'
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Articles'
'400':
description: Invalid status value
/getarticle:
get:
tags:
- CRUD
summary: Get Article
description: Get Article
operationId: getArticle
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Articles'
'400':
description: Invalid status value
/updatearticle:
post:
tags:
- CRUD
summary: Update Article
description: Update Article
operationId: updateArticle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Articles'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Articles'
'405':
description: Invalid input
/articledelete:
delete:
tags:
- CRUD
summary: Delete Article
description: Delete Article
operationId: deleteArticle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteArticle'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteMessage'
'405':
description: Invalid input
/signin:
post:
tags:
- ACCOUNT
summary: Login get Token
description: Login and Get User Token
operationId: authService
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Auth'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AuthResponse'
'405':
description: Invalid input
security:
- token:
- write:apiKey
- read:apiKey
/signup:
post:
tags:
- ACCOUNT
summary: signUp to Berkat Auto
description: signUp Function
operationId: signUpFunc
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SignUp'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/SignUpResult'
'405':
description: Invalid input
components:
schemas:
Articles:
type: object
properties:
author:
type: string
example: Test Author
title:
type: string
example: Contoh Judul
category:
type: string
example: Belajar Otomotif
tags:
type: object
properties:
tag:
type: string
example: Mobil, Motor, Truck, Bus, Sparepart, Aksesoris, Velg, Ban, Oli, Jasa
content:
type: object
properties:
paragraph:
type: string
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis nulla a dolor dapibus euismod et non eros. Nullam cursus augue vel risus tincidunt consectetur. Cras eleifend risus eget leo fringilla, a porta tellus condimentum. Phasellus dapibus neque eu orci pharetra dignissim. Cras et sollicitudin lectus. Sed vestibulum est rhoncus vehicula faucibus. Phasellus efficitur, risus nec consequat consectetur, quam ligula convallis quam, eu commodo lacus neque non diam. Nam ac ante vestibulum, accumsan justo nec, laoreet orci. Morbi et ligula pharetra, consequat orci quis, euismod quam. Nunc lobortis dui in ultricies sagittis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur placerat nibh ac purus consequat, ac hendrerit libero tempus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi vehicula sapien non accumsan faucibus. Cras pulvinar, mi non semper molestie, nisi metus imperdiet arcu, non viverra elit ex vel odio. Proin ullamcorper ipsum vel accumsan rutrum. Nullam mattis dui sit amet mauris convallis, sit amet molestie dolor convallis. Aenean pulvinar neque sed sapien placerat maximus. Proin rutrum, tellus at vehicula suscipit, est nibh mollis urna, vel congue urna orci a urna. Quisque nec eleifend sem, id accumsan erat. Nunc sagittis leo eget tortor ultrices vehicula nec sit amet sapien. Aenean posuere a turpis vel posuere. Vivamus bibendum, eros et gravida vehicula, purus erat finibus tellus, eu faucibus orci purus a est. Phasellus tempor nibh a tortor fringilla, vitae bibendum risus volutpat. Fusce quis elit lacus. Praesent in sollicitudin neque, sit amet aliquam sapien.
image:
type: string
example: NII
video_link:
type: string
example: NVI
date:
type: string
example: date here
DeleteArticle:
type: object
properties:
title:
type: string
example: Contoh Judul
DeleteMessage:
type: string
example: Deleting successful!
SignUp:
type: object
properties:
fullname:
type: string
example: Contoh Admin
username:
type: string
example: admin
password:
type: string
example: 12345
journal_bool:
type: boolean
example: true
role:
type: string
example: admin
SignUpResult:
type: object
properties:
fullname:
type: string
example: Contoh Admin
username:
type: string
example: admin
password:
type: string
example: 12345
journal_bool:
type: boolean
example: true
role:
type: string
example: admin
Auth:
type: object
properties:
username:
type: string
example: admin
password:
type: string
example: 12345
AuthResponse:
type: object
properties:
status:
type: true
example: false
token:
type: string
example: v4.public.1203857r1y327905ry128
message:
type: string
example: login success
requestBodies:
AuthReq:
description: Request Authentication
content:
application/json:
schema:
$ref: '#/components/schemas/Auth'
UserArray:
description: List of user object
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AuthResponse'
securitySchemes:
token:
type: apiKey
name: token
in: header