-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
523 lines (523 loc) · 12.7 KB
/
swagger.json
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
{
"openapi": "3.1.0",
"info": {
"title": "MonoFolio",
"description": "This is the API that serves the content of the MonoFolio website to the front end, the MonoFolio idea is to have the Portfolio Front and Backend in a single repository.",
"contact": {
"name": "Batleforc",
"url": "https://maxleriche.net",
"email": "[email protected]"
},
"license": {
"name": ""
},
"version": "0.1.0"
},
"servers": [
{
"url": "http://localhost:5437",
"description": "Local development server."
},
{
"url": "https://maxleriche.net",
"description": "Production server referencing a tagged version of the api."
},
{
"url": "https://beta.maxleriche.net",
"description": "Beta server referencing the main branch."
}
],
"paths": {
"/api/blog": {
"get": {
"tags": [
"Blog"
],
"summary": "Get the blog timeline",
"description": "Get blog timeline with minimal description of each article.",
"operationId": "get_timeline",
"responses": {
"200": {
"description": "Content of the blog timeline ordered by date.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlogTimeline"
}
}
}
},
"500": {
"description": "Internal server error."
}
}
}
},
"/api/doc": {
"get": {
"tags": [
"Doc"
],
"summary": "Get doc sidebar",
"description": "Get doc sidebar with minimal description of each article.",
"operationId": "get_doc_sidebar",
"responses": {
"200": {
"description": "Doc category sidebar.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DocCategory"
}
}
}
},
"500": {
"description": "Internal server error."
}
}
}
},
"/api/home": {
"get": {
"tags": [
"Home"
],
"summary": "Get home content",
"description": "Get the content meant for the home page.",
"operationId": "get_home",
"responses": {
"200": {
"description": "Content of the home page.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HomeContent"
}
}
}
},
"500": {
"description": "Internal server error."
}
}
}
},
"/api/media": {
"get": {
"tags": [
"Media"
],
"summary": "Get media from the media folder",
"description": "Get the media asset from the media folder.",
"operationId": "get_media",
"parameters": [
{
"name": "path",
"in": "query",
"description": "Path to the media asset.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Media content if found."
},
"404": {
"description": "Page not found inside of the Media folder or path invalid."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/api/page": {
"get": {
"tags": [
"Page"
],
"summary": "Get a page content",
"description": "Fetch page's content by page path in DbFolder.",
"operationId": "get_page",
"parameters": [
{
"name": "path",
"in": "query",
"description": "Path to the markdown page.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Content of a full page if found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page"
}
}
}
},
"404": {
"description": "Page not found or path invalid."
},
"500": {
"description": "Internal server error."
}
}
}
}
},
"components": {
"schemas": {
"BlogTimeline": {
"type": "object",
"description": "Timeline of the blog space, contain the short representation of the pages.",
"required": [
"pages"
],
"properties": {
"pages": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PageShort"
},
"propertyNames": {
"type": "string"
}
}
}
},
"DocCategory": {
"type": "object",
"description": "The recursive structure of the sidebar containing the pages and sub-categories of the documentation.",
"required": [
"name",
"has_index",
"sub_categories",
"pages"
],
"properties": {
"has_index": {
"type": "boolean"
},
"name": {
"type": "string"
},
"pages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PageShort"
}
},
"sub_categories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DocCategory"
}
}
}
},
"DocHeader": {
"type": "object",
"description": "Header of a markdown file.",
"required": [
"title",
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date-time"
},
"description": {
"type": [
"string",
"null"
]
},
"image": {
"type": [
"string",
"null"
]
},
"links": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DocHeaderLink"
}
},
"spec": {
"$ref": "#/components/schemas/DocHeaderSpec"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"techno": {
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"type": "string"
},
"weight": {
"type": "integer",
"format": "int32"
},
"writter": {
"$ref": "#/components/schemas/DocHeaderWritter"
}
}
},
"DocHeaderLink": {
"type": "object",
"description": "Link present in the header of a markdown file.",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"DocHeaderSpec": {
"type": "object",
"description": "Specification of the header of a markdown file, include the information if a Header is a blog/project/doc.",
"properties": {
"blog": {
"type": "boolean"
},
"doc": {
"type": "boolean"
},
"project": {
"type": "boolean"
}
}
},
"DocHeaderWritter": {
"type": "object",
"description": "Writer present in the header of a markdown file.",
"required": [
"name",
"url",
"avatar"
],
"properties": {
"avatar": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"HomeContent": {
"type": "object",
"description": "Content of the home page.",
"required": [
"name",
"presentation",
"coverTitle",
"cvUrl",
"url",
"history"
],
"properties": {
"coverTitle": {
"type": "array",
"items": {
"type": "string"
}
},
"cvUrl": {
"type": "string"
},
"history": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HomeHistory"
}
},
"name": {
"type": "string"
},
"presentation": {
"type": "string"
},
"url": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HomeUrl"
}
}
}
},
"HomeHistory": {
"type": "object",
"description": "History of the home page, contain a part of the history of Max Batleforc.",
"required": [
"title",
"lieux",
"date",
"weight",
"imgUrl",
"description"
],
"properties": {
"date": {
"type": "string"
},
"description": {
"type": "string"
},
"imgUrl": {
"type": "string"
},
"lieux": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/HomeHistoryUrl"
}
},
"weight": {
"type": "integer",
"format": "int32"
}
}
},
"HomeHistoryUrl": {
"type": "object",
"description": "Url that should be present on the history.",
"required": [
"url",
"name"
],
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"HomeUrl": {
"type": "object",
"description": "Url that should be present on the home page.",
"required": [
"url",
"name",
"primaire",
"imgUrl"
],
"properties": {
"imgUrl": {
"type": "string"
},
"name": {
"type": "string"
},
"primaire": {
"type": "boolean"
},
"url": {
"type": "string"
}
}
},
"Page": {
"type": "object",
"description": "A page containing the content, metadata and name of the page.",
"required": [
"name",
"content",
"metadata"
],
"properties": {
"content": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/DocHeader"
},
"name": {
"type": "string"
}
}
},
"PageShort": {
"type": "object",
"description": "Short representation of a page, containing only the metadata and the path to the page.",
"required": [
"name",
"path",
"metadata"
],
"properties": {
"metadata": {
"$ref": "#/components/schemas/DocHeader"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
}
}
}
}
},
"tags": [
{
"name": "Blog",
"description": "Return the content of the blog timeline and page to be displayed."
},
{
"name": "Doc",
"description": "Return the content of the documentation page, sidebar and header."
},
{
"name": "Home",
"description": "Endpoints that return the content meant for the home page."
},
{
"name": "Media",
"description": "Return the assets that are meant to be dynamically loaded and not a part of the static build."
},
{
"name": "Page",
"description": "Return the content of a page with a specific workflow turning shortPage into a full page."
}
]
}