@xyd-js/openapi 0.1.0-build.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +1517 -0
  2. package/LICENSE +21 -0
  3. package/README.md +3 -0
  4. package/__fixtures__/-2.complex.openai/input.yaml +39848 -0
  5. package/__fixtures__/-2.complex.openai/output.json +321646 -0
  6. package/__fixtures__/-2.complex.openai/pluginOasOpenai.ts +553 -0
  7. package/__fixtures__/-3.random/input.yaml +234 -0
  8. package/__fixtures__/-3.random/output.json +1140 -0
  9. package/__fixtures__/1.basic/input.yaml +226 -0
  10. package/__fixtures__/1.basic/output.json +1919 -0
  11. package/__fixtures__/2.more/input.yaml +76 -0
  12. package/__fixtures__/2.more/output.json +327 -0
  13. package/__fixtures__/3.multiple-responses/input.yaml +48 -0
  14. package/__fixtures__/3.multiple-responses/output.json +311 -0
  15. package/__fixtures__/5.xdocs.codeLanguages/input.yaml +231 -0
  16. package/__fixtures__/5.xdocs.codeLanguages/output.json +1879 -0
  17. package/__fixtures__/5.xdocs.sidebar/input.yaml +256 -0
  18. package/__fixtures__/5.xdocs.sidebar/output.json +843 -0
  19. package/__fixtures__/6.codeSamples/input.yaml +75 -0
  20. package/__fixtures__/6.codeSamples/output.json +293 -0
  21. package/__tests__/oapSchemaToReferences.test.ts +82 -0
  22. package/__tests__/utils.ts +81 -0
  23. package/dist/index.cjs +2154 -0
  24. package/dist/index.cjs.map +1 -0
  25. package/dist/index.d.cts +40 -0
  26. package/dist/index.d.ts +40 -0
  27. package/dist/index.js +2119 -0
  28. package/dist/index.js.map +1 -0
  29. package/examples/basic/index.ts +20 -0
  30. package/examples/basic/index2.ts +36 -0
  31. package/examples/basic/openapi.yaml +124 -0
  32. package/examples/dist/index.cjs +2 -0
  33. package/examples/dist/index.cjs.map +1 -0
  34. package/examples/dist/index.d.cts +2 -0
  35. package/examples/dist/index.d.ts +2 -0
  36. package/examples/dist/index.js +2 -0
  37. package/examples/dist/index.js.map +1 -0
  38. package/examples/semi/index.ts +16 -0
  39. package/examples/semi/openapi.yaml +365 -0
  40. package/examples/semi/references.json +500 -0
  41. package/examples/webhooks/index.ts +16 -0
  42. package/examples/webhooks/openapi.yaml +248 -0
  43. package/examples/webhooks/references.json +895 -0
  44. package/index.ts +12 -0
  45. package/package.json +31 -0
  46. package/src/const.ts +14 -0
  47. package/src/converters/oas-componentSchemas.ts +205 -0
  48. package/src/converters/oas-examples.ts +530 -0
  49. package/src/converters/oas-parameters.ts +41 -0
  50. package/src/converters/oas-paths.ts +354 -0
  51. package/src/converters/oas-requestBody.ts +57 -0
  52. package/src/converters/oas-responses.ts +76 -0
  53. package/src/converters/oas-schema.ts +141 -0
  54. package/src/index.ts +21 -0
  55. package/src/oas-core.ts +579 -0
  56. package/src/types.ts +18 -0
  57. package/src/utils.ts +157 -0
  58. package/src/xdocs/index.ts +18 -0
  59. package/src/xdocs/pluginSidebar.ts +580 -0
  60. package/src/xdocs/types.ts +26 -0
  61. package/tsconfig.json +18 -0
  62. package/tsup.config.ts +19 -0
  63. package/tsup.examples-config.ts +30 -0
  64. package/vitest.config.ts +7 -0
@@ -0,0 +1,1919 @@
1
+ [
2
+ {
3
+ "title": "Returns a list of users",
4
+ "canonical": "returns-a-list-of-users",
5
+ "description": "Optional extended description in CommonMark or HTML.",
6
+ "type": "rest_get",
7
+ "category": "rest",
8
+ "context": {
9
+ "method": "get",
10
+ "path": "/users",
11
+ "fullPath": "http:/api.example.com/v1/users",
12
+ "group": [
13
+ ""
14
+ ],
15
+ "scopes": []
16
+ },
17
+ "examples": {
18
+ "groups": [
19
+ {
20
+ "description": "Example request",
21
+ "examples": [
22
+ {
23
+ "codeblock": {
24
+ "tabs": [
25
+ {
26
+ "title": "shell",
27
+ "language": "shell",
28
+ "code": "curl --request \\\n --url 'http://api.example.com/v1?limit=20&offset=0' \\\n --header 'accept: application/json'"
29
+ },
30
+ {
31
+ "title": "javascript",
32
+ "language": "javascript",
33
+ "code": "const options = {method: '', headers: {accept: 'application/json'}};\n\nfetch('http://api.example.com/v1?limit=20&offset=0', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
34
+ },
35
+ {
36
+ "title": "python",
37
+ "language": "python",
38
+ "code": "import requests\n\nurl = \"http://api.example.com/v1?limit=20&offset=0\"\n\nheaders = {\"accept\": \"application/json\"}\n\nresponse = requests.request(\"\", url, headers=headers)\n\nprint(response.text)"
39
+ },
40
+ {
41
+ "title": "go",
42
+ "language": "go",
43
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1?limit=20&offset=0\"\n\n\treq, _ := http.NewRequest(\"\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
44
+ }
45
+ ]
46
+ }
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "description": "Example response",
52
+ "examples": [
53
+ {
54
+ "codeblock": {
55
+ "title": "200",
56
+ "tabs": [
57
+ {
58
+ "title": "application/json",
59
+ "language": "json",
60
+ "code": "[\n {\n \"id\": 0,\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\",\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n }\n]"
61
+ }
62
+ ]
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ },
69
+ "definitions": [
70
+ {
71
+ "title": "Query parameters",
72
+ "properties": [
73
+ {
74
+ "name": "limit",
75
+ "type": "integer",
76
+ "description": "Maximum number of items to return",
77
+ "meta": [
78
+ {
79
+ "name": "defaults",
80
+ "value": 20
81
+ },
82
+ {
83
+ "name": "required",
84
+ "value": "true"
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "name": "offset",
90
+ "type": "integer",
91
+ "description": "Number of items to skip",
92
+ "meta": [
93
+ {
94
+ "name": "defaults",
95
+ "value": 0
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ "title": "Response",
103
+ "variants": [
104
+ {
105
+ "title": "200",
106
+ "description": "A JSON array of users",
107
+ "properties": [],
108
+ "rootProperty": {
109
+ "type": "$$array",
110
+ "properties": [
111
+ {
112
+ "name": "id",
113
+ "type": "integer",
114
+ "description": "",
115
+ "meta": [
116
+ {
117
+ "name": "required",
118
+ "value": "true"
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "name": "username",
124
+ "type": "string",
125
+ "description": "",
126
+ "meta": [
127
+ {
128
+ "name": "required",
129
+ "value": "true"
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "name": "email",
135
+ "type": "string",
136
+ "description": "",
137
+ "meta": []
138
+ },
139
+ {
140
+ "name": "status",
141
+ "type": "$$enum",
142
+ "description": "",
143
+ "meta": [
144
+ {
145
+ "name": "enum-type",
146
+ "value": "string"
147
+ }
148
+ ],
149
+ "properties": [
150
+ {
151
+ "name": "active",
152
+ "type": "string",
153
+ "description": "",
154
+ "meta": []
155
+ },
156
+ {
157
+ "name": "inactive",
158
+ "type": "string",
159
+ "description": "",
160
+ "meta": []
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "name": "createdAt",
166
+ "type": "string",
167
+ "description": "",
168
+ "meta": []
169
+ },
170
+ {
171
+ "name": "updatedAt",
172
+ "type": "string",
173
+ "description": "",
174
+ "meta": []
175
+ }
176
+ ]
177
+ },
178
+ "meta": [
179
+ {
180
+ "name": "status",
181
+ "value": "200"
182
+ },
183
+ {
184
+ "name": "contentType",
185
+ "value": "application/json"
186
+ },
187
+ {
188
+ "name": "definitionDescription",
189
+ "value": ""
190
+ }
191
+ ]
192
+ }
193
+ ],
194
+ "properties": []
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ "title": "Creates a new user",
200
+ "canonical": "creates-a-new-user",
201
+ "description": "Creates a new user",
202
+ "type": "rest_post",
203
+ "category": "rest",
204
+ "context": {
205
+ "method": "post",
206
+ "path": "/users",
207
+ "fullPath": "http:/api.example.com/v1/users",
208
+ "group": [
209
+ ""
210
+ ],
211
+ "scopes": []
212
+ },
213
+ "examples": {
214
+ "groups": [
215
+ {
216
+ "description": "Example request",
217
+ "examples": [
218
+ {
219
+ "codeblock": {
220
+ "tabs": [
221
+ {
222
+ "title": "shell",
223
+ "language": "shell",
224
+ "code": "curl --request \\\n --url http://api.example.com/v1 \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\"\n}\n'"
225
+ },
226
+ {
227
+ "title": "javascript",
228
+ "language": "javascript",
229
+ "code": "const options = {\n method: '',\n headers: {accept: 'application/json', 'content-type': 'application/json'},\n body: JSON.stringify({username: 'string', email: 'user@example.com', status: 'active'})\n};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
230
+ },
231
+ {
232
+ "title": "python",
233
+ "language": "python",
234
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\npayload = {\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\"\n}\nheaders = {\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"\", url, json=payload, headers=headers)\n\nprint(response.text)"
235
+ },
236
+ {
237
+ "title": "go",
238
+ "language": "go",
239
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\tpayload := strings.NewReader(\"{\\\"username\\\":\\\"string\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"status\\\":\\\"active\\\"}\")\n\n\treq, _ := http.NewRequest(\"\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
240
+ }
241
+ ]
242
+ }
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ "description": "Example response",
248
+ "examples": [
249
+ {
250
+ "codeblock": {
251
+ "title": "201",
252
+ "tabs": [
253
+ {
254
+ "title": "application/json",
255
+ "language": "json",
256
+ "code": "{\n \"id\": 0,\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\",\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
257
+ }
258
+ ]
259
+ }
260
+ }
261
+ ]
262
+ }
263
+ ]
264
+ },
265
+ "definitions": [
266
+ {
267
+ "title": "Request body",
268
+ "variants": [
269
+ {
270
+ "title": "application/json",
271
+ "description": "",
272
+ "properties": [
273
+ {
274
+ "name": "username",
275
+ "type": "string",
276
+ "description": "",
277
+ "meta": [
278
+ {
279
+ "name": "required",
280
+ "value": "true"
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ "name": "email",
286
+ "type": "string",
287
+ "description": "",
288
+ "meta": [
289
+ {
290
+ "name": "required",
291
+ "value": "true"
292
+ }
293
+ ]
294
+ },
295
+ {
296
+ "name": "status",
297
+ "type": "$$enum",
298
+ "description": "",
299
+ "meta": [
300
+ {
301
+ "name": "enum-type",
302
+ "value": "string"
303
+ }
304
+ ],
305
+ "properties": [
306
+ {
307
+ "name": "active",
308
+ "type": "string",
309
+ "description": "",
310
+ "meta": []
311
+ },
312
+ {
313
+ "name": "inactive",
314
+ "type": "string",
315
+ "description": "",
316
+ "meta": []
317
+ }
318
+ ]
319
+ }
320
+ ],
321
+ "meta": [
322
+ {
323
+ "name": "contentType",
324
+ "value": "application/json"
325
+ },
326
+ {
327
+ "name": "required",
328
+ "value": "true"
329
+ }
330
+ ]
331
+ }
332
+ ],
333
+ "properties": [],
334
+ "meta": [
335
+ {
336
+ "name": "required",
337
+ "value": "true"
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ "title": "Response",
343
+ "variants": [
344
+ {
345
+ "title": "201",
346
+ "description": "User created successfully",
347
+ "properties": [
348
+ {
349
+ "name": "id",
350
+ "type": "integer",
351
+ "description": "",
352
+ "meta": [
353
+ {
354
+ "name": "required",
355
+ "value": "true"
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ "name": "username",
361
+ "type": "string",
362
+ "description": "",
363
+ "meta": [
364
+ {
365
+ "name": "required",
366
+ "value": "true"
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "name": "email",
372
+ "type": "string",
373
+ "description": "",
374
+ "meta": []
375
+ },
376
+ {
377
+ "name": "status",
378
+ "type": "$$enum",
379
+ "description": "",
380
+ "meta": [
381
+ {
382
+ "name": "enum-type",
383
+ "value": "string"
384
+ }
385
+ ],
386
+ "properties": [
387
+ {
388
+ "name": "active",
389
+ "type": "string",
390
+ "description": "",
391
+ "meta": []
392
+ },
393
+ {
394
+ "name": "inactive",
395
+ "type": "string",
396
+ "description": "",
397
+ "meta": []
398
+ }
399
+ ]
400
+ },
401
+ {
402
+ "name": "createdAt",
403
+ "type": "string",
404
+ "description": "",
405
+ "meta": []
406
+ },
407
+ {
408
+ "name": "updatedAt",
409
+ "type": "string",
410
+ "description": "",
411
+ "meta": []
412
+ }
413
+ ],
414
+ "meta": [
415
+ {
416
+ "name": "status",
417
+ "value": "201"
418
+ },
419
+ {
420
+ "name": "contentType",
421
+ "value": "application/json"
422
+ },
423
+ {
424
+ "name": "definitionDescription",
425
+ "value": ""
426
+ }
427
+ ]
428
+ }
429
+ ],
430
+ "properties": []
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "title": "Get user by ID",
436
+ "canonical": "get-user-by-id",
437
+ "description": "Get user by ID",
438
+ "type": "rest_get",
439
+ "category": "rest",
440
+ "context": {
441
+ "method": "get",
442
+ "path": "/users/{userId}",
443
+ "fullPath": "http:/api.example.com/v1/users/{userId}",
444
+ "group": [
445
+ ""
446
+ ],
447
+ "scopes": []
448
+ },
449
+ "examples": {
450
+ "groups": [
451
+ {
452
+ "description": "Example request",
453
+ "examples": [
454
+ {
455
+ "codeblock": {
456
+ "tabs": [
457
+ {
458
+ "title": "shell",
459
+ "language": "shell",
460
+ "code": "curl --request \\\n --url http://api.example.com/v1 \\\n --header 'accept: application/json'"
461
+ },
462
+ {
463
+ "title": "javascript",
464
+ "language": "javascript",
465
+ "code": "const options = {method: '', headers: {accept: 'application/json'}};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
466
+ },
467
+ {
468
+ "title": "python",
469
+ "language": "python",
470
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\nheaders = {\"accept\": \"application/json\"}\n\nresponse = requests.request(\"\", url, headers=headers)\n\nprint(response.text)"
471
+ },
472
+ {
473
+ "title": "go",
474
+ "language": "go",
475
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\treq, _ := http.NewRequest(\"\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
476
+ }
477
+ ]
478
+ }
479
+ }
480
+ ]
481
+ },
482
+ {
483
+ "description": "Example response",
484
+ "examples": [
485
+ {
486
+ "codeblock": {
487
+ "title": "200",
488
+ "tabs": [
489
+ {
490
+ "title": "application/json",
491
+ "language": "json",
492
+ "code": "{\n \"id\": 0,\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\",\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
493
+ }
494
+ ]
495
+ }
496
+ }
497
+ ]
498
+ }
499
+ ]
500
+ },
501
+ "definitions": [
502
+ {
503
+ "title": "Response",
504
+ "variants": [
505
+ {
506
+ "title": "200",
507
+ "description": "User details",
508
+ "properties": [
509
+ {
510
+ "name": "id",
511
+ "type": "integer",
512
+ "description": "",
513
+ "meta": [
514
+ {
515
+ "name": "required",
516
+ "value": "true"
517
+ }
518
+ ]
519
+ },
520
+ {
521
+ "name": "username",
522
+ "type": "string",
523
+ "description": "",
524
+ "meta": [
525
+ {
526
+ "name": "required",
527
+ "value": "true"
528
+ }
529
+ ]
530
+ },
531
+ {
532
+ "name": "email",
533
+ "type": "string",
534
+ "description": "",
535
+ "meta": []
536
+ },
537
+ {
538
+ "name": "status",
539
+ "type": "$$enum",
540
+ "description": "",
541
+ "meta": [
542
+ {
543
+ "name": "enum-type",
544
+ "value": "string"
545
+ }
546
+ ],
547
+ "properties": [
548
+ {
549
+ "name": "active",
550
+ "type": "string",
551
+ "description": "",
552
+ "meta": []
553
+ },
554
+ {
555
+ "name": "inactive",
556
+ "type": "string",
557
+ "description": "",
558
+ "meta": []
559
+ }
560
+ ]
561
+ },
562
+ {
563
+ "name": "createdAt",
564
+ "type": "string",
565
+ "description": "",
566
+ "meta": []
567
+ },
568
+ {
569
+ "name": "updatedAt",
570
+ "type": "string",
571
+ "description": "",
572
+ "meta": []
573
+ }
574
+ ],
575
+ "meta": [
576
+ {
577
+ "name": "status",
578
+ "value": "200"
579
+ },
580
+ {
581
+ "name": "contentType",
582
+ "value": "application/json"
583
+ },
584
+ {
585
+ "name": "definitionDescription",
586
+ "value": ""
587
+ }
588
+ ]
589
+ },
590
+ {
591
+ "title": "404",
592
+ "description": "User not found",
593
+ "properties": [],
594
+ "meta": [
595
+ {
596
+ "name": "status",
597
+ "value": "404"
598
+ }
599
+ ]
600
+ }
601
+ ],
602
+ "properties": []
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ "title": "Update user (full update)",
608
+ "canonical": "update-user-full-update",
609
+ "description": "Update user (full update)",
610
+ "type": "rest_put",
611
+ "category": "rest",
612
+ "context": {
613
+ "method": "put",
614
+ "path": "/users/{userId}",
615
+ "fullPath": "http:/api.example.com/v1/users/{userId}",
616
+ "group": [
617
+ ""
618
+ ],
619
+ "scopes": []
620
+ },
621
+ "examples": {
622
+ "groups": [
623
+ {
624
+ "description": "Example request",
625
+ "examples": [
626
+ {
627
+ "codeblock": {
628
+ "tabs": [
629
+ {
630
+ "title": "shell",
631
+ "language": "shell",
632
+ "code": "curl --request \\\n --url http://api.example.com/v1 \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\"\n}\n'"
633
+ },
634
+ {
635
+ "title": "javascript",
636
+ "language": "javascript",
637
+ "code": "const options = {\n method: '',\n headers: {accept: 'application/json', 'content-type': 'application/json'},\n body: JSON.stringify({username: 'string', email: 'user@example.com', status: 'active'})\n};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
638
+ },
639
+ {
640
+ "title": "python",
641
+ "language": "python",
642
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\npayload = {\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\"\n}\nheaders = {\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"\", url, json=payload, headers=headers)\n\nprint(response.text)"
643
+ },
644
+ {
645
+ "title": "go",
646
+ "language": "go",
647
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\tpayload := strings.NewReader(\"{\\\"username\\\":\\\"string\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"status\\\":\\\"active\\\"}\")\n\n\treq, _ := http.NewRequest(\"\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
648
+ }
649
+ ]
650
+ }
651
+ }
652
+ ]
653
+ },
654
+ {
655
+ "description": "Example response",
656
+ "examples": [
657
+ {
658
+ "codeblock": {
659
+ "title": "200",
660
+ "tabs": [
661
+ {
662
+ "title": "application/json",
663
+ "language": "json",
664
+ "code": "{\n \"id\": 0,\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\",\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
665
+ }
666
+ ]
667
+ }
668
+ }
669
+ ]
670
+ }
671
+ ]
672
+ },
673
+ "definitions": [
674
+ {
675
+ "title": "Request body",
676
+ "variants": [
677
+ {
678
+ "title": "application/json",
679
+ "description": "",
680
+ "properties": [
681
+ {
682
+ "name": "username",
683
+ "type": "string",
684
+ "description": "",
685
+ "meta": [
686
+ {
687
+ "name": "required",
688
+ "value": "true"
689
+ }
690
+ ]
691
+ },
692
+ {
693
+ "name": "email",
694
+ "type": "string",
695
+ "description": "",
696
+ "meta": [
697
+ {
698
+ "name": "required",
699
+ "value": "true"
700
+ }
701
+ ]
702
+ },
703
+ {
704
+ "name": "status",
705
+ "type": "$$enum",
706
+ "description": "",
707
+ "meta": [
708
+ {
709
+ "name": "enum-type",
710
+ "value": "string"
711
+ }
712
+ ],
713
+ "properties": [
714
+ {
715
+ "name": "active",
716
+ "type": "string",
717
+ "description": "",
718
+ "meta": []
719
+ },
720
+ {
721
+ "name": "inactive",
722
+ "type": "string",
723
+ "description": "",
724
+ "meta": []
725
+ }
726
+ ]
727
+ }
728
+ ],
729
+ "meta": [
730
+ {
731
+ "name": "contentType",
732
+ "value": "application/json"
733
+ },
734
+ {
735
+ "name": "required",
736
+ "value": "true"
737
+ }
738
+ ]
739
+ }
740
+ ],
741
+ "properties": [],
742
+ "meta": [
743
+ {
744
+ "name": "required",
745
+ "value": "true"
746
+ }
747
+ ]
748
+ },
749
+ {
750
+ "title": "Response",
751
+ "variants": [
752
+ {
753
+ "title": "200",
754
+ "description": "User updated successfully",
755
+ "properties": [
756
+ {
757
+ "name": "id",
758
+ "type": "integer",
759
+ "description": "",
760
+ "meta": [
761
+ {
762
+ "name": "required",
763
+ "value": "true"
764
+ }
765
+ ]
766
+ },
767
+ {
768
+ "name": "username",
769
+ "type": "string",
770
+ "description": "",
771
+ "meta": [
772
+ {
773
+ "name": "required",
774
+ "value": "true"
775
+ }
776
+ ]
777
+ },
778
+ {
779
+ "name": "email",
780
+ "type": "string",
781
+ "description": "",
782
+ "meta": []
783
+ },
784
+ {
785
+ "name": "status",
786
+ "type": "$$enum",
787
+ "description": "",
788
+ "meta": [
789
+ {
790
+ "name": "enum-type",
791
+ "value": "string"
792
+ }
793
+ ],
794
+ "properties": [
795
+ {
796
+ "name": "active",
797
+ "type": "string",
798
+ "description": "",
799
+ "meta": []
800
+ },
801
+ {
802
+ "name": "inactive",
803
+ "type": "string",
804
+ "description": "",
805
+ "meta": []
806
+ }
807
+ ]
808
+ },
809
+ {
810
+ "name": "createdAt",
811
+ "type": "string",
812
+ "description": "",
813
+ "meta": []
814
+ },
815
+ {
816
+ "name": "updatedAt",
817
+ "type": "string",
818
+ "description": "",
819
+ "meta": []
820
+ }
821
+ ],
822
+ "meta": [
823
+ {
824
+ "name": "status",
825
+ "value": "200"
826
+ },
827
+ {
828
+ "name": "contentType",
829
+ "value": "application/json"
830
+ },
831
+ {
832
+ "name": "definitionDescription",
833
+ "value": ""
834
+ }
835
+ ]
836
+ }
837
+ ],
838
+ "properties": []
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "title": "Update user (partial update)",
844
+ "canonical": "update-user-partial-update",
845
+ "description": "Update user (partial update)",
846
+ "type": "rest_patch",
847
+ "category": "rest",
848
+ "context": {
849
+ "method": "patch",
850
+ "path": "/users/{userId}",
851
+ "fullPath": "http:/api.example.com/v1/users/{userId}",
852
+ "group": [
853
+ ""
854
+ ],
855
+ "scopes": []
856
+ },
857
+ "examples": {
858
+ "groups": [
859
+ {
860
+ "description": "Example request",
861
+ "examples": [
862
+ {
863
+ "codeblock": {
864
+ "tabs": [
865
+ {
866
+ "title": "shell",
867
+ "language": "shell",
868
+ "code": "curl --request \\\n --url http://api.example.com/v1 \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\"\n}\n'"
869
+ },
870
+ {
871
+ "title": "javascript",
872
+ "language": "javascript",
873
+ "code": "const options = {\n method: '',\n headers: {accept: 'application/json', 'content-type': 'application/json'},\n body: JSON.stringify({username: 'string', email: 'user@example.com', status: 'active'})\n};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
874
+ },
875
+ {
876
+ "title": "python",
877
+ "language": "python",
878
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\npayload = {\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\"\n}\nheaders = {\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"\", url, json=payload, headers=headers)\n\nprint(response.text)"
879
+ },
880
+ {
881
+ "title": "go",
882
+ "language": "go",
883
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\tpayload := strings.NewReader(\"{\\\"username\\\":\\\"string\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"status\\\":\\\"active\\\"}\")\n\n\treq, _ := http.NewRequest(\"\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
884
+ }
885
+ ]
886
+ }
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ "description": "Example response",
892
+ "examples": [
893
+ {
894
+ "codeblock": {
895
+ "title": "200",
896
+ "tabs": [
897
+ {
898
+ "title": "application/json",
899
+ "language": "json",
900
+ "code": "{\n \"id\": 0,\n \"username\": \"string\",\n \"email\": \"user@example.com\",\n \"status\": \"active\",\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
901
+ }
902
+ ]
903
+ }
904
+ }
905
+ ]
906
+ }
907
+ ]
908
+ },
909
+ "definitions": [
910
+ {
911
+ "title": "Request body",
912
+ "variants": [
913
+ {
914
+ "title": "application/json",
915
+ "description": "",
916
+ "properties": [
917
+ {
918
+ "name": "username",
919
+ "type": "string",
920
+ "description": "",
921
+ "meta": []
922
+ },
923
+ {
924
+ "name": "email",
925
+ "type": "string",
926
+ "description": "",
927
+ "meta": []
928
+ },
929
+ {
930
+ "name": "status",
931
+ "type": "$$enum",
932
+ "description": "",
933
+ "meta": [
934
+ {
935
+ "name": "enum-type",
936
+ "value": "string"
937
+ }
938
+ ],
939
+ "properties": [
940
+ {
941
+ "name": "active",
942
+ "type": "string",
943
+ "description": "",
944
+ "meta": []
945
+ },
946
+ {
947
+ "name": "inactive",
948
+ "type": "string",
949
+ "description": "",
950
+ "meta": []
951
+ }
952
+ ]
953
+ }
954
+ ],
955
+ "meta": [
956
+ {
957
+ "name": "contentType",
958
+ "value": "application/json"
959
+ }
960
+ ]
961
+ }
962
+ ],
963
+ "properties": [],
964
+ "meta": [
965
+ {
966
+ "name": "required",
967
+ "value": "true"
968
+ }
969
+ ]
970
+ },
971
+ {
972
+ "title": "Response",
973
+ "variants": [
974
+ {
975
+ "title": "200",
976
+ "description": "User updated successfully",
977
+ "properties": [
978
+ {
979
+ "name": "id",
980
+ "type": "integer",
981
+ "description": "",
982
+ "meta": [
983
+ {
984
+ "name": "required",
985
+ "value": "true"
986
+ }
987
+ ]
988
+ },
989
+ {
990
+ "name": "username",
991
+ "type": "string",
992
+ "description": "",
993
+ "meta": [
994
+ {
995
+ "name": "required",
996
+ "value": "true"
997
+ }
998
+ ]
999
+ },
1000
+ {
1001
+ "name": "email",
1002
+ "type": "string",
1003
+ "description": "",
1004
+ "meta": []
1005
+ },
1006
+ {
1007
+ "name": "status",
1008
+ "type": "$$enum",
1009
+ "description": "",
1010
+ "meta": [
1011
+ {
1012
+ "name": "enum-type",
1013
+ "value": "string"
1014
+ }
1015
+ ],
1016
+ "properties": [
1017
+ {
1018
+ "name": "active",
1019
+ "type": "string",
1020
+ "description": "",
1021
+ "meta": []
1022
+ },
1023
+ {
1024
+ "name": "inactive",
1025
+ "type": "string",
1026
+ "description": "",
1027
+ "meta": []
1028
+ }
1029
+ ]
1030
+ },
1031
+ {
1032
+ "name": "createdAt",
1033
+ "type": "string",
1034
+ "description": "",
1035
+ "meta": []
1036
+ },
1037
+ {
1038
+ "name": "updatedAt",
1039
+ "type": "string",
1040
+ "description": "",
1041
+ "meta": []
1042
+ }
1043
+ ],
1044
+ "meta": [
1045
+ {
1046
+ "name": "status",
1047
+ "value": "200"
1048
+ },
1049
+ {
1050
+ "name": "contentType",
1051
+ "value": "application/json"
1052
+ },
1053
+ {
1054
+ "name": "definitionDescription",
1055
+ "value": ""
1056
+ }
1057
+ ]
1058
+ }
1059
+ ],
1060
+ "properties": []
1061
+ }
1062
+ ]
1063
+ },
1064
+ {
1065
+ "title": "Delete user",
1066
+ "canonical": "delete-user",
1067
+ "description": "Delete user",
1068
+ "type": "rest_delete",
1069
+ "category": "rest",
1070
+ "context": {
1071
+ "method": "delete",
1072
+ "path": "/users/{userId}",
1073
+ "fullPath": "http:/api.example.com/v1/users/{userId}",
1074
+ "group": [
1075
+ ""
1076
+ ],
1077
+ "scopes": []
1078
+ },
1079
+ "examples": {
1080
+ "groups": [
1081
+ {
1082
+ "description": "Example request",
1083
+ "examples": [
1084
+ {
1085
+ "codeblock": {
1086
+ "tabs": [
1087
+ {
1088
+ "title": "shell",
1089
+ "language": "shell",
1090
+ "code": "curl --request \\\n --url http://api.example.com/v1"
1091
+ },
1092
+ {
1093
+ "title": "javascript",
1094
+ "language": "javascript",
1095
+ "code": "const options = {method: ''};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
1096
+ },
1097
+ {
1098
+ "title": "python",
1099
+ "language": "python",
1100
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\nresponse = requests.request(\"\", url)\n\nprint(response.text)"
1101
+ },
1102
+ {
1103
+ "title": "go",
1104
+ "language": "go",
1105
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\treq, _ := http.NewRequest(\"\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
1106
+ }
1107
+ ]
1108
+ }
1109
+ }
1110
+ ]
1111
+ }
1112
+ ]
1113
+ },
1114
+ "definitions": [
1115
+ {
1116
+ "title": "Response",
1117
+ "variants": [
1118
+ {
1119
+ "title": "204",
1120
+ "description": "User deleted successfully",
1121
+ "properties": [],
1122
+ "meta": [
1123
+ {
1124
+ "name": "status",
1125
+ "value": "204"
1126
+ }
1127
+ ]
1128
+ }
1129
+ ],
1130
+ "properties": []
1131
+ }
1132
+ ]
1133
+ },
1134
+ {
1135
+ "title": "Get user's posts",
1136
+ "canonical": "get-users-posts",
1137
+ "description": "Get user's posts",
1138
+ "type": "rest_get",
1139
+ "category": "rest",
1140
+ "context": {
1141
+ "method": "get",
1142
+ "path": "/users/{userId}/posts",
1143
+ "fullPath": "http:/api.example.com/v1/users/{userId}/posts",
1144
+ "group": [
1145
+ ""
1146
+ ],
1147
+ "scopes": []
1148
+ },
1149
+ "examples": {
1150
+ "groups": [
1151
+ {
1152
+ "description": "Example request",
1153
+ "examples": [
1154
+ {
1155
+ "codeblock": {
1156
+ "tabs": [
1157
+ {
1158
+ "title": "shell",
1159
+ "language": "shell",
1160
+ "code": "curl --request \\\n --url http://api.example.com/v1 \\\n --header 'accept: application/json'"
1161
+ },
1162
+ {
1163
+ "title": "javascript",
1164
+ "language": "javascript",
1165
+ "code": "const options = {method: '', headers: {accept: 'application/json'}};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
1166
+ },
1167
+ {
1168
+ "title": "python",
1169
+ "language": "python",
1170
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\nheaders = {\"accept\": \"application/json\"}\n\nresponse = requests.request(\"\", url, headers=headers)\n\nprint(response.text)"
1171
+ },
1172
+ {
1173
+ "title": "go",
1174
+ "language": "go",
1175
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\treq, _ := http.NewRequest(\"\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
1176
+ }
1177
+ ]
1178
+ }
1179
+ }
1180
+ ]
1181
+ },
1182
+ {
1183
+ "description": "Example response",
1184
+ "examples": [
1185
+ {
1186
+ "codeblock": {
1187
+ "title": "200",
1188
+ "tabs": [
1189
+ {
1190
+ "title": "application/json",
1191
+ "language": "json",
1192
+ "code": "[\n {\n \"id\": 0,\n \"title\": \"string\",\n \"content\": \"string\",\n \"userId\": 0,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n }\n]"
1193
+ }
1194
+ ]
1195
+ }
1196
+ }
1197
+ ]
1198
+ }
1199
+ ]
1200
+ },
1201
+ "definitions": [
1202
+ {
1203
+ "title": "Response",
1204
+ "variants": [
1205
+ {
1206
+ "title": "200",
1207
+ "description": "List of user's posts",
1208
+ "properties": [],
1209
+ "rootProperty": {
1210
+ "type": "$$array",
1211
+ "properties": [
1212
+ {
1213
+ "name": "id",
1214
+ "type": "integer",
1215
+ "description": "",
1216
+ "meta": [
1217
+ {
1218
+ "name": "required",
1219
+ "value": "true"
1220
+ }
1221
+ ]
1222
+ },
1223
+ {
1224
+ "name": "title",
1225
+ "type": "string",
1226
+ "description": "",
1227
+ "meta": [
1228
+ {
1229
+ "name": "required",
1230
+ "value": "true"
1231
+ }
1232
+ ]
1233
+ },
1234
+ {
1235
+ "name": "content",
1236
+ "type": "string",
1237
+ "description": "",
1238
+ "meta": [
1239
+ {
1240
+ "name": "required",
1241
+ "value": "true"
1242
+ }
1243
+ ]
1244
+ },
1245
+ {
1246
+ "name": "userId",
1247
+ "type": "integer",
1248
+ "description": "",
1249
+ "meta": [
1250
+ {
1251
+ "name": "required",
1252
+ "value": "true"
1253
+ }
1254
+ ]
1255
+ },
1256
+ {
1257
+ "name": "createdAt",
1258
+ "type": "string",
1259
+ "description": "",
1260
+ "meta": []
1261
+ },
1262
+ {
1263
+ "name": "updatedAt",
1264
+ "type": "string",
1265
+ "description": "",
1266
+ "meta": []
1267
+ }
1268
+ ]
1269
+ },
1270
+ "meta": [
1271
+ {
1272
+ "name": "status",
1273
+ "value": "200"
1274
+ },
1275
+ {
1276
+ "name": "contentType",
1277
+ "value": "application/json"
1278
+ },
1279
+ {
1280
+ "name": "definitionDescription",
1281
+ "value": ""
1282
+ }
1283
+ ]
1284
+ }
1285
+ ],
1286
+ "properties": []
1287
+ }
1288
+ ]
1289
+ },
1290
+ {
1291
+ "title": "Create a new post for user",
1292
+ "canonical": "create-a-new-post-for-user",
1293
+ "description": "Create a new post for user",
1294
+ "type": "rest_post",
1295
+ "category": "rest",
1296
+ "context": {
1297
+ "method": "post",
1298
+ "path": "/users/{userId}/posts",
1299
+ "fullPath": "http:/api.example.com/v1/users/{userId}/posts",
1300
+ "group": [
1301
+ ""
1302
+ ],
1303
+ "scopes": []
1304
+ },
1305
+ "examples": {
1306
+ "groups": [
1307
+ {
1308
+ "description": "Example request",
1309
+ "examples": [
1310
+ {
1311
+ "codeblock": {
1312
+ "tabs": [
1313
+ {
1314
+ "title": "shell",
1315
+ "language": "shell",
1316
+ "code": "curl --request \\\n --url http://api.example.com/v1 \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"title\": \"string\",\n \"content\": \"string\"\n}\n'"
1317
+ },
1318
+ {
1319
+ "title": "javascript",
1320
+ "language": "javascript",
1321
+ "code": "const options = {\n method: '',\n headers: {accept: 'application/json', 'content-type': 'application/json'},\n body: JSON.stringify({title: 'string', content: 'string'})\n};\n\nfetch('http://api.example.com/v1', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
1322
+ },
1323
+ {
1324
+ "title": "python",
1325
+ "language": "python",
1326
+ "code": "import requests\n\nurl = \"http://api.example.com/v1\"\n\npayload = {\n \"title\": \"string\",\n \"content\": \"string\"\n}\nheaders = {\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.request(\"\", url, json=payload, headers=headers)\n\nprint(response.text)"
1327
+ },
1328
+ {
1329
+ "title": "go",
1330
+ "language": "go",
1331
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1\"\n\n\tpayload := strings.NewReader(\"{\\\"title\\\":\\\"string\\\",\\\"content\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
1332
+ }
1333
+ ]
1334
+ }
1335
+ }
1336
+ ]
1337
+ },
1338
+ {
1339
+ "description": "Example response",
1340
+ "examples": [
1341
+ {
1342
+ "codeblock": {
1343
+ "title": "201",
1344
+ "tabs": [
1345
+ {
1346
+ "title": "application/json",
1347
+ "language": "json",
1348
+ "code": "{\n \"id\": 0,\n \"title\": \"string\",\n \"content\": \"string\",\n \"userId\": 0,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
1349
+ }
1350
+ ]
1351
+ }
1352
+ }
1353
+ ]
1354
+ }
1355
+ ]
1356
+ },
1357
+ "definitions": [
1358
+ {
1359
+ "title": "Request body",
1360
+ "variants": [
1361
+ {
1362
+ "title": "application/json",
1363
+ "description": "",
1364
+ "properties": [
1365
+ {
1366
+ "name": "title",
1367
+ "type": "string",
1368
+ "description": "",
1369
+ "meta": [
1370
+ {
1371
+ "name": "required",
1372
+ "value": "true"
1373
+ }
1374
+ ]
1375
+ },
1376
+ {
1377
+ "name": "content",
1378
+ "type": "string",
1379
+ "description": "",
1380
+ "meta": [
1381
+ {
1382
+ "name": "required",
1383
+ "value": "true"
1384
+ }
1385
+ ]
1386
+ }
1387
+ ],
1388
+ "meta": [
1389
+ {
1390
+ "name": "contentType",
1391
+ "value": "application/json"
1392
+ },
1393
+ {
1394
+ "name": "required",
1395
+ "value": "true"
1396
+ }
1397
+ ]
1398
+ }
1399
+ ],
1400
+ "properties": [],
1401
+ "meta": [
1402
+ {
1403
+ "name": "required",
1404
+ "value": "true"
1405
+ }
1406
+ ]
1407
+ },
1408
+ {
1409
+ "title": "Response",
1410
+ "variants": [
1411
+ {
1412
+ "title": "201",
1413
+ "description": "Post created successfully",
1414
+ "properties": [
1415
+ {
1416
+ "name": "id",
1417
+ "type": "integer",
1418
+ "description": "",
1419
+ "meta": [
1420
+ {
1421
+ "name": "required",
1422
+ "value": "true"
1423
+ }
1424
+ ]
1425
+ },
1426
+ {
1427
+ "name": "title",
1428
+ "type": "string",
1429
+ "description": "",
1430
+ "meta": [
1431
+ {
1432
+ "name": "required",
1433
+ "value": "true"
1434
+ }
1435
+ ]
1436
+ },
1437
+ {
1438
+ "name": "content",
1439
+ "type": "string",
1440
+ "description": "",
1441
+ "meta": [
1442
+ {
1443
+ "name": "required",
1444
+ "value": "true"
1445
+ }
1446
+ ]
1447
+ },
1448
+ {
1449
+ "name": "userId",
1450
+ "type": "integer",
1451
+ "description": "",
1452
+ "meta": [
1453
+ {
1454
+ "name": "required",
1455
+ "value": "true"
1456
+ }
1457
+ ]
1458
+ },
1459
+ {
1460
+ "name": "createdAt",
1461
+ "type": "string",
1462
+ "description": "",
1463
+ "meta": []
1464
+ },
1465
+ {
1466
+ "name": "updatedAt",
1467
+ "type": "string",
1468
+ "description": "",
1469
+ "meta": []
1470
+ }
1471
+ ],
1472
+ "meta": [
1473
+ {
1474
+ "name": "status",
1475
+ "value": "201"
1476
+ },
1477
+ {
1478
+ "name": "contentType",
1479
+ "value": "application/json"
1480
+ },
1481
+ {
1482
+ "name": "definitionDescription",
1483
+ "value": ""
1484
+ }
1485
+ ]
1486
+ }
1487
+ ],
1488
+ "properties": []
1489
+ }
1490
+ ]
1491
+ },
1492
+ {
1493
+ "title": "User",
1494
+ "description": "",
1495
+ "canonical": "objects/User",
1496
+ "definitions": [
1497
+ {
1498
+ "title": "User",
1499
+ "properties": [
1500
+ {
1501
+ "name": "id",
1502
+ "type": "integer",
1503
+ "description": "",
1504
+ "meta": [
1505
+ {
1506
+ "name": "required",
1507
+ "value": "true"
1508
+ }
1509
+ ]
1510
+ },
1511
+ {
1512
+ "name": "username",
1513
+ "type": "string",
1514
+ "description": "",
1515
+ "meta": [
1516
+ {
1517
+ "name": "required",
1518
+ "value": "true"
1519
+ }
1520
+ ]
1521
+ },
1522
+ {
1523
+ "name": "email",
1524
+ "type": "string",
1525
+ "description": "",
1526
+ "meta": []
1527
+ },
1528
+ {
1529
+ "name": "status",
1530
+ "type": "$$enum",
1531
+ "description": "",
1532
+ "meta": [
1533
+ {
1534
+ "name": "enum-type",
1535
+ "value": "string"
1536
+ }
1537
+ ],
1538
+ "properties": [
1539
+ {
1540
+ "name": "active",
1541
+ "type": "string",
1542
+ "description": "",
1543
+ "meta": []
1544
+ },
1545
+ {
1546
+ "name": "inactive",
1547
+ "type": "string",
1548
+ "description": "",
1549
+ "meta": []
1550
+ }
1551
+ ]
1552
+ },
1553
+ {
1554
+ "name": "createdAt",
1555
+ "type": "string",
1556
+ "description": "",
1557
+ "meta": []
1558
+ },
1559
+ {
1560
+ "name": "updatedAt",
1561
+ "type": "string",
1562
+ "description": "",
1563
+ "meta": []
1564
+ }
1565
+ ],
1566
+ "meta": []
1567
+ }
1568
+ ],
1569
+ "examples": {
1570
+ "groups": [
1571
+ {
1572
+ "description": "Example",
1573
+ "examples": [
1574
+ {
1575
+ "codeblock": {
1576
+ "tabs": [
1577
+ {
1578
+ "title": "json",
1579
+ "language": "json",
1580
+ "code": "{\n \"id\": 0,\n \"username\": \"\",\n \"email\": \"\",\n \"status\": \"\",\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}"
1581
+ }
1582
+ ]
1583
+ }
1584
+ }
1585
+ ]
1586
+ }
1587
+ ]
1588
+ },
1589
+ "type": "rest_component_schema",
1590
+ "context": {
1591
+ "componentSchema": "User",
1592
+ "group": [
1593
+ "Objects"
1594
+ ]
1595
+ }
1596
+ },
1597
+ {
1598
+ "title": "UserInput",
1599
+ "description": "",
1600
+ "canonical": "objects/UserInput",
1601
+ "definitions": [
1602
+ {
1603
+ "title": "UserInput",
1604
+ "properties": [
1605
+ {
1606
+ "name": "username",
1607
+ "type": "string",
1608
+ "description": "",
1609
+ "meta": [
1610
+ {
1611
+ "name": "required",
1612
+ "value": "true"
1613
+ }
1614
+ ]
1615
+ },
1616
+ {
1617
+ "name": "email",
1618
+ "type": "string",
1619
+ "description": "",
1620
+ "meta": [
1621
+ {
1622
+ "name": "required",
1623
+ "value": "true"
1624
+ }
1625
+ ]
1626
+ },
1627
+ {
1628
+ "name": "status",
1629
+ "type": "$$enum",
1630
+ "description": "",
1631
+ "meta": [
1632
+ {
1633
+ "name": "enum-type",
1634
+ "value": "string"
1635
+ }
1636
+ ],
1637
+ "properties": [
1638
+ {
1639
+ "name": "active",
1640
+ "type": "string",
1641
+ "description": "",
1642
+ "meta": []
1643
+ },
1644
+ {
1645
+ "name": "inactive",
1646
+ "type": "string",
1647
+ "description": "",
1648
+ "meta": []
1649
+ }
1650
+ ]
1651
+ }
1652
+ ],
1653
+ "meta": []
1654
+ }
1655
+ ],
1656
+ "examples": {
1657
+ "groups": [
1658
+ {
1659
+ "description": "Example",
1660
+ "examples": [
1661
+ {
1662
+ "codeblock": {
1663
+ "tabs": [
1664
+ {
1665
+ "title": "json",
1666
+ "language": "json",
1667
+ "code": "{\n \"username\": \"\",\n \"email\": \"\",\n \"status\": \"\"\n}"
1668
+ }
1669
+ ]
1670
+ }
1671
+ }
1672
+ ]
1673
+ }
1674
+ ]
1675
+ },
1676
+ "type": "rest_component_schema",
1677
+ "context": {
1678
+ "componentSchema": "UserInput",
1679
+ "group": [
1680
+ "Objects"
1681
+ ]
1682
+ }
1683
+ },
1684
+ {
1685
+ "title": "UserUpdate",
1686
+ "description": "",
1687
+ "canonical": "objects/UserUpdate",
1688
+ "definitions": [
1689
+ {
1690
+ "title": "UserUpdate",
1691
+ "properties": [
1692
+ {
1693
+ "name": "username",
1694
+ "type": "string",
1695
+ "description": "",
1696
+ "meta": []
1697
+ },
1698
+ {
1699
+ "name": "email",
1700
+ "type": "string",
1701
+ "description": "",
1702
+ "meta": []
1703
+ },
1704
+ {
1705
+ "name": "status",
1706
+ "type": "$$enum",
1707
+ "description": "",
1708
+ "meta": [
1709
+ {
1710
+ "name": "enum-type",
1711
+ "value": "string"
1712
+ }
1713
+ ],
1714
+ "properties": [
1715
+ {
1716
+ "name": "active",
1717
+ "type": "string",
1718
+ "description": "",
1719
+ "meta": []
1720
+ },
1721
+ {
1722
+ "name": "inactive",
1723
+ "type": "string",
1724
+ "description": "",
1725
+ "meta": []
1726
+ }
1727
+ ]
1728
+ }
1729
+ ],
1730
+ "meta": []
1731
+ }
1732
+ ],
1733
+ "examples": {
1734
+ "groups": [
1735
+ {
1736
+ "description": "Example",
1737
+ "examples": [
1738
+ {
1739
+ "codeblock": {
1740
+ "tabs": [
1741
+ {
1742
+ "title": "json",
1743
+ "language": "json",
1744
+ "code": "{\n \"username\": \"\",\n \"email\": \"\",\n \"status\": \"\"\n}"
1745
+ }
1746
+ ]
1747
+ }
1748
+ }
1749
+ ]
1750
+ }
1751
+ ]
1752
+ },
1753
+ "type": "rest_component_schema",
1754
+ "context": {
1755
+ "componentSchema": "UserUpdate",
1756
+ "group": [
1757
+ "Objects"
1758
+ ]
1759
+ }
1760
+ },
1761
+ {
1762
+ "title": "Post",
1763
+ "description": "",
1764
+ "canonical": "objects/Post",
1765
+ "definitions": [
1766
+ {
1767
+ "title": "Post",
1768
+ "properties": [
1769
+ {
1770
+ "name": "id",
1771
+ "type": "integer",
1772
+ "description": "",
1773
+ "meta": [
1774
+ {
1775
+ "name": "required",
1776
+ "value": "true"
1777
+ }
1778
+ ]
1779
+ },
1780
+ {
1781
+ "name": "title",
1782
+ "type": "string",
1783
+ "description": "",
1784
+ "meta": [
1785
+ {
1786
+ "name": "required",
1787
+ "value": "true"
1788
+ }
1789
+ ]
1790
+ },
1791
+ {
1792
+ "name": "content",
1793
+ "type": "string",
1794
+ "description": "",
1795
+ "meta": [
1796
+ {
1797
+ "name": "required",
1798
+ "value": "true"
1799
+ }
1800
+ ]
1801
+ },
1802
+ {
1803
+ "name": "userId",
1804
+ "type": "integer",
1805
+ "description": "",
1806
+ "meta": [
1807
+ {
1808
+ "name": "required",
1809
+ "value": "true"
1810
+ }
1811
+ ]
1812
+ },
1813
+ {
1814
+ "name": "createdAt",
1815
+ "type": "string",
1816
+ "description": "",
1817
+ "meta": []
1818
+ },
1819
+ {
1820
+ "name": "updatedAt",
1821
+ "type": "string",
1822
+ "description": "",
1823
+ "meta": []
1824
+ }
1825
+ ],
1826
+ "meta": []
1827
+ }
1828
+ ],
1829
+ "examples": {
1830
+ "groups": [
1831
+ {
1832
+ "description": "Example",
1833
+ "examples": [
1834
+ {
1835
+ "codeblock": {
1836
+ "tabs": [
1837
+ {
1838
+ "title": "json",
1839
+ "language": "json",
1840
+ "code": "{\n \"id\": 0,\n \"title\": \"\",\n \"content\": \"\",\n \"userId\": 0,\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}"
1841
+ }
1842
+ ]
1843
+ }
1844
+ }
1845
+ ]
1846
+ }
1847
+ ]
1848
+ },
1849
+ "type": "rest_component_schema",
1850
+ "context": {
1851
+ "componentSchema": "Post",
1852
+ "group": [
1853
+ "Objects"
1854
+ ]
1855
+ }
1856
+ },
1857
+ {
1858
+ "title": "PostInput",
1859
+ "description": "",
1860
+ "canonical": "objects/PostInput",
1861
+ "definitions": [
1862
+ {
1863
+ "title": "PostInput",
1864
+ "properties": [
1865
+ {
1866
+ "name": "title",
1867
+ "type": "string",
1868
+ "description": "",
1869
+ "meta": [
1870
+ {
1871
+ "name": "required",
1872
+ "value": "true"
1873
+ }
1874
+ ]
1875
+ },
1876
+ {
1877
+ "name": "content",
1878
+ "type": "string",
1879
+ "description": "",
1880
+ "meta": [
1881
+ {
1882
+ "name": "required",
1883
+ "value": "true"
1884
+ }
1885
+ ]
1886
+ }
1887
+ ],
1888
+ "meta": []
1889
+ }
1890
+ ],
1891
+ "examples": {
1892
+ "groups": [
1893
+ {
1894
+ "description": "Example",
1895
+ "examples": [
1896
+ {
1897
+ "codeblock": {
1898
+ "tabs": [
1899
+ {
1900
+ "title": "json",
1901
+ "language": "json",
1902
+ "code": "{\n \"title\": \"\",\n \"content\": \"\"\n}"
1903
+ }
1904
+ ]
1905
+ }
1906
+ }
1907
+ ]
1908
+ }
1909
+ ]
1910
+ },
1911
+ "type": "rest_component_schema",
1912
+ "context": {
1913
+ "componentSchema": "PostInput",
1914
+ "group": [
1915
+ "Objects"
1916
+ ]
1917
+ }
1918
+ }
1919
+ ]