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