@xyd-js/openapi 0.1.0-xyd.10 → 0.1.0-xyd.13

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 (49) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/__fixtures__/-2.complex.openai/input.yaml +39848 -0
  3. package/__fixtures__/-2.complex.openai/output.json +321646 -0
  4. package/__fixtures__/-2.complex.openai/pluginOasOpenai.ts +553 -0
  5. package/__fixtures__/1.basic/input.yaml +226 -0
  6. package/__fixtures__/1.basic/output.json +1919 -0
  7. package/__fixtures__/2.more/input.yaml +76 -0
  8. package/__fixtures__/2.more/output.json +292 -0
  9. package/__fixtures__/3.multiple-responses/input.yaml +48 -0
  10. package/__fixtures__/3.multiple-responses/output.json +266 -0
  11. package/__fixtures__/4.abc/input.yaml +639 -0
  12. package/__fixtures__/4.abc/output.json +3828 -0
  13. package/__fixtures__/5.xdocs.codeLanguages/input.yaml +231 -0
  14. package/__fixtures__/5.xdocs.codeLanguages/output.json +1879 -0
  15. package/__fixtures__/5.xdocs.sidebar/input.yaml +256 -0
  16. package/__fixtures__/5.xdocs.sidebar/output.json +843 -0
  17. package/__fixtures__/6.codeSamples/input.yaml +75 -0
  18. package/__fixtures__/6.codeSamples/output.json +293 -0
  19. package/__tests__/oapSchemaToReferences.test.ts +88 -0
  20. package/__tests__/utils.ts +81 -0
  21. package/dist/index.cjs +1859 -162
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +36 -4
  24. package/dist/index.d.ts +36 -4
  25. package/dist/index.js +1855 -155
  26. package/dist/index.js.map +1 -1
  27. package/index.ts +10 -2
  28. package/package.json +11 -6
  29. package/src/const.ts +5 -1
  30. package/src/converters/oas-componentSchemas.ts +205 -0
  31. package/src/converters/oas-examples.ts +417 -0
  32. package/src/{parameters.ts → converters/oas-parameters.ts} +17 -3
  33. package/src/converters/oas-paths.ts +354 -0
  34. package/src/{requestBody.ts → converters/oas-requestBody.ts} +30 -10
  35. package/src/converters/oas-responses.ts +76 -0
  36. package/src/converters/oas-schema.ts +141 -0
  37. package/src/index.ts +13 -5
  38. package/src/oas-core.ts +579 -0
  39. package/src/types.ts +18 -0
  40. package/src/utils.ts +103 -90
  41. package/src/xdocs/index.ts +18 -0
  42. package/src/xdocs/pluginSidebar.ts +580 -0
  43. package/src/xdocs/types.ts +26 -0
  44. package/vitest.config.ts +7 -0
  45. package/src/examples.ts +0 -116
  46. package/src/paths.ts +0 -103
  47. package/src/properties.ts +0 -37
  48. package/src/responses.ts +0 -38
  49. package/src/schema.ts +0 -62
@@ -0,0 +1,3828 @@
1
+ [
2
+ {
3
+ "title": "List users",
4
+ "canonical": "getUsers",
5
+ "description": "Retrieve a list of users with optional filtering and pagination",
6
+ "type": "rest_get",
7
+ "category": "rest",
8
+ "context": {
9
+ "method": "get",
10
+ "path": "/users",
11
+ "fullPath": "https:/api.example.com/v1/users",
12
+ "group": [
13
+ "Users"
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 GET \\\n --url https://api.example.com/v1/users"
29
+ },
30
+ {
31
+ "title": "javascript",
32
+ "language": "javascript",
33
+ "code": "const options = {method: 'GET'};\n\nfetch('https://api.example.com/v1/users', 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 = \"https://api.example.com/v1/users\"\n\nresponse = requests.get(url)\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 := \"https://api.example.com/v1/users\"\n\n\treq, _ := http.NewRequest(\"GET\", 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}"
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 \"data\": [\n {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"email\": \"user@example.com\",\n \"firstName\": \"string\",\n \"lastName\": \"string\",\n \"role\": \"user\",\n \"isActive\": true,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"pagination\": {\n \"page\": 0,\n \"limit\": 0,\n \"total\": 0,\n \"totalPages\": 0\n }\n}"
61
+ }
62
+ ]
63
+ }
64
+ },
65
+ {
66
+ "codeblock": {
67
+ "title": "400",
68
+ "tabs": [
69
+ {
70
+ "title": "application/json",
71
+ "language": "json",
72
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ {
78
+ "codeblock": {
79
+ "title": "401",
80
+ "tabs": [
81
+ {
82
+ "title": "application/json",
83
+ "language": "json",
84
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
85
+ }
86
+ ]
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ },
93
+ "definitions": [
94
+ {
95
+ "title": "Query parameters",
96
+ "properties": [
97
+ {
98
+ "name": "page",
99
+ "type": "integer",
100
+ "description": "Page number for pagination",
101
+ "meta": [
102
+ {
103
+ "name": "defaults",
104
+ "value": 1
105
+ },
106
+ {
107
+ "name": "minimum",
108
+ "value": 1
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "name": "limit",
114
+ "type": "integer",
115
+ "description": "Number of items per page",
116
+ "meta": [
117
+ {
118
+ "name": "defaults",
119
+ "value": 20
120
+ },
121
+ {
122
+ "name": "maximum",
123
+ "value": 100
124
+ },
125
+ {
126
+ "name": "minimum",
127
+ "value": 1
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "name": "search",
133
+ "type": "string",
134
+ "description": "Search term for filtering users",
135
+ "meta": []
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "title": "Response",
141
+ "variants": [
142
+ {
143
+ "title": "200",
144
+ "description": "Successful response",
145
+ "properties": [
146
+ {
147
+ "name": "data",
148
+ "type": "$$array",
149
+ "description": "",
150
+ "meta": [
151
+ {
152
+ "name": "required",
153
+ "value": "true"
154
+ }
155
+ ],
156
+ "properties": [],
157
+ "ofProperty": {
158
+ "name": "",
159
+ "type": "object",
160
+ "properties": [
161
+ {
162
+ "name": "id",
163
+ "type": "string",
164
+ "description": "Unique identifier for the user",
165
+ "meta": [
166
+ {
167
+ "name": "required",
168
+ "value": "true"
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ "name": "email",
174
+ "type": "string",
175
+ "description": "User's email address",
176
+ "meta": [
177
+ {
178
+ "name": "required",
179
+ "value": "true"
180
+ }
181
+ ]
182
+ },
183
+ {
184
+ "name": "firstName",
185
+ "type": "string",
186
+ "description": "User's first name",
187
+ "meta": [
188
+ {
189
+ "name": "required",
190
+ "value": "true"
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "name": "lastName",
196
+ "type": "string",
197
+ "description": "User's last name",
198
+ "meta": [
199
+ {
200
+ "name": "required",
201
+ "value": "true"
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "name": "role",
207
+ "type": "$$enum",
208
+ "description": "User's role in the system",
209
+ "meta": [
210
+ {
211
+ "name": "required",
212
+ "value": "true"
213
+ },
214
+ {
215
+ "name": "enum-type",
216
+ "value": "string"
217
+ }
218
+ ],
219
+ "properties": [
220
+ {
221
+ "name": "user",
222
+ "type": "string",
223
+ "description": "",
224
+ "meta": []
225
+ },
226
+ {
227
+ "name": "admin",
228
+ "type": "string",
229
+ "description": "",
230
+ "meta": []
231
+ },
232
+ {
233
+ "name": "moderator",
234
+ "type": "string",
235
+ "description": "",
236
+ "meta": []
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "name": "isActive",
242
+ "type": "boolean",
243
+ "description": "Whether the user account is active",
244
+ "meta": [
245
+ {
246
+ "name": "required",
247
+ "value": "true"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "name": "createdAt",
253
+ "type": "string",
254
+ "description": "When the user was created",
255
+ "meta": [
256
+ {
257
+ "name": "required",
258
+ "value": "true"
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ "name": "updatedAt",
264
+ "type": "string",
265
+ "description": "When the user was last updated",
266
+ "meta": [
267
+ {
268
+ "name": "required",
269
+ "value": "true"
270
+ }
271
+ ]
272
+ }
273
+ ],
274
+ "description": "",
275
+ "meta": [
276
+ {
277
+ "name": "required",
278
+ "value": "true"
279
+ }
280
+ ]
281
+ }
282
+ },
283
+ {
284
+ "name": "pagination",
285
+ "type": "object",
286
+ "description": "",
287
+ "meta": [
288
+ {
289
+ "name": "required",
290
+ "value": "true"
291
+ }
292
+ ],
293
+ "properties": [
294
+ {
295
+ "name": "page",
296
+ "type": "integer",
297
+ "description": "Current page number",
298
+ "meta": [
299
+ {
300
+ "name": "required",
301
+ "value": "true"
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "name": "limit",
307
+ "type": "integer",
308
+ "description": "Number of items per page",
309
+ "meta": [
310
+ {
311
+ "name": "required",
312
+ "value": "true"
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "name": "total",
318
+ "type": "integer",
319
+ "description": "Total number of items",
320
+ "meta": [
321
+ {
322
+ "name": "required",
323
+ "value": "true"
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ "name": "totalPages",
329
+ "type": "integer",
330
+ "description": "Total number of pages",
331
+ "meta": [
332
+ {
333
+ "name": "required",
334
+ "value": "true"
335
+ }
336
+ ]
337
+ }
338
+ ]
339
+ }
340
+ ],
341
+ "meta": [
342
+ {
343
+ "name": "status",
344
+ "value": "200"
345
+ },
346
+ {
347
+ "name": "contentType",
348
+ "value": "application/json"
349
+ },
350
+ {
351
+ "name": "definitionDescription",
352
+ "value": ""
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ "title": "400",
358
+ "description": "Bad request",
359
+ "properties": [
360
+ {
361
+ "name": "error",
362
+ "type": "string",
363
+ "description": "Error message",
364
+ "meta": [
365
+ {
366
+ "name": "required",
367
+ "value": "true"
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "name": "code",
373
+ "type": "string",
374
+ "description": "Error code",
375
+ "meta": [
376
+ {
377
+ "name": "required",
378
+ "value": "true"
379
+ }
380
+ ]
381
+ },
382
+ {
383
+ "name": "details",
384
+ "type": "object",
385
+ "description": "Additional error details",
386
+ "meta": []
387
+ },
388
+ {
389
+ "name": "timestamp",
390
+ "type": "string",
391
+ "description": "When the error occurred",
392
+ "meta": [
393
+ {
394
+ "name": "required",
395
+ "value": "true"
396
+ }
397
+ ]
398
+ }
399
+ ],
400
+ "meta": [
401
+ {
402
+ "name": "status",
403
+ "value": "400"
404
+ },
405
+ {
406
+ "name": "contentType",
407
+ "value": "application/json"
408
+ },
409
+ {
410
+ "name": "definitionDescription",
411
+ "value": ""
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "title": "401",
417
+ "description": "Unauthorized",
418
+ "properties": [
419
+ {
420
+ "name": "error",
421
+ "type": "string",
422
+ "description": "Error message",
423
+ "meta": [
424
+ {
425
+ "name": "required",
426
+ "value": "true"
427
+ }
428
+ ]
429
+ },
430
+ {
431
+ "name": "code",
432
+ "type": "string",
433
+ "description": "Error code",
434
+ "meta": [
435
+ {
436
+ "name": "required",
437
+ "value": "true"
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "name": "details",
443
+ "type": "object",
444
+ "description": "Additional error details",
445
+ "meta": []
446
+ },
447
+ {
448
+ "name": "timestamp",
449
+ "type": "string",
450
+ "description": "When the error occurred",
451
+ "meta": [
452
+ {
453
+ "name": "required",
454
+ "value": "true"
455
+ }
456
+ ]
457
+ }
458
+ ],
459
+ "meta": [
460
+ {
461
+ "name": "status",
462
+ "value": "401"
463
+ },
464
+ {
465
+ "name": "contentType",
466
+ "value": "application/json"
467
+ },
468
+ {
469
+ "name": "definitionDescription",
470
+ "value": ""
471
+ }
472
+ ]
473
+ }
474
+ ],
475
+ "properties": []
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ "title": "Create user",
481
+ "canonical": "createUser",
482
+ "description": "Create a new user",
483
+ "type": "rest_post",
484
+ "category": "rest",
485
+ "context": {
486
+ "method": "post",
487
+ "path": "/users",
488
+ "fullPath": "https:/api.example.com/v1/users",
489
+ "group": [
490
+ "Users"
491
+ ],
492
+ "scopes": []
493
+ },
494
+ "examples": {
495
+ "groups": [
496
+ {
497
+ "description": "Example request",
498
+ "examples": [
499
+ {
500
+ "codeblock": {
501
+ "tabs": [
502
+ {
503
+ "title": "shell",
504
+ "language": "shell",
505
+ "code": "curl --request POST \\\n --url https://api.example.com/v1/users"
506
+ },
507
+ {
508
+ "title": "javascript",
509
+ "language": "javascript",
510
+ "code": "const options = {method: 'POST'};\n\nfetch('https://api.example.com/v1/users', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
511
+ },
512
+ {
513
+ "title": "python",
514
+ "language": "python",
515
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/users\"\n\nresponse = requests.post(url)\n\nprint(response.text)"
516
+ },
517
+ {
518
+ "title": "go",
519
+ "language": "go",
520
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/users\"\n\n\treq, _ := http.NewRequest(\"POST\", 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}"
521
+ }
522
+ ]
523
+ }
524
+ }
525
+ ]
526
+ },
527
+ {
528
+ "description": "Example response",
529
+ "examples": [
530
+ {
531
+ "codeblock": {
532
+ "title": "201",
533
+ "tabs": [
534
+ {
535
+ "title": "application/json",
536
+ "language": "json",
537
+ "code": "{\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"email\": \"user@example.com\",\n \"firstName\": \"string\",\n \"lastName\": \"string\",\n \"role\": \"user\",\n \"isActive\": true,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
538
+ }
539
+ ]
540
+ }
541
+ },
542
+ {
543
+ "codeblock": {
544
+ "title": "400",
545
+ "tabs": [
546
+ {
547
+ "title": "application/json",
548
+ "language": "json",
549
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
550
+ }
551
+ ]
552
+ }
553
+ },
554
+ {
555
+ "codeblock": {
556
+ "title": "409",
557
+ "tabs": [
558
+ {
559
+ "title": "application/json",
560
+ "language": "json",
561
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
562
+ }
563
+ ]
564
+ }
565
+ }
566
+ ]
567
+ }
568
+ ]
569
+ },
570
+ "definitions": [
571
+ {
572
+ "title": "Request body",
573
+ "variants": [
574
+ {
575
+ "title": "application/json",
576
+ "description": "",
577
+ "properties": [
578
+ {
579
+ "name": "email",
580
+ "type": "string",
581
+ "description": "User's email address",
582
+ "meta": [
583
+ {
584
+ "name": "required",
585
+ "value": "true"
586
+ }
587
+ ]
588
+ },
589
+ {
590
+ "name": "password",
591
+ "type": "string",
592
+ "description": "User's password",
593
+ "meta": [
594
+ {
595
+ "name": "required",
596
+ "value": "true"
597
+ }
598
+ ]
599
+ },
600
+ {
601
+ "name": "firstName",
602
+ "type": "string",
603
+ "description": "User's first name",
604
+ "meta": [
605
+ {
606
+ "name": "required",
607
+ "value": "true"
608
+ }
609
+ ]
610
+ },
611
+ {
612
+ "name": "lastName",
613
+ "type": "string",
614
+ "description": "User's last name",
615
+ "meta": [
616
+ {
617
+ "name": "required",
618
+ "value": "true"
619
+ }
620
+ ]
621
+ },
622
+ {
623
+ "name": "role",
624
+ "type": "$$enum",
625
+ "description": "User's role in the system",
626
+ "meta": [
627
+ {
628
+ "name": "defaults",
629
+ "value": "user"
630
+ },
631
+ {
632
+ "name": "enum-type",
633
+ "value": "string"
634
+ }
635
+ ],
636
+ "properties": [
637
+ {
638
+ "name": "user",
639
+ "type": "string",
640
+ "description": "",
641
+ "meta": []
642
+ },
643
+ {
644
+ "name": "admin",
645
+ "type": "string",
646
+ "description": "",
647
+ "meta": []
648
+ },
649
+ {
650
+ "name": "moderator",
651
+ "type": "string",
652
+ "description": "",
653
+ "meta": []
654
+ }
655
+ ]
656
+ }
657
+ ],
658
+ "meta": [
659
+ {
660
+ "name": "contentType",
661
+ "value": "application/json"
662
+ },
663
+ {
664
+ "name": "required",
665
+ "value": "true"
666
+ }
667
+ ]
668
+ }
669
+ ],
670
+ "properties": [],
671
+ "meta": [
672
+ {
673
+ "name": "required",
674
+ "value": "true"
675
+ }
676
+ ]
677
+ },
678
+ {
679
+ "title": "Response",
680
+ "variants": [
681
+ {
682
+ "title": "201",
683
+ "description": "User created successfully",
684
+ "properties": [
685
+ {
686
+ "name": "id",
687
+ "type": "string",
688
+ "description": "Unique identifier for the user",
689
+ "meta": [
690
+ {
691
+ "name": "required",
692
+ "value": "true"
693
+ }
694
+ ]
695
+ },
696
+ {
697
+ "name": "email",
698
+ "type": "string",
699
+ "description": "User's email address",
700
+ "meta": [
701
+ {
702
+ "name": "required",
703
+ "value": "true"
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ "name": "firstName",
709
+ "type": "string",
710
+ "description": "User's first name",
711
+ "meta": [
712
+ {
713
+ "name": "required",
714
+ "value": "true"
715
+ }
716
+ ]
717
+ },
718
+ {
719
+ "name": "lastName",
720
+ "type": "string",
721
+ "description": "User's last name",
722
+ "meta": [
723
+ {
724
+ "name": "required",
725
+ "value": "true"
726
+ }
727
+ ]
728
+ },
729
+ {
730
+ "name": "role",
731
+ "type": "$$enum",
732
+ "description": "User's role in the system",
733
+ "meta": [
734
+ {
735
+ "name": "required",
736
+ "value": "true"
737
+ },
738
+ {
739
+ "name": "enum-type",
740
+ "value": "string"
741
+ }
742
+ ],
743
+ "properties": [
744
+ {
745
+ "name": "user",
746
+ "type": "string",
747
+ "description": "",
748
+ "meta": []
749
+ },
750
+ {
751
+ "name": "admin",
752
+ "type": "string",
753
+ "description": "",
754
+ "meta": []
755
+ },
756
+ {
757
+ "name": "moderator",
758
+ "type": "string",
759
+ "description": "",
760
+ "meta": []
761
+ }
762
+ ]
763
+ },
764
+ {
765
+ "name": "isActive",
766
+ "type": "boolean",
767
+ "description": "Whether the user account is active",
768
+ "meta": [
769
+ {
770
+ "name": "required",
771
+ "value": "true"
772
+ }
773
+ ]
774
+ },
775
+ {
776
+ "name": "createdAt",
777
+ "type": "string",
778
+ "description": "When the user was created",
779
+ "meta": [
780
+ {
781
+ "name": "required",
782
+ "value": "true"
783
+ }
784
+ ]
785
+ },
786
+ {
787
+ "name": "updatedAt",
788
+ "type": "string",
789
+ "description": "When the user was last updated",
790
+ "meta": [
791
+ {
792
+ "name": "required",
793
+ "value": "true"
794
+ }
795
+ ]
796
+ }
797
+ ],
798
+ "meta": [
799
+ {
800
+ "name": "status",
801
+ "value": "201"
802
+ },
803
+ {
804
+ "name": "contentType",
805
+ "value": "application/json"
806
+ },
807
+ {
808
+ "name": "definitionDescription",
809
+ "value": ""
810
+ }
811
+ ]
812
+ },
813
+ {
814
+ "title": "400",
815
+ "description": "Bad request",
816
+ "properties": [
817
+ {
818
+ "name": "error",
819
+ "type": "string",
820
+ "description": "Error message",
821
+ "meta": [
822
+ {
823
+ "name": "required",
824
+ "value": "true"
825
+ }
826
+ ]
827
+ },
828
+ {
829
+ "name": "code",
830
+ "type": "string",
831
+ "description": "Error code",
832
+ "meta": [
833
+ {
834
+ "name": "required",
835
+ "value": "true"
836
+ }
837
+ ]
838
+ },
839
+ {
840
+ "name": "details",
841
+ "type": "object",
842
+ "description": "Additional error details",
843
+ "meta": []
844
+ },
845
+ {
846
+ "name": "timestamp",
847
+ "type": "string",
848
+ "description": "When the error occurred",
849
+ "meta": [
850
+ {
851
+ "name": "required",
852
+ "value": "true"
853
+ }
854
+ ]
855
+ }
856
+ ],
857
+ "meta": [
858
+ {
859
+ "name": "status",
860
+ "value": "400"
861
+ },
862
+ {
863
+ "name": "contentType",
864
+ "value": "application/json"
865
+ },
866
+ {
867
+ "name": "definitionDescription",
868
+ "value": ""
869
+ }
870
+ ]
871
+ },
872
+ {
873
+ "title": "409",
874
+ "description": "User already exists",
875
+ "properties": [
876
+ {
877
+ "name": "error",
878
+ "type": "string",
879
+ "description": "Error message",
880
+ "meta": [
881
+ {
882
+ "name": "required",
883
+ "value": "true"
884
+ }
885
+ ]
886
+ },
887
+ {
888
+ "name": "code",
889
+ "type": "string",
890
+ "description": "Error code",
891
+ "meta": [
892
+ {
893
+ "name": "required",
894
+ "value": "true"
895
+ }
896
+ ]
897
+ },
898
+ {
899
+ "name": "details",
900
+ "type": "object",
901
+ "description": "Additional error details",
902
+ "meta": []
903
+ },
904
+ {
905
+ "name": "timestamp",
906
+ "type": "string",
907
+ "description": "When the error occurred",
908
+ "meta": [
909
+ {
910
+ "name": "required",
911
+ "value": "true"
912
+ }
913
+ ]
914
+ }
915
+ ],
916
+ "meta": [
917
+ {
918
+ "name": "status",
919
+ "value": "409"
920
+ },
921
+ {
922
+ "name": "contentType",
923
+ "value": "application/json"
924
+ },
925
+ {
926
+ "name": "definitionDescription",
927
+ "value": ""
928
+ }
929
+ ]
930
+ }
931
+ ],
932
+ "properties": []
933
+ }
934
+ ]
935
+ },
936
+ {
937
+ "title": "Get user by ID",
938
+ "canonical": "getUserById",
939
+ "description": "Retrieve a specific user by their ID",
940
+ "type": "rest_get",
941
+ "category": "rest",
942
+ "context": {
943
+ "method": "get",
944
+ "path": "/users/{userId}",
945
+ "fullPath": "https:/api.example.com/v1/users/{userId}",
946
+ "group": [
947
+ "Users"
948
+ ],
949
+ "scopes": []
950
+ },
951
+ "examples": {
952
+ "groups": [
953
+ {
954
+ "description": "Example request",
955
+ "examples": [
956
+ {
957
+ "codeblock": {
958
+ "tabs": [
959
+ {
960
+ "title": "shell",
961
+ "language": "shell",
962
+ "code": "curl --request GET \\\n --url https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08"
963
+ },
964
+ {
965
+ "title": "javascript",
966
+ "language": "javascript",
967
+ "code": "const options = {method: 'GET'};\n\nfetch('https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
968
+ },
969
+ {
970
+ "title": "python",
971
+ "language": "python",
972
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n\nresponse = requests.get(url)\n\nprint(response.text)"
973
+ },
974
+ {
975
+ "title": "go",
976
+ "language": "go",
977
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n\n\treq, _ := http.NewRequest(\"GET\", 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}"
978
+ }
979
+ ]
980
+ }
981
+ }
982
+ ]
983
+ },
984
+ {
985
+ "description": "Example response",
986
+ "examples": [
987
+ {
988
+ "codeblock": {
989
+ "title": "200",
990
+ "tabs": [
991
+ {
992
+ "title": "application/json",
993
+ "language": "json",
994
+ "code": "{\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"email\": \"user@example.com\",\n \"firstName\": \"string\",\n \"lastName\": \"string\",\n \"role\": \"user\",\n \"isActive\": true,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
995
+ }
996
+ ]
997
+ }
998
+ },
999
+ {
1000
+ "codeblock": {
1001
+ "title": "404",
1002
+ "tabs": [
1003
+ {
1004
+ "title": "application/json",
1005
+ "language": "json",
1006
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
1007
+ }
1008
+ ]
1009
+ }
1010
+ }
1011
+ ]
1012
+ }
1013
+ ]
1014
+ },
1015
+ "definitions": [
1016
+ {
1017
+ "title": "Path parameters",
1018
+ "properties": [
1019
+ {
1020
+ "name": "userId",
1021
+ "type": "string",
1022
+ "description": "The user ID",
1023
+ "meta": [
1024
+ {
1025
+ "name": "required",
1026
+ "value": "true"
1027
+ }
1028
+ ]
1029
+ }
1030
+ ]
1031
+ },
1032
+ {
1033
+ "title": "Response",
1034
+ "variants": [
1035
+ {
1036
+ "title": "200",
1037
+ "description": "Successful response",
1038
+ "properties": [
1039
+ {
1040
+ "name": "id",
1041
+ "type": "string",
1042
+ "description": "Unique identifier for the user",
1043
+ "meta": [
1044
+ {
1045
+ "name": "required",
1046
+ "value": "true"
1047
+ }
1048
+ ]
1049
+ },
1050
+ {
1051
+ "name": "email",
1052
+ "type": "string",
1053
+ "description": "User's email address",
1054
+ "meta": [
1055
+ {
1056
+ "name": "required",
1057
+ "value": "true"
1058
+ }
1059
+ ]
1060
+ },
1061
+ {
1062
+ "name": "firstName",
1063
+ "type": "string",
1064
+ "description": "User's first name",
1065
+ "meta": [
1066
+ {
1067
+ "name": "required",
1068
+ "value": "true"
1069
+ }
1070
+ ]
1071
+ },
1072
+ {
1073
+ "name": "lastName",
1074
+ "type": "string",
1075
+ "description": "User's last name",
1076
+ "meta": [
1077
+ {
1078
+ "name": "required",
1079
+ "value": "true"
1080
+ }
1081
+ ]
1082
+ },
1083
+ {
1084
+ "name": "role",
1085
+ "type": "$$enum",
1086
+ "description": "User's role in the system",
1087
+ "meta": [
1088
+ {
1089
+ "name": "required",
1090
+ "value": "true"
1091
+ },
1092
+ {
1093
+ "name": "enum-type",
1094
+ "value": "string"
1095
+ }
1096
+ ],
1097
+ "properties": [
1098
+ {
1099
+ "name": "user",
1100
+ "type": "string",
1101
+ "description": "",
1102
+ "meta": []
1103
+ },
1104
+ {
1105
+ "name": "admin",
1106
+ "type": "string",
1107
+ "description": "",
1108
+ "meta": []
1109
+ },
1110
+ {
1111
+ "name": "moderator",
1112
+ "type": "string",
1113
+ "description": "",
1114
+ "meta": []
1115
+ }
1116
+ ]
1117
+ },
1118
+ {
1119
+ "name": "isActive",
1120
+ "type": "boolean",
1121
+ "description": "Whether the user account is active",
1122
+ "meta": [
1123
+ {
1124
+ "name": "required",
1125
+ "value": "true"
1126
+ }
1127
+ ]
1128
+ },
1129
+ {
1130
+ "name": "createdAt",
1131
+ "type": "string",
1132
+ "description": "When the user was created",
1133
+ "meta": [
1134
+ {
1135
+ "name": "required",
1136
+ "value": "true"
1137
+ }
1138
+ ]
1139
+ },
1140
+ {
1141
+ "name": "updatedAt",
1142
+ "type": "string",
1143
+ "description": "When the user was last updated",
1144
+ "meta": [
1145
+ {
1146
+ "name": "required",
1147
+ "value": "true"
1148
+ }
1149
+ ]
1150
+ }
1151
+ ],
1152
+ "meta": [
1153
+ {
1154
+ "name": "status",
1155
+ "value": "200"
1156
+ },
1157
+ {
1158
+ "name": "contentType",
1159
+ "value": "application/json"
1160
+ },
1161
+ {
1162
+ "name": "definitionDescription",
1163
+ "value": ""
1164
+ }
1165
+ ]
1166
+ },
1167
+ {
1168
+ "title": "404",
1169
+ "description": "User not found",
1170
+ "properties": [
1171
+ {
1172
+ "name": "error",
1173
+ "type": "string",
1174
+ "description": "Error message",
1175
+ "meta": [
1176
+ {
1177
+ "name": "required",
1178
+ "value": "true"
1179
+ }
1180
+ ]
1181
+ },
1182
+ {
1183
+ "name": "code",
1184
+ "type": "string",
1185
+ "description": "Error code",
1186
+ "meta": [
1187
+ {
1188
+ "name": "required",
1189
+ "value": "true"
1190
+ }
1191
+ ]
1192
+ },
1193
+ {
1194
+ "name": "details",
1195
+ "type": "object",
1196
+ "description": "Additional error details",
1197
+ "meta": []
1198
+ },
1199
+ {
1200
+ "name": "timestamp",
1201
+ "type": "string",
1202
+ "description": "When the error occurred",
1203
+ "meta": [
1204
+ {
1205
+ "name": "required",
1206
+ "value": "true"
1207
+ }
1208
+ ]
1209
+ }
1210
+ ],
1211
+ "meta": [
1212
+ {
1213
+ "name": "status",
1214
+ "value": "404"
1215
+ },
1216
+ {
1217
+ "name": "contentType",
1218
+ "value": "application/json"
1219
+ },
1220
+ {
1221
+ "name": "definitionDescription",
1222
+ "value": ""
1223
+ }
1224
+ ]
1225
+ }
1226
+ ],
1227
+ "properties": []
1228
+ }
1229
+ ]
1230
+ },
1231
+ {
1232
+ "title": "Update user",
1233
+ "canonical": "updateUser",
1234
+ "description": "Update an existing user",
1235
+ "type": "rest_put",
1236
+ "category": "rest",
1237
+ "context": {
1238
+ "method": "put",
1239
+ "path": "/users/{userId}",
1240
+ "fullPath": "https:/api.example.com/v1/users/{userId}",
1241
+ "group": [
1242
+ "Users"
1243
+ ],
1244
+ "scopes": []
1245
+ },
1246
+ "examples": {
1247
+ "groups": [
1248
+ {
1249
+ "description": "Example request",
1250
+ "examples": [
1251
+ {
1252
+ "codeblock": {
1253
+ "tabs": [
1254
+ {
1255
+ "title": "shell",
1256
+ "language": "shell",
1257
+ "code": "curl --request PUT \\\n --url https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08"
1258
+ },
1259
+ {
1260
+ "title": "javascript",
1261
+ "language": "javascript",
1262
+ "code": "const options = {method: 'PUT'};\n\nfetch('https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
1263
+ },
1264
+ {
1265
+ "title": "python",
1266
+ "language": "python",
1267
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n\nresponse = requests.put(url)\n\nprint(response.text)"
1268
+ },
1269
+ {
1270
+ "title": "go",
1271
+ "language": "go",
1272
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n\n\treq, _ := http.NewRequest(\"PUT\", 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}"
1273
+ }
1274
+ ]
1275
+ }
1276
+ }
1277
+ ]
1278
+ },
1279
+ {
1280
+ "description": "Example response",
1281
+ "examples": [
1282
+ {
1283
+ "codeblock": {
1284
+ "title": "200",
1285
+ "tabs": [
1286
+ {
1287
+ "title": "application/json",
1288
+ "language": "json",
1289
+ "code": "{\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"email\": \"user@example.com\",\n \"firstName\": \"string\",\n \"lastName\": \"string\",\n \"role\": \"user\",\n \"isActive\": true,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
1290
+ }
1291
+ ]
1292
+ }
1293
+ },
1294
+ {
1295
+ "codeblock": {
1296
+ "title": "404",
1297
+ "tabs": [
1298
+ {
1299
+ "title": "application/json",
1300
+ "language": "json",
1301
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
1302
+ }
1303
+ ]
1304
+ }
1305
+ }
1306
+ ]
1307
+ }
1308
+ ]
1309
+ },
1310
+ "definitions": [
1311
+ {
1312
+ "title": "Path parameters",
1313
+ "properties": [
1314
+ {
1315
+ "name": "userId",
1316
+ "type": "string",
1317
+ "description": "The user ID",
1318
+ "meta": [
1319
+ {
1320
+ "name": "required",
1321
+ "value": "true"
1322
+ }
1323
+ ]
1324
+ }
1325
+ ]
1326
+ },
1327
+ {
1328
+ "title": "Request body",
1329
+ "variants": [
1330
+ {
1331
+ "title": "application/json",
1332
+ "description": "",
1333
+ "properties": [
1334
+ {
1335
+ "name": "firstName",
1336
+ "type": "string",
1337
+ "description": "User's first name",
1338
+ "meta": []
1339
+ },
1340
+ {
1341
+ "name": "lastName",
1342
+ "type": "string",
1343
+ "description": "User's last name",
1344
+ "meta": []
1345
+ },
1346
+ {
1347
+ "name": "role",
1348
+ "type": "$$enum",
1349
+ "description": "User's role in the system",
1350
+ "meta": [
1351
+ {
1352
+ "name": "enum-type",
1353
+ "value": "string"
1354
+ }
1355
+ ],
1356
+ "properties": [
1357
+ {
1358
+ "name": "user",
1359
+ "type": "string",
1360
+ "description": "",
1361
+ "meta": []
1362
+ },
1363
+ {
1364
+ "name": "admin",
1365
+ "type": "string",
1366
+ "description": "",
1367
+ "meta": []
1368
+ },
1369
+ {
1370
+ "name": "moderator",
1371
+ "type": "string",
1372
+ "description": "",
1373
+ "meta": []
1374
+ }
1375
+ ]
1376
+ },
1377
+ {
1378
+ "name": "isActive",
1379
+ "type": "boolean",
1380
+ "description": "Whether the user account is active",
1381
+ "meta": []
1382
+ }
1383
+ ],
1384
+ "meta": [
1385
+ {
1386
+ "name": "contentType",
1387
+ "value": "application/json"
1388
+ }
1389
+ ]
1390
+ }
1391
+ ],
1392
+ "properties": [],
1393
+ "meta": [
1394
+ {
1395
+ "name": "required",
1396
+ "value": "true"
1397
+ }
1398
+ ]
1399
+ },
1400
+ {
1401
+ "title": "Response",
1402
+ "variants": [
1403
+ {
1404
+ "title": "200",
1405
+ "description": "User updated successfully",
1406
+ "properties": [
1407
+ {
1408
+ "name": "id",
1409
+ "type": "string",
1410
+ "description": "Unique identifier for the user",
1411
+ "meta": [
1412
+ {
1413
+ "name": "required",
1414
+ "value": "true"
1415
+ }
1416
+ ]
1417
+ },
1418
+ {
1419
+ "name": "email",
1420
+ "type": "string",
1421
+ "description": "User's email address",
1422
+ "meta": [
1423
+ {
1424
+ "name": "required",
1425
+ "value": "true"
1426
+ }
1427
+ ]
1428
+ },
1429
+ {
1430
+ "name": "firstName",
1431
+ "type": "string",
1432
+ "description": "User's first name",
1433
+ "meta": [
1434
+ {
1435
+ "name": "required",
1436
+ "value": "true"
1437
+ }
1438
+ ]
1439
+ },
1440
+ {
1441
+ "name": "lastName",
1442
+ "type": "string",
1443
+ "description": "User's last name",
1444
+ "meta": [
1445
+ {
1446
+ "name": "required",
1447
+ "value": "true"
1448
+ }
1449
+ ]
1450
+ },
1451
+ {
1452
+ "name": "role",
1453
+ "type": "$$enum",
1454
+ "description": "User's role in the system",
1455
+ "meta": [
1456
+ {
1457
+ "name": "required",
1458
+ "value": "true"
1459
+ },
1460
+ {
1461
+ "name": "enum-type",
1462
+ "value": "string"
1463
+ }
1464
+ ],
1465
+ "properties": [
1466
+ {
1467
+ "name": "user",
1468
+ "type": "string",
1469
+ "description": "",
1470
+ "meta": []
1471
+ },
1472
+ {
1473
+ "name": "admin",
1474
+ "type": "string",
1475
+ "description": "",
1476
+ "meta": []
1477
+ },
1478
+ {
1479
+ "name": "moderator",
1480
+ "type": "string",
1481
+ "description": "",
1482
+ "meta": []
1483
+ }
1484
+ ]
1485
+ },
1486
+ {
1487
+ "name": "isActive",
1488
+ "type": "boolean",
1489
+ "description": "Whether the user account is active",
1490
+ "meta": [
1491
+ {
1492
+ "name": "required",
1493
+ "value": "true"
1494
+ }
1495
+ ]
1496
+ },
1497
+ {
1498
+ "name": "createdAt",
1499
+ "type": "string",
1500
+ "description": "When the user was created",
1501
+ "meta": [
1502
+ {
1503
+ "name": "required",
1504
+ "value": "true"
1505
+ }
1506
+ ]
1507
+ },
1508
+ {
1509
+ "name": "updatedAt",
1510
+ "type": "string",
1511
+ "description": "When the user was last updated",
1512
+ "meta": [
1513
+ {
1514
+ "name": "required",
1515
+ "value": "true"
1516
+ }
1517
+ ]
1518
+ }
1519
+ ],
1520
+ "meta": [
1521
+ {
1522
+ "name": "status",
1523
+ "value": "200"
1524
+ },
1525
+ {
1526
+ "name": "contentType",
1527
+ "value": "application/json"
1528
+ },
1529
+ {
1530
+ "name": "definitionDescription",
1531
+ "value": ""
1532
+ }
1533
+ ]
1534
+ },
1535
+ {
1536
+ "title": "404",
1537
+ "description": "User not found",
1538
+ "properties": [
1539
+ {
1540
+ "name": "error",
1541
+ "type": "string",
1542
+ "description": "Error message",
1543
+ "meta": [
1544
+ {
1545
+ "name": "required",
1546
+ "value": "true"
1547
+ }
1548
+ ]
1549
+ },
1550
+ {
1551
+ "name": "code",
1552
+ "type": "string",
1553
+ "description": "Error code",
1554
+ "meta": [
1555
+ {
1556
+ "name": "required",
1557
+ "value": "true"
1558
+ }
1559
+ ]
1560
+ },
1561
+ {
1562
+ "name": "details",
1563
+ "type": "object",
1564
+ "description": "Additional error details",
1565
+ "meta": []
1566
+ },
1567
+ {
1568
+ "name": "timestamp",
1569
+ "type": "string",
1570
+ "description": "When the error occurred",
1571
+ "meta": [
1572
+ {
1573
+ "name": "required",
1574
+ "value": "true"
1575
+ }
1576
+ ]
1577
+ }
1578
+ ],
1579
+ "meta": [
1580
+ {
1581
+ "name": "status",
1582
+ "value": "404"
1583
+ },
1584
+ {
1585
+ "name": "contentType",
1586
+ "value": "application/json"
1587
+ },
1588
+ {
1589
+ "name": "definitionDescription",
1590
+ "value": ""
1591
+ }
1592
+ ]
1593
+ }
1594
+ ],
1595
+ "properties": []
1596
+ }
1597
+ ]
1598
+ },
1599
+ {
1600
+ "title": "Delete user",
1601
+ "canonical": "deleteUser",
1602
+ "description": "Delete a user",
1603
+ "type": "rest_delete",
1604
+ "category": "rest",
1605
+ "context": {
1606
+ "method": "delete",
1607
+ "path": "/users/{userId}",
1608
+ "fullPath": "https:/api.example.com/v1/users/{userId}",
1609
+ "group": [
1610
+ "Users"
1611
+ ],
1612
+ "scopes": []
1613
+ },
1614
+ "examples": {
1615
+ "groups": [
1616
+ {
1617
+ "description": "Example request",
1618
+ "examples": [
1619
+ {
1620
+ "codeblock": {
1621
+ "tabs": [
1622
+ {
1623
+ "title": "shell",
1624
+ "language": "shell",
1625
+ "code": "curl --request DELETE \\\n --url https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08"
1626
+ },
1627
+ {
1628
+ "title": "javascript",
1629
+ "language": "javascript",
1630
+ "code": "const options = {method: 'DELETE'};\n\nfetch('https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
1631
+ },
1632
+ {
1633
+ "title": "python",
1634
+ "language": "python",
1635
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n\nresponse = requests.delete(url)\n\nprint(response.text)"
1636
+ },
1637
+ {
1638
+ "title": "go",
1639
+ "language": "go",
1640
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n\n\treq, _ := http.NewRequest(\"DELETE\", 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}"
1641
+ }
1642
+ ]
1643
+ }
1644
+ }
1645
+ ]
1646
+ },
1647
+ {
1648
+ "description": "Example response",
1649
+ "examples": [
1650
+ {
1651
+ "codeblock": {
1652
+ "title": "404",
1653
+ "tabs": [
1654
+ {
1655
+ "title": "application/json",
1656
+ "language": "json",
1657
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
1658
+ }
1659
+ ]
1660
+ }
1661
+ }
1662
+ ]
1663
+ }
1664
+ ]
1665
+ },
1666
+ "definitions": [
1667
+ {
1668
+ "title": "Path parameters",
1669
+ "properties": [
1670
+ {
1671
+ "name": "userId",
1672
+ "type": "string",
1673
+ "description": "The user ID",
1674
+ "meta": [
1675
+ {
1676
+ "name": "required",
1677
+ "value": "true"
1678
+ }
1679
+ ]
1680
+ }
1681
+ ]
1682
+ },
1683
+ {
1684
+ "title": "Response",
1685
+ "variants": [
1686
+ {
1687
+ "title": "204",
1688
+ "description": "User deleted successfully",
1689
+ "properties": [],
1690
+ "meta": [
1691
+ {
1692
+ "name": "status",
1693
+ "value": "204"
1694
+ }
1695
+ ]
1696
+ },
1697
+ {
1698
+ "title": "404",
1699
+ "description": "User not found",
1700
+ "properties": [
1701
+ {
1702
+ "name": "error",
1703
+ "type": "string",
1704
+ "description": "Error message",
1705
+ "meta": [
1706
+ {
1707
+ "name": "required",
1708
+ "value": "true"
1709
+ }
1710
+ ]
1711
+ },
1712
+ {
1713
+ "name": "code",
1714
+ "type": "string",
1715
+ "description": "Error code",
1716
+ "meta": [
1717
+ {
1718
+ "name": "required",
1719
+ "value": "true"
1720
+ }
1721
+ ]
1722
+ },
1723
+ {
1724
+ "name": "details",
1725
+ "type": "object",
1726
+ "description": "Additional error details",
1727
+ "meta": []
1728
+ },
1729
+ {
1730
+ "name": "timestamp",
1731
+ "type": "string",
1732
+ "description": "When the error occurred",
1733
+ "meta": [
1734
+ {
1735
+ "name": "required",
1736
+ "value": "true"
1737
+ }
1738
+ ]
1739
+ }
1740
+ ],
1741
+ "meta": [
1742
+ {
1743
+ "name": "status",
1744
+ "value": "404"
1745
+ },
1746
+ {
1747
+ "name": "contentType",
1748
+ "value": "application/json"
1749
+ },
1750
+ {
1751
+ "name": "definitionDescription",
1752
+ "value": ""
1753
+ }
1754
+ ]
1755
+ }
1756
+ ],
1757
+ "properties": []
1758
+ }
1759
+ ]
1760
+ },
1761
+ {
1762
+ "title": "User login",
1763
+ "canonical": "login",
1764
+ "description": "Authenticate a user and return access token",
1765
+ "type": "rest_post",
1766
+ "category": "rest",
1767
+ "context": {
1768
+ "method": "post",
1769
+ "path": "/auth/login",
1770
+ "fullPath": "https:/api.example.com/v1/auth/login",
1771
+ "group": [
1772
+ "Authentication"
1773
+ ],
1774
+ "scopes": []
1775
+ },
1776
+ "examples": {
1777
+ "groups": [
1778
+ {
1779
+ "description": "Example request",
1780
+ "examples": [
1781
+ {
1782
+ "codeblock": {
1783
+ "tabs": [
1784
+ {
1785
+ "title": "shell",
1786
+ "language": "shell",
1787
+ "code": "curl --request POST \\\n --url https://api.example.com/v1/auth/login"
1788
+ },
1789
+ {
1790
+ "title": "javascript",
1791
+ "language": "javascript",
1792
+ "code": "const options = {method: 'POST'};\n\nfetch('https://api.example.com/v1/auth/login', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
1793
+ },
1794
+ {
1795
+ "title": "python",
1796
+ "language": "python",
1797
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/auth/login\"\n\nresponse = requests.post(url)\n\nprint(response.text)"
1798
+ },
1799
+ {
1800
+ "title": "go",
1801
+ "language": "go",
1802
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/auth/login\"\n\n\treq, _ := http.NewRequest(\"POST\", 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}"
1803
+ }
1804
+ ]
1805
+ }
1806
+ }
1807
+ ]
1808
+ },
1809
+ {
1810
+ "description": "Example response",
1811
+ "examples": [
1812
+ {
1813
+ "codeblock": {
1814
+ "title": "200",
1815
+ "tabs": [
1816
+ {
1817
+ "title": "application/json",
1818
+ "language": "json",
1819
+ "code": "{\n \"accessToken\": \"string\",\n \"refreshToken\": \"string\",\n \"expiresIn\": 0,\n \"user\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"email\": \"user@example.com\",\n \"firstName\": \"string\",\n \"lastName\": \"string\",\n \"role\": \"user\",\n \"isActive\": true,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n }\n}"
1820
+ }
1821
+ ]
1822
+ }
1823
+ },
1824
+ {
1825
+ "codeblock": {
1826
+ "title": "401",
1827
+ "tabs": [
1828
+ {
1829
+ "title": "application/json",
1830
+ "language": "json",
1831
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
1832
+ }
1833
+ ]
1834
+ }
1835
+ }
1836
+ ]
1837
+ }
1838
+ ]
1839
+ },
1840
+ "definitions": [
1841
+ {
1842
+ "title": "Request body",
1843
+ "variants": [
1844
+ {
1845
+ "title": "application/json",
1846
+ "description": "",
1847
+ "properties": [
1848
+ {
1849
+ "name": "email",
1850
+ "type": "string",
1851
+ "description": "User's email address",
1852
+ "meta": [
1853
+ {
1854
+ "name": "required",
1855
+ "value": "true"
1856
+ }
1857
+ ]
1858
+ },
1859
+ {
1860
+ "name": "password",
1861
+ "type": "string",
1862
+ "description": "User's password",
1863
+ "meta": [
1864
+ {
1865
+ "name": "required",
1866
+ "value": "true"
1867
+ }
1868
+ ]
1869
+ }
1870
+ ],
1871
+ "meta": [
1872
+ {
1873
+ "name": "contentType",
1874
+ "value": "application/json"
1875
+ },
1876
+ {
1877
+ "name": "required",
1878
+ "value": "true"
1879
+ }
1880
+ ]
1881
+ }
1882
+ ],
1883
+ "properties": [],
1884
+ "meta": [
1885
+ {
1886
+ "name": "required",
1887
+ "value": "true"
1888
+ }
1889
+ ]
1890
+ },
1891
+ {
1892
+ "title": "Response",
1893
+ "variants": [
1894
+ {
1895
+ "title": "200",
1896
+ "description": "Login successful",
1897
+ "properties": [
1898
+ {
1899
+ "name": "accessToken",
1900
+ "type": "string",
1901
+ "description": "JWT access token",
1902
+ "meta": [
1903
+ {
1904
+ "name": "required",
1905
+ "value": "true"
1906
+ }
1907
+ ]
1908
+ },
1909
+ {
1910
+ "name": "refreshToken",
1911
+ "type": "string",
1912
+ "description": "JWT refresh token",
1913
+ "meta": [
1914
+ {
1915
+ "name": "required",
1916
+ "value": "true"
1917
+ }
1918
+ ]
1919
+ },
1920
+ {
1921
+ "name": "expiresIn",
1922
+ "type": "integer",
1923
+ "description": "Token expiration time in seconds",
1924
+ "meta": [
1925
+ {
1926
+ "name": "required",
1927
+ "value": "true"
1928
+ }
1929
+ ]
1930
+ },
1931
+ {
1932
+ "name": "user",
1933
+ "type": "object",
1934
+ "description": "",
1935
+ "meta": [
1936
+ {
1937
+ "name": "required",
1938
+ "value": "true"
1939
+ }
1940
+ ],
1941
+ "properties": [
1942
+ {
1943
+ "name": "id",
1944
+ "type": "string",
1945
+ "description": "Unique identifier for the user",
1946
+ "meta": [
1947
+ {
1948
+ "name": "required",
1949
+ "value": "true"
1950
+ }
1951
+ ]
1952
+ },
1953
+ {
1954
+ "name": "email",
1955
+ "type": "string",
1956
+ "description": "User's email address",
1957
+ "meta": [
1958
+ {
1959
+ "name": "required",
1960
+ "value": "true"
1961
+ }
1962
+ ]
1963
+ },
1964
+ {
1965
+ "name": "firstName",
1966
+ "type": "string",
1967
+ "description": "User's first name",
1968
+ "meta": [
1969
+ {
1970
+ "name": "required",
1971
+ "value": "true"
1972
+ }
1973
+ ]
1974
+ },
1975
+ {
1976
+ "name": "lastName",
1977
+ "type": "string",
1978
+ "description": "User's last name",
1979
+ "meta": [
1980
+ {
1981
+ "name": "required",
1982
+ "value": "true"
1983
+ }
1984
+ ]
1985
+ },
1986
+ {
1987
+ "name": "role",
1988
+ "type": "$$enum",
1989
+ "description": "User's role in the system",
1990
+ "meta": [
1991
+ {
1992
+ "name": "required",
1993
+ "value": "true"
1994
+ },
1995
+ {
1996
+ "name": "enum-type",
1997
+ "value": "string"
1998
+ }
1999
+ ],
2000
+ "properties": [
2001
+ {
2002
+ "name": "user",
2003
+ "type": "string",
2004
+ "description": "",
2005
+ "meta": []
2006
+ },
2007
+ {
2008
+ "name": "admin",
2009
+ "type": "string",
2010
+ "description": "",
2011
+ "meta": []
2012
+ },
2013
+ {
2014
+ "name": "moderator",
2015
+ "type": "string",
2016
+ "description": "",
2017
+ "meta": []
2018
+ }
2019
+ ]
2020
+ },
2021
+ {
2022
+ "name": "isActive",
2023
+ "type": "boolean",
2024
+ "description": "Whether the user account is active",
2025
+ "meta": [
2026
+ {
2027
+ "name": "required",
2028
+ "value": "true"
2029
+ }
2030
+ ]
2031
+ },
2032
+ {
2033
+ "name": "createdAt",
2034
+ "type": "string",
2035
+ "description": "When the user was created",
2036
+ "meta": [
2037
+ {
2038
+ "name": "required",
2039
+ "value": "true"
2040
+ }
2041
+ ]
2042
+ },
2043
+ {
2044
+ "name": "updatedAt",
2045
+ "type": "string",
2046
+ "description": "When the user was last updated",
2047
+ "meta": [
2048
+ {
2049
+ "name": "required",
2050
+ "value": "true"
2051
+ }
2052
+ ]
2053
+ }
2054
+ ]
2055
+ }
2056
+ ],
2057
+ "meta": [
2058
+ {
2059
+ "name": "status",
2060
+ "value": "200"
2061
+ },
2062
+ {
2063
+ "name": "contentType",
2064
+ "value": "application/json"
2065
+ },
2066
+ {
2067
+ "name": "definitionDescription",
2068
+ "value": ""
2069
+ }
2070
+ ]
2071
+ },
2072
+ {
2073
+ "title": "401",
2074
+ "description": "Invalid credentials",
2075
+ "properties": [
2076
+ {
2077
+ "name": "error",
2078
+ "type": "string",
2079
+ "description": "Error message",
2080
+ "meta": [
2081
+ {
2082
+ "name": "required",
2083
+ "value": "true"
2084
+ }
2085
+ ]
2086
+ },
2087
+ {
2088
+ "name": "code",
2089
+ "type": "string",
2090
+ "description": "Error code",
2091
+ "meta": [
2092
+ {
2093
+ "name": "required",
2094
+ "value": "true"
2095
+ }
2096
+ ]
2097
+ },
2098
+ {
2099
+ "name": "details",
2100
+ "type": "object",
2101
+ "description": "Additional error details",
2102
+ "meta": []
2103
+ },
2104
+ {
2105
+ "name": "timestamp",
2106
+ "type": "string",
2107
+ "description": "When the error occurred",
2108
+ "meta": [
2109
+ {
2110
+ "name": "required",
2111
+ "value": "true"
2112
+ }
2113
+ ]
2114
+ }
2115
+ ],
2116
+ "meta": [
2117
+ {
2118
+ "name": "status",
2119
+ "value": "401"
2120
+ },
2121
+ {
2122
+ "name": "contentType",
2123
+ "value": "application/json"
2124
+ },
2125
+ {
2126
+ "name": "definitionDescription",
2127
+ "value": ""
2128
+ }
2129
+ ]
2130
+ }
2131
+ ],
2132
+ "properties": []
2133
+ }
2134
+ ]
2135
+ },
2136
+ {
2137
+ "title": "Refresh token",
2138
+ "canonical": "refreshToken",
2139
+ "description": "Refresh an access token using a refresh token",
2140
+ "type": "rest_post",
2141
+ "category": "rest",
2142
+ "context": {
2143
+ "method": "post",
2144
+ "path": "/auth/refresh",
2145
+ "fullPath": "https:/api.example.com/v1/auth/refresh",
2146
+ "group": [
2147
+ "Authentication"
2148
+ ],
2149
+ "scopes": []
2150
+ },
2151
+ "examples": {
2152
+ "groups": [
2153
+ {
2154
+ "description": "Example request",
2155
+ "examples": [
2156
+ {
2157
+ "codeblock": {
2158
+ "tabs": [
2159
+ {
2160
+ "title": "shell",
2161
+ "language": "shell",
2162
+ "code": "curl --request POST \\\n --url https://api.example.com/v1/auth/refresh"
2163
+ },
2164
+ {
2165
+ "title": "javascript",
2166
+ "language": "javascript",
2167
+ "code": "const options = {method: 'POST'};\n\nfetch('https://api.example.com/v1/auth/refresh', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
2168
+ },
2169
+ {
2170
+ "title": "python",
2171
+ "language": "python",
2172
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/auth/refresh\"\n\nresponse = requests.post(url)\n\nprint(response.text)"
2173
+ },
2174
+ {
2175
+ "title": "go",
2176
+ "language": "go",
2177
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/auth/refresh\"\n\n\treq, _ := http.NewRequest(\"POST\", 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}"
2178
+ }
2179
+ ]
2180
+ }
2181
+ }
2182
+ ]
2183
+ },
2184
+ {
2185
+ "description": "Example response",
2186
+ "examples": [
2187
+ {
2188
+ "codeblock": {
2189
+ "title": "200",
2190
+ "tabs": [
2191
+ {
2192
+ "title": "application/json",
2193
+ "language": "json",
2194
+ "code": "{\n \"accessToken\": \"string\",\n \"refreshToken\": \"string\",\n \"expiresIn\": 0,\n \"user\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"email\": \"user@example.com\",\n \"firstName\": \"string\",\n \"lastName\": \"string\",\n \"role\": \"user\",\n \"isActive\": true,\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"updatedAt\": \"2019-08-24T14:15:22Z\"\n }\n}"
2195
+ }
2196
+ ]
2197
+ }
2198
+ },
2199
+ {
2200
+ "codeblock": {
2201
+ "title": "401",
2202
+ "tabs": [
2203
+ {
2204
+ "title": "application/json",
2205
+ "language": "json",
2206
+ "code": "{\n \"error\": \"string\",\n \"code\": \"string\",\n \"details\": {},\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n}"
2207
+ }
2208
+ ]
2209
+ }
2210
+ }
2211
+ ]
2212
+ }
2213
+ ]
2214
+ },
2215
+ "definitions": [
2216
+ {
2217
+ "title": "Request body",
2218
+ "variants": [
2219
+ {
2220
+ "title": "application/json",
2221
+ "description": "",
2222
+ "properties": [
2223
+ {
2224
+ "name": "refreshToken",
2225
+ "type": "string",
2226
+ "description": "JWT refresh token",
2227
+ "meta": [
2228
+ {
2229
+ "name": "required",
2230
+ "value": "true"
2231
+ }
2232
+ ]
2233
+ }
2234
+ ],
2235
+ "meta": [
2236
+ {
2237
+ "name": "contentType",
2238
+ "value": "application/json"
2239
+ },
2240
+ {
2241
+ "name": "required",
2242
+ "value": "true"
2243
+ }
2244
+ ]
2245
+ }
2246
+ ],
2247
+ "properties": [],
2248
+ "meta": [
2249
+ {
2250
+ "name": "required",
2251
+ "value": "true"
2252
+ }
2253
+ ]
2254
+ },
2255
+ {
2256
+ "title": "Response",
2257
+ "variants": [
2258
+ {
2259
+ "title": "200",
2260
+ "description": "Token refreshed successfully",
2261
+ "properties": [
2262
+ {
2263
+ "name": "accessToken",
2264
+ "type": "string",
2265
+ "description": "JWT access token",
2266
+ "meta": [
2267
+ {
2268
+ "name": "required",
2269
+ "value": "true"
2270
+ }
2271
+ ]
2272
+ },
2273
+ {
2274
+ "name": "refreshToken",
2275
+ "type": "string",
2276
+ "description": "JWT refresh token",
2277
+ "meta": [
2278
+ {
2279
+ "name": "required",
2280
+ "value": "true"
2281
+ }
2282
+ ]
2283
+ },
2284
+ {
2285
+ "name": "expiresIn",
2286
+ "type": "integer",
2287
+ "description": "Token expiration time in seconds",
2288
+ "meta": [
2289
+ {
2290
+ "name": "required",
2291
+ "value": "true"
2292
+ }
2293
+ ]
2294
+ },
2295
+ {
2296
+ "name": "user",
2297
+ "type": "object",
2298
+ "description": "",
2299
+ "meta": [
2300
+ {
2301
+ "name": "required",
2302
+ "value": "true"
2303
+ }
2304
+ ],
2305
+ "properties": [
2306
+ {
2307
+ "name": "id",
2308
+ "type": "string",
2309
+ "description": "Unique identifier for the user",
2310
+ "meta": [
2311
+ {
2312
+ "name": "required",
2313
+ "value": "true"
2314
+ }
2315
+ ]
2316
+ },
2317
+ {
2318
+ "name": "email",
2319
+ "type": "string",
2320
+ "description": "User's email address",
2321
+ "meta": [
2322
+ {
2323
+ "name": "required",
2324
+ "value": "true"
2325
+ }
2326
+ ]
2327
+ },
2328
+ {
2329
+ "name": "firstName",
2330
+ "type": "string",
2331
+ "description": "User's first name",
2332
+ "meta": [
2333
+ {
2334
+ "name": "required",
2335
+ "value": "true"
2336
+ }
2337
+ ]
2338
+ },
2339
+ {
2340
+ "name": "lastName",
2341
+ "type": "string",
2342
+ "description": "User's last name",
2343
+ "meta": [
2344
+ {
2345
+ "name": "required",
2346
+ "value": "true"
2347
+ }
2348
+ ]
2349
+ },
2350
+ {
2351
+ "name": "role",
2352
+ "type": "$$enum",
2353
+ "description": "User's role in the system",
2354
+ "meta": [
2355
+ {
2356
+ "name": "required",
2357
+ "value": "true"
2358
+ },
2359
+ {
2360
+ "name": "enum-type",
2361
+ "value": "string"
2362
+ }
2363
+ ],
2364
+ "properties": [
2365
+ {
2366
+ "name": "user",
2367
+ "type": "string",
2368
+ "description": "",
2369
+ "meta": []
2370
+ },
2371
+ {
2372
+ "name": "admin",
2373
+ "type": "string",
2374
+ "description": "",
2375
+ "meta": []
2376
+ },
2377
+ {
2378
+ "name": "moderator",
2379
+ "type": "string",
2380
+ "description": "",
2381
+ "meta": []
2382
+ }
2383
+ ]
2384
+ },
2385
+ {
2386
+ "name": "isActive",
2387
+ "type": "boolean",
2388
+ "description": "Whether the user account is active",
2389
+ "meta": [
2390
+ {
2391
+ "name": "required",
2392
+ "value": "true"
2393
+ }
2394
+ ]
2395
+ },
2396
+ {
2397
+ "name": "createdAt",
2398
+ "type": "string",
2399
+ "description": "When the user was created",
2400
+ "meta": [
2401
+ {
2402
+ "name": "required",
2403
+ "value": "true"
2404
+ }
2405
+ ]
2406
+ },
2407
+ {
2408
+ "name": "updatedAt",
2409
+ "type": "string",
2410
+ "description": "When the user was last updated",
2411
+ "meta": [
2412
+ {
2413
+ "name": "required",
2414
+ "value": "true"
2415
+ }
2416
+ ]
2417
+ }
2418
+ ]
2419
+ }
2420
+ ],
2421
+ "meta": [
2422
+ {
2423
+ "name": "status",
2424
+ "value": "200"
2425
+ },
2426
+ {
2427
+ "name": "contentType",
2428
+ "value": "application/json"
2429
+ },
2430
+ {
2431
+ "name": "definitionDescription",
2432
+ "value": ""
2433
+ }
2434
+ ]
2435
+ },
2436
+ {
2437
+ "title": "401",
2438
+ "description": "Invalid refresh token",
2439
+ "properties": [
2440
+ {
2441
+ "name": "error",
2442
+ "type": "string",
2443
+ "description": "Error message",
2444
+ "meta": [
2445
+ {
2446
+ "name": "required",
2447
+ "value": "true"
2448
+ }
2449
+ ]
2450
+ },
2451
+ {
2452
+ "name": "code",
2453
+ "type": "string",
2454
+ "description": "Error code",
2455
+ "meta": [
2456
+ {
2457
+ "name": "required",
2458
+ "value": "true"
2459
+ }
2460
+ ]
2461
+ },
2462
+ {
2463
+ "name": "details",
2464
+ "type": "object",
2465
+ "description": "Additional error details",
2466
+ "meta": []
2467
+ },
2468
+ {
2469
+ "name": "timestamp",
2470
+ "type": "string",
2471
+ "description": "When the error occurred",
2472
+ "meta": [
2473
+ {
2474
+ "name": "required",
2475
+ "value": "true"
2476
+ }
2477
+ ]
2478
+ }
2479
+ ],
2480
+ "meta": [
2481
+ {
2482
+ "name": "status",
2483
+ "value": "401"
2484
+ },
2485
+ {
2486
+ "name": "contentType",
2487
+ "value": "application/json"
2488
+ },
2489
+ {
2490
+ "name": "definitionDescription",
2491
+ "value": ""
2492
+ }
2493
+ ]
2494
+ }
2495
+ ],
2496
+ "properties": []
2497
+ }
2498
+ ]
2499
+ },
2500
+ {
2501
+ "title": "Health check",
2502
+ "canonical": "healthCheck",
2503
+ "description": "Check the health status of the API",
2504
+ "type": "rest_get",
2505
+ "category": "rest",
2506
+ "context": {
2507
+ "method": "get",
2508
+ "path": "/health",
2509
+ "fullPath": "https:/api.example.com/v1/health",
2510
+ "group": [
2511
+ "System"
2512
+ ],
2513
+ "scopes": []
2514
+ },
2515
+ "examples": {
2516
+ "groups": [
2517
+ {
2518
+ "description": "Example request",
2519
+ "examples": [
2520
+ {
2521
+ "codeblock": {
2522
+ "tabs": [
2523
+ {
2524
+ "title": "shell",
2525
+ "language": "shell",
2526
+ "code": "curl --request GET \\\n --url https://api.example.com/v1/health"
2527
+ },
2528
+ {
2529
+ "title": "javascript",
2530
+ "language": "javascript",
2531
+ "code": "const options = {method: 'GET'};\n\nfetch('https://api.example.com/v1/health', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));"
2532
+ },
2533
+ {
2534
+ "title": "python",
2535
+ "language": "python",
2536
+ "code": "import requests\n\nurl = \"https://api.example.com/v1/health\"\n\nresponse = requests.get(url)\n\nprint(response.text)"
2537
+ },
2538
+ {
2539
+ "title": "go",
2540
+ "language": "go",
2541
+ "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.example.com/v1/health\"\n\n\treq, _ := http.NewRequest(\"GET\", 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}"
2542
+ }
2543
+ ]
2544
+ }
2545
+ }
2546
+ ]
2547
+ },
2548
+ {
2549
+ "description": "Example response",
2550
+ "examples": [
2551
+ {
2552
+ "codeblock": {
2553
+ "title": "200",
2554
+ "tabs": [
2555
+ {
2556
+ "title": "application/json",
2557
+ "language": "json",
2558
+ "code": "{\n \"status\": \"healthy\",\n \"timestamp\": \"2019-08-24T14:15:22Z\",\n \"version\": \"string\",\n \"uptime\": 0\n}"
2559
+ }
2560
+ ]
2561
+ }
2562
+ }
2563
+ ]
2564
+ }
2565
+ ]
2566
+ },
2567
+ "definitions": [
2568
+ {
2569
+ "title": "Response",
2570
+ "variants": [
2571
+ {
2572
+ "title": "200",
2573
+ "description": "API is healthy",
2574
+ "properties": [
2575
+ {
2576
+ "name": "status",
2577
+ "type": "$$enum",
2578
+ "description": "Overall health status",
2579
+ "meta": [
2580
+ {
2581
+ "name": "required",
2582
+ "value": "true"
2583
+ },
2584
+ {
2585
+ "name": "enum-type",
2586
+ "value": "string"
2587
+ }
2588
+ ],
2589
+ "properties": [
2590
+ {
2591
+ "name": "healthy",
2592
+ "type": "string",
2593
+ "description": "",
2594
+ "meta": []
2595
+ },
2596
+ {
2597
+ "name": "unhealthy",
2598
+ "type": "string",
2599
+ "description": "",
2600
+ "meta": []
2601
+ }
2602
+ ]
2603
+ },
2604
+ {
2605
+ "name": "timestamp",
2606
+ "type": "string",
2607
+ "description": "When the health check was performed",
2608
+ "meta": [
2609
+ {
2610
+ "name": "required",
2611
+ "value": "true"
2612
+ }
2613
+ ]
2614
+ },
2615
+ {
2616
+ "name": "version",
2617
+ "type": "string",
2618
+ "description": "API version",
2619
+ "meta": [
2620
+ {
2621
+ "name": "required",
2622
+ "value": "true"
2623
+ }
2624
+ ]
2625
+ },
2626
+ {
2627
+ "name": "uptime",
2628
+ "type": "number",
2629
+ "description": "API uptime in seconds",
2630
+ "meta": [
2631
+ {
2632
+ "name": "required",
2633
+ "value": "true"
2634
+ }
2635
+ ]
2636
+ }
2637
+ ],
2638
+ "meta": [
2639
+ {
2640
+ "name": "status",
2641
+ "value": "200"
2642
+ },
2643
+ {
2644
+ "name": "contentType",
2645
+ "value": "application/json"
2646
+ },
2647
+ {
2648
+ "name": "definitionDescription",
2649
+ "value": ""
2650
+ }
2651
+ ]
2652
+ }
2653
+ ],
2654
+ "properties": []
2655
+ }
2656
+ ]
2657
+ },
2658
+ {
2659
+ "title": "User",
2660
+ "description": "",
2661
+ "canonical": "objects/User",
2662
+ "definitions": [
2663
+ {
2664
+ "title": "User",
2665
+ "properties": [
2666
+ {
2667
+ "name": "id",
2668
+ "type": "string",
2669
+ "description": "Unique identifier for the user",
2670
+ "meta": [
2671
+ {
2672
+ "name": "required",
2673
+ "value": "true"
2674
+ }
2675
+ ]
2676
+ },
2677
+ {
2678
+ "name": "email",
2679
+ "type": "string",
2680
+ "description": "User's email address",
2681
+ "meta": [
2682
+ {
2683
+ "name": "required",
2684
+ "value": "true"
2685
+ }
2686
+ ]
2687
+ },
2688
+ {
2689
+ "name": "firstName",
2690
+ "type": "string",
2691
+ "description": "User's first name",
2692
+ "meta": [
2693
+ {
2694
+ "name": "required",
2695
+ "value": "true"
2696
+ }
2697
+ ]
2698
+ },
2699
+ {
2700
+ "name": "lastName",
2701
+ "type": "string",
2702
+ "description": "User's last name",
2703
+ "meta": [
2704
+ {
2705
+ "name": "required",
2706
+ "value": "true"
2707
+ }
2708
+ ]
2709
+ },
2710
+ {
2711
+ "name": "role",
2712
+ "type": "$$enum",
2713
+ "description": "User's role in the system",
2714
+ "meta": [
2715
+ {
2716
+ "name": "required",
2717
+ "value": "true"
2718
+ },
2719
+ {
2720
+ "name": "enum-type",
2721
+ "value": "string"
2722
+ }
2723
+ ],
2724
+ "properties": [
2725
+ {
2726
+ "name": "user",
2727
+ "type": "string",
2728
+ "description": "",
2729
+ "meta": []
2730
+ },
2731
+ {
2732
+ "name": "admin",
2733
+ "type": "string",
2734
+ "description": "",
2735
+ "meta": []
2736
+ },
2737
+ {
2738
+ "name": "moderator",
2739
+ "type": "string",
2740
+ "description": "",
2741
+ "meta": []
2742
+ }
2743
+ ]
2744
+ },
2745
+ {
2746
+ "name": "isActive",
2747
+ "type": "boolean",
2748
+ "description": "Whether the user account is active",
2749
+ "meta": [
2750
+ {
2751
+ "name": "required",
2752
+ "value": "true"
2753
+ }
2754
+ ]
2755
+ },
2756
+ {
2757
+ "name": "createdAt",
2758
+ "type": "string",
2759
+ "description": "When the user was created",
2760
+ "meta": [
2761
+ {
2762
+ "name": "required",
2763
+ "value": "true"
2764
+ }
2765
+ ]
2766
+ },
2767
+ {
2768
+ "name": "updatedAt",
2769
+ "type": "string",
2770
+ "description": "When the user was last updated",
2771
+ "meta": [
2772
+ {
2773
+ "name": "required",
2774
+ "value": "true"
2775
+ }
2776
+ ]
2777
+ }
2778
+ ],
2779
+ "meta": []
2780
+ }
2781
+ ],
2782
+ "examples": {
2783
+ "groups": [
2784
+ {
2785
+ "description": "Example",
2786
+ "examples": [
2787
+ {
2788
+ "codeblock": {
2789
+ "tabs": [
2790
+ {
2791
+ "title": "json",
2792
+ "language": "json",
2793
+ "code": "{\n \"id\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"role\": \"\",\n \"isActive\": false,\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n}"
2794
+ }
2795
+ ]
2796
+ }
2797
+ }
2798
+ ]
2799
+ }
2800
+ ]
2801
+ },
2802
+ "type": "rest_component_schema",
2803
+ "context": {
2804
+ "componentSchema": "User",
2805
+ "group": [
2806
+ "Objects"
2807
+ ]
2808
+ }
2809
+ },
2810
+ {
2811
+ "title": "CreateUserRequest",
2812
+ "description": "",
2813
+ "canonical": "objects/CreateUserRequest",
2814
+ "definitions": [
2815
+ {
2816
+ "title": "CreateUserRequest",
2817
+ "properties": [
2818
+ {
2819
+ "name": "email",
2820
+ "type": "string",
2821
+ "description": "User's email address",
2822
+ "meta": [
2823
+ {
2824
+ "name": "required",
2825
+ "value": "true"
2826
+ }
2827
+ ]
2828
+ },
2829
+ {
2830
+ "name": "password",
2831
+ "type": "string",
2832
+ "description": "User's password",
2833
+ "meta": [
2834
+ {
2835
+ "name": "required",
2836
+ "value": "true"
2837
+ }
2838
+ ]
2839
+ },
2840
+ {
2841
+ "name": "firstName",
2842
+ "type": "string",
2843
+ "description": "User's first name",
2844
+ "meta": [
2845
+ {
2846
+ "name": "required",
2847
+ "value": "true"
2848
+ }
2849
+ ]
2850
+ },
2851
+ {
2852
+ "name": "lastName",
2853
+ "type": "string",
2854
+ "description": "User's last name",
2855
+ "meta": [
2856
+ {
2857
+ "name": "required",
2858
+ "value": "true"
2859
+ }
2860
+ ]
2861
+ },
2862
+ {
2863
+ "name": "role",
2864
+ "type": "$$enum",
2865
+ "description": "User's role in the system",
2866
+ "meta": [
2867
+ {
2868
+ "name": "defaults",
2869
+ "value": "user"
2870
+ },
2871
+ {
2872
+ "name": "enum-type",
2873
+ "value": "string"
2874
+ }
2875
+ ],
2876
+ "properties": [
2877
+ {
2878
+ "name": "user",
2879
+ "type": "string",
2880
+ "description": "",
2881
+ "meta": []
2882
+ },
2883
+ {
2884
+ "name": "admin",
2885
+ "type": "string",
2886
+ "description": "",
2887
+ "meta": []
2888
+ },
2889
+ {
2890
+ "name": "moderator",
2891
+ "type": "string",
2892
+ "description": "",
2893
+ "meta": []
2894
+ }
2895
+ ]
2896
+ }
2897
+ ],
2898
+ "meta": []
2899
+ }
2900
+ ],
2901
+ "examples": {
2902
+ "groups": [
2903
+ {
2904
+ "description": "Example",
2905
+ "examples": [
2906
+ {
2907
+ "codeblock": {
2908
+ "tabs": [
2909
+ {
2910
+ "title": "json",
2911
+ "language": "json",
2912
+ "code": "{\n \"email\": \"\",\n \"password\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"role\": \"\"\n}"
2913
+ }
2914
+ ]
2915
+ }
2916
+ }
2917
+ ]
2918
+ }
2919
+ ]
2920
+ },
2921
+ "type": "rest_component_schema",
2922
+ "context": {
2923
+ "componentSchema": "CreateUserRequest",
2924
+ "group": [
2925
+ "Objects"
2926
+ ]
2927
+ }
2928
+ },
2929
+ {
2930
+ "title": "UpdateUserRequest",
2931
+ "description": "",
2932
+ "canonical": "objects/UpdateUserRequest",
2933
+ "definitions": [
2934
+ {
2935
+ "title": "UpdateUserRequest",
2936
+ "properties": [
2937
+ {
2938
+ "name": "firstName",
2939
+ "type": "string",
2940
+ "description": "User's first name",
2941
+ "meta": []
2942
+ },
2943
+ {
2944
+ "name": "lastName",
2945
+ "type": "string",
2946
+ "description": "User's last name",
2947
+ "meta": []
2948
+ },
2949
+ {
2950
+ "name": "role",
2951
+ "type": "$$enum",
2952
+ "description": "User's role in the system",
2953
+ "meta": [
2954
+ {
2955
+ "name": "enum-type",
2956
+ "value": "string"
2957
+ }
2958
+ ],
2959
+ "properties": [
2960
+ {
2961
+ "name": "user",
2962
+ "type": "string",
2963
+ "description": "",
2964
+ "meta": []
2965
+ },
2966
+ {
2967
+ "name": "admin",
2968
+ "type": "string",
2969
+ "description": "",
2970
+ "meta": []
2971
+ },
2972
+ {
2973
+ "name": "moderator",
2974
+ "type": "string",
2975
+ "description": "",
2976
+ "meta": []
2977
+ }
2978
+ ]
2979
+ },
2980
+ {
2981
+ "name": "isActive",
2982
+ "type": "boolean",
2983
+ "description": "Whether the user account is active",
2984
+ "meta": []
2985
+ }
2986
+ ],
2987
+ "meta": []
2988
+ }
2989
+ ],
2990
+ "examples": {
2991
+ "groups": [
2992
+ {
2993
+ "description": "Example",
2994
+ "examples": [
2995
+ {
2996
+ "codeblock": {
2997
+ "tabs": [
2998
+ {
2999
+ "title": "json",
3000
+ "language": "json",
3001
+ "code": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"role\": \"\",\n \"isActive\": false\n}"
3002
+ }
3003
+ ]
3004
+ }
3005
+ }
3006
+ ]
3007
+ }
3008
+ ]
3009
+ },
3010
+ "type": "rest_component_schema",
3011
+ "context": {
3012
+ "componentSchema": "UpdateUserRequest",
3013
+ "group": [
3014
+ "Objects"
3015
+ ]
3016
+ }
3017
+ },
3018
+ {
3019
+ "title": "UserList",
3020
+ "description": "",
3021
+ "canonical": "objects/UserList",
3022
+ "definitions": [
3023
+ {
3024
+ "title": "UserList",
3025
+ "properties": [
3026
+ {
3027
+ "name": "data",
3028
+ "type": "$$array",
3029
+ "description": "",
3030
+ "meta": [
3031
+ {
3032
+ "name": "required",
3033
+ "value": "true"
3034
+ }
3035
+ ],
3036
+ "properties": [],
3037
+ "ofProperty": {
3038
+ "name": "",
3039
+ "type": "object",
3040
+ "properties": [
3041
+ {
3042
+ "name": "id",
3043
+ "type": "string",
3044
+ "description": "Unique identifier for the user",
3045
+ "meta": [
3046
+ {
3047
+ "name": "required",
3048
+ "value": "true"
3049
+ }
3050
+ ]
3051
+ },
3052
+ {
3053
+ "name": "email",
3054
+ "type": "string",
3055
+ "description": "User's email address",
3056
+ "meta": [
3057
+ {
3058
+ "name": "required",
3059
+ "value": "true"
3060
+ }
3061
+ ]
3062
+ },
3063
+ {
3064
+ "name": "firstName",
3065
+ "type": "string",
3066
+ "description": "User's first name",
3067
+ "meta": [
3068
+ {
3069
+ "name": "required",
3070
+ "value": "true"
3071
+ }
3072
+ ]
3073
+ },
3074
+ {
3075
+ "name": "lastName",
3076
+ "type": "string",
3077
+ "description": "User's last name",
3078
+ "meta": [
3079
+ {
3080
+ "name": "required",
3081
+ "value": "true"
3082
+ }
3083
+ ]
3084
+ },
3085
+ {
3086
+ "name": "role",
3087
+ "type": "$$enum",
3088
+ "description": "User's role in the system",
3089
+ "meta": [
3090
+ {
3091
+ "name": "required",
3092
+ "value": "true"
3093
+ },
3094
+ {
3095
+ "name": "enum-type",
3096
+ "value": "string"
3097
+ }
3098
+ ],
3099
+ "properties": [
3100
+ {
3101
+ "name": "user",
3102
+ "type": "string",
3103
+ "description": "",
3104
+ "meta": []
3105
+ },
3106
+ {
3107
+ "name": "admin",
3108
+ "type": "string",
3109
+ "description": "",
3110
+ "meta": []
3111
+ },
3112
+ {
3113
+ "name": "moderator",
3114
+ "type": "string",
3115
+ "description": "",
3116
+ "meta": []
3117
+ }
3118
+ ]
3119
+ },
3120
+ {
3121
+ "name": "isActive",
3122
+ "type": "boolean",
3123
+ "description": "Whether the user account is active",
3124
+ "meta": [
3125
+ {
3126
+ "name": "required",
3127
+ "value": "true"
3128
+ }
3129
+ ]
3130
+ },
3131
+ {
3132
+ "name": "createdAt",
3133
+ "type": "string",
3134
+ "description": "When the user was created",
3135
+ "meta": [
3136
+ {
3137
+ "name": "required",
3138
+ "value": "true"
3139
+ }
3140
+ ]
3141
+ },
3142
+ {
3143
+ "name": "updatedAt",
3144
+ "type": "string",
3145
+ "description": "When the user was last updated",
3146
+ "meta": [
3147
+ {
3148
+ "name": "required",
3149
+ "value": "true"
3150
+ }
3151
+ ]
3152
+ }
3153
+ ],
3154
+ "description": "",
3155
+ "meta": [
3156
+ {
3157
+ "name": "required",
3158
+ "value": "true"
3159
+ }
3160
+ ]
3161
+ }
3162
+ },
3163
+ {
3164
+ "name": "pagination",
3165
+ "type": "object",
3166
+ "description": "",
3167
+ "meta": [
3168
+ {
3169
+ "name": "required",
3170
+ "value": "true"
3171
+ }
3172
+ ],
3173
+ "properties": [
3174
+ {
3175
+ "name": "page",
3176
+ "type": "integer",
3177
+ "description": "Current page number",
3178
+ "meta": [
3179
+ {
3180
+ "name": "required",
3181
+ "value": "true"
3182
+ }
3183
+ ]
3184
+ },
3185
+ {
3186
+ "name": "limit",
3187
+ "type": "integer",
3188
+ "description": "Number of items per page",
3189
+ "meta": [
3190
+ {
3191
+ "name": "required",
3192
+ "value": "true"
3193
+ }
3194
+ ]
3195
+ },
3196
+ {
3197
+ "name": "total",
3198
+ "type": "integer",
3199
+ "description": "Total number of items",
3200
+ "meta": [
3201
+ {
3202
+ "name": "required",
3203
+ "value": "true"
3204
+ }
3205
+ ]
3206
+ },
3207
+ {
3208
+ "name": "totalPages",
3209
+ "type": "integer",
3210
+ "description": "Total number of pages",
3211
+ "meta": [
3212
+ {
3213
+ "name": "required",
3214
+ "value": "true"
3215
+ }
3216
+ ]
3217
+ }
3218
+ ]
3219
+ }
3220
+ ],
3221
+ "meta": []
3222
+ }
3223
+ ],
3224
+ "examples": {
3225
+ "groups": [
3226
+ {
3227
+ "description": "Example",
3228
+ "examples": [
3229
+ {
3230
+ "codeblock": {
3231
+ "tabs": [
3232
+ {
3233
+ "title": "json",
3234
+ "language": "json",
3235
+ "code": "{\n \"data\": [\n {\n \"id\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"role\": \"\",\n \"isActive\": false,\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n }\n ],\n \"pagination\": {\n \"page\": 0,\n \"limit\": 0,\n \"total\": 0,\n \"totalPages\": 0\n },\n \"__UNSAFE_refPath\": null\n}"
3236
+ }
3237
+ ]
3238
+ }
3239
+ }
3240
+ ]
3241
+ }
3242
+ ]
3243
+ },
3244
+ "type": "rest_component_schema",
3245
+ "context": {
3246
+ "componentSchema": "UserList",
3247
+ "group": [
3248
+ "Objects"
3249
+ ]
3250
+ }
3251
+ },
3252
+ {
3253
+ "title": "Pagination",
3254
+ "description": "",
3255
+ "canonical": "objects/Pagination",
3256
+ "definitions": [
3257
+ {
3258
+ "title": "Pagination",
3259
+ "properties": [
3260
+ {
3261
+ "name": "page",
3262
+ "type": "integer",
3263
+ "description": "Current page number",
3264
+ "meta": [
3265
+ {
3266
+ "name": "required",
3267
+ "value": "true"
3268
+ }
3269
+ ]
3270
+ },
3271
+ {
3272
+ "name": "limit",
3273
+ "type": "integer",
3274
+ "description": "Number of items per page",
3275
+ "meta": [
3276
+ {
3277
+ "name": "required",
3278
+ "value": "true"
3279
+ }
3280
+ ]
3281
+ },
3282
+ {
3283
+ "name": "total",
3284
+ "type": "integer",
3285
+ "description": "Total number of items",
3286
+ "meta": [
3287
+ {
3288
+ "name": "required",
3289
+ "value": "true"
3290
+ }
3291
+ ]
3292
+ },
3293
+ {
3294
+ "name": "totalPages",
3295
+ "type": "integer",
3296
+ "description": "Total number of pages",
3297
+ "meta": [
3298
+ {
3299
+ "name": "required",
3300
+ "value": "true"
3301
+ }
3302
+ ]
3303
+ }
3304
+ ],
3305
+ "meta": []
3306
+ }
3307
+ ],
3308
+ "examples": {
3309
+ "groups": [
3310
+ {
3311
+ "description": "Example",
3312
+ "examples": [
3313
+ {
3314
+ "codeblock": {
3315
+ "tabs": [
3316
+ {
3317
+ "title": "json",
3318
+ "language": "json",
3319
+ "code": "{\n \"page\": 0,\n \"limit\": 0,\n \"total\": 0,\n \"totalPages\": 0\n}"
3320
+ }
3321
+ ]
3322
+ }
3323
+ }
3324
+ ]
3325
+ }
3326
+ ]
3327
+ },
3328
+ "type": "rest_component_schema",
3329
+ "context": {
3330
+ "componentSchema": "Pagination",
3331
+ "group": [
3332
+ "Objects"
3333
+ ]
3334
+ }
3335
+ },
3336
+ {
3337
+ "title": "LoginRequest",
3338
+ "description": "",
3339
+ "canonical": "objects/LoginRequest",
3340
+ "definitions": [
3341
+ {
3342
+ "title": "LoginRequest",
3343
+ "properties": [
3344
+ {
3345
+ "name": "email",
3346
+ "type": "string",
3347
+ "description": "User's email address",
3348
+ "meta": [
3349
+ {
3350
+ "name": "required",
3351
+ "value": "true"
3352
+ }
3353
+ ]
3354
+ },
3355
+ {
3356
+ "name": "password",
3357
+ "type": "string",
3358
+ "description": "User's password",
3359
+ "meta": [
3360
+ {
3361
+ "name": "required",
3362
+ "value": "true"
3363
+ }
3364
+ ]
3365
+ }
3366
+ ],
3367
+ "meta": []
3368
+ }
3369
+ ],
3370
+ "examples": {
3371
+ "groups": [
3372
+ {
3373
+ "description": "Example",
3374
+ "examples": [
3375
+ {
3376
+ "codeblock": {
3377
+ "tabs": [
3378
+ {
3379
+ "title": "json",
3380
+ "language": "json",
3381
+ "code": "{\n \"email\": \"\",\n \"password\": \"\"\n}"
3382
+ }
3383
+ ]
3384
+ }
3385
+ }
3386
+ ]
3387
+ }
3388
+ ]
3389
+ },
3390
+ "type": "rest_component_schema",
3391
+ "context": {
3392
+ "componentSchema": "LoginRequest",
3393
+ "group": [
3394
+ "Objects"
3395
+ ]
3396
+ }
3397
+ },
3398
+ {
3399
+ "title": "LoginResponse",
3400
+ "description": "",
3401
+ "canonical": "objects/LoginResponse",
3402
+ "definitions": [
3403
+ {
3404
+ "title": "LoginResponse",
3405
+ "properties": [
3406
+ {
3407
+ "name": "accessToken",
3408
+ "type": "string",
3409
+ "description": "JWT access token",
3410
+ "meta": [
3411
+ {
3412
+ "name": "required",
3413
+ "value": "true"
3414
+ }
3415
+ ]
3416
+ },
3417
+ {
3418
+ "name": "refreshToken",
3419
+ "type": "string",
3420
+ "description": "JWT refresh token",
3421
+ "meta": [
3422
+ {
3423
+ "name": "required",
3424
+ "value": "true"
3425
+ }
3426
+ ]
3427
+ },
3428
+ {
3429
+ "name": "expiresIn",
3430
+ "type": "integer",
3431
+ "description": "Token expiration time in seconds",
3432
+ "meta": [
3433
+ {
3434
+ "name": "required",
3435
+ "value": "true"
3436
+ }
3437
+ ]
3438
+ },
3439
+ {
3440
+ "name": "user",
3441
+ "type": "object",
3442
+ "description": "",
3443
+ "meta": [
3444
+ {
3445
+ "name": "required",
3446
+ "value": "true"
3447
+ }
3448
+ ],
3449
+ "properties": [
3450
+ {
3451
+ "name": "id",
3452
+ "type": "string",
3453
+ "description": "Unique identifier for the user",
3454
+ "meta": [
3455
+ {
3456
+ "name": "required",
3457
+ "value": "true"
3458
+ }
3459
+ ]
3460
+ },
3461
+ {
3462
+ "name": "email",
3463
+ "type": "string",
3464
+ "description": "User's email address",
3465
+ "meta": [
3466
+ {
3467
+ "name": "required",
3468
+ "value": "true"
3469
+ }
3470
+ ]
3471
+ },
3472
+ {
3473
+ "name": "firstName",
3474
+ "type": "string",
3475
+ "description": "User's first name",
3476
+ "meta": [
3477
+ {
3478
+ "name": "required",
3479
+ "value": "true"
3480
+ }
3481
+ ]
3482
+ },
3483
+ {
3484
+ "name": "lastName",
3485
+ "type": "string",
3486
+ "description": "User's last name",
3487
+ "meta": [
3488
+ {
3489
+ "name": "required",
3490
+ "value": "true"
3491
+ }
3492
+ ]
3493
+ },
3494
+ {
3495
+ "name": "role",
3496
+ "type": "$$enum",
3497
+ "description": "User's role in the system",
3498
+ "meta": [
3499
+ {
3500
+ "name": "required",
3501
+ "value": "true"
3502
+ },
3503
+ {
3504
+ "name": "enum-type",
3505
+ "value": "string"
3506
+ }
3507
+ ],
3508
+ "properties": [
3509
+ {
3510
+ "name": "user",
3511
+ "type": "string",
3512
+ "description": "",
3513
+ "meta": []
3514
+ },
3515
+ {
3516
+ "name": "admin",
3517
+ "type": "string",
3518
+ "description": "",
3519
+ "meta": []
3520
+ },
3521
+ {
3522
+ "name": "moderator",
3523
+ "type": "string",
3524
+ "description": "",
3525
+ "meta": []
3526
+ }
3527
+ ]
3528
+ },
3529
+ {
3530
+ "name": "isActive",
3531
+ "type": "boolean",
3532
+ "description": "Whether the user account is active",
3533
+ "meta": [
3534
+ {
3535
+ "name": "required",
3536
+ "value": "true"
3537
+ }
3538
+ ]
3539
+ },
3540
+ {
3541
+ "name": "createdAt",
3542
+ "type": "string",
3543
+ "description": "When the user was created",
3544
+ "meta": [
3545
+ {
3546
+ "name": "required",
3547
+ "value": "true"
3548
+ }
3549
+ ]
3550
+ },
3551
+ {
3552
+ "name": "updatedAt",
3553
+ "type": "string",
3554
+ "description": "When the user was last updated",
3555
+ "meta": [
3556
+ {
3557
+ "name": "required",
3558
+ "value": "true"
3559
+ }
3560
+ ]
3561
+ }
3562
+ ]
3563
+ }
3564
+ ],
3565
+ "meta": []
3566
+ }
3567
+ ],
3568
+ "examples": {
3569
+ "groups": [
3570
+ {
3571
+ "description": "Example",
3572
+ "examples": [
3573
+ {
3574
+ "codeblock": {
3575
+ "tabs": [
3576
+ {
3577
+ "title": "json",
3578
+ "language": "json",
3579
+ "code": "{\n \"accessToken\": \"\",\n \"refreshToken\": \"\",\n \"expiresIn\": 0,\n \"user\": {\n \"id\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"role\": \"\",\n \"isActive\": false,\n \"createdAt\": \"\",\n \"updatedAt\": \"\"\n },\n \"__UNSAFE_refPath\": null\n}"
3580
+ }
3581
+ ]
3582
+ }
3583
+ }
3584
+ ]
3585
+ }
3586
+ ]
3587
+ },
3588
+ "type": "rest_component_schema",
3589
+ "context": {
3590
+ "componentSchema": "LoginResponse",
3591
+ "group": [
3592
+ "Objects"
3593
+ ]
3594
+ }
3595
+ },
3596
+ {
3597
+ "title": "RefreshTokenRequest",
3598
+ "description": "",
3599
+ "canonical": "objects/RefreshTokenRequest",
3600
+ "definitions": [
3601
+ {
3602
+ "title": "RefreshTokenRequest",
3603
+ "properties": [
3604
+ {
3605
+ "name": "refreshToken",
3606
+ "type": "string",
3607
+ "description": "JWT refresh token",
3608
+ "meta": [
3609
+ {
3610
+ "name": "required",
3611
+ "value": "true"
3612
+ }
3613
+ ]
3614
+ }
3615
+ ],
3616
+ "meta": []
3617
+ }
3618
+ ],
3619
+ "examples": {
3620
+ "groups": [
3621
+ {
3622
+ "description": "Example",
3623
+ "examples": [
3624
+ {
3625
+ "codeblock": {
3626
+ "tabs": [
3627
+ {
3628
+ "title": "json",
3629
+ "language": "json",
3630
+ "code": "{\n \"refreshToken\": \"\"\n}"
3631
+ }
3632
+ ]
3633
+ }
3634
+ }
3635
+ ]
3636
+ }
3637
+ ]
3638
+ },
3639
+ "type": "rest_component_schema",
3640
+ "context": {
3641
+ "componentSchema": "RefreshTokenRequest",
3642
+ "group": [
3643
+ "Objects"
3644
+ ]
3645
+ }
3646
+ },
3647
+ {
3648
+ "title": "HealthResponse",
3649
+ "description": "",
3650
+ "canonical": "objects/HealthResponse",
3651
+ "definitions": [
3652
+ {
3653
+ "title": "HealthResponse",
3654
+ "properties": [
3655
+ {
3656
+ "name": "status",
3657
+ "type": "$$enum",
3658
+ "description": "Overall health status",
3659
+ "meta": [
3660
+ {
3661
+ "name": "required",
3662
+ "value": "true"
3663
+ },
3664
+ {
3665
+ "name": "enum-type",
3666
+ "value": "string"
3667
+ }
3668
+ ],
3669
+ "properties": [
3670
+ {
3671
+ "name": "healthy",
3672
+ "type": "string",
3673
+ "description": "",
3674
+ "meta": []
3675
+ },
3676
+ {
3677
+ "name": "unhealthy",
3678
+ "type": "string",
3679
+ "description": "",
3680
+ "meta": []
3681
+ }
3682
+ ]
3683
+ },
3684
+ {
3685
+ "name": "timestamp",
3686
+ "type": "string",
3687
+ "description": "When the health check was performed",
3688
+ "meta": [
3689
+ {
3690
+ "name": "required",
3691
+ "value": "true"
3692
+ }
3693
+ ]
3694
+ },
3695
+ {
3696
+ "name": "version",
3697
+ "type": "string",
3698
+ "description": "API version",
3699
+ "meta": [
3700
+ {
3701
+ "name": "required",
3702
+ "value": "true"
3703
+ }
3704
+ ]
3705
+ },
3706
+ {
3707
+ "name": "uptime",
3708
+ "type": "number",
3709
+ "description": "API uptime in seconds",
3710
+ "meta": [
3711
+ {
3712
+ "name": "required",
3713
+ "value": "true"
3714
+ }
3715
+ ]
3716
+ }
3717
+ ],
3718
+ "meta": []
3719
+ }
3720
+ ],
3721
+ "examples": {
3722
+ "groups": [
3723
+ {
3724
+ "description": "Example",
3725
+ "examples": [
3726
+ {
3727
+ "codeblock": {
3728
+ "tabs": [
3729
+ {
3730
+ "title": "json",
3731
+ "language": "json",
3732
+ "code": "{\n \"status\": \"\",\n \"timestamp\": \"\",\n \"version\": \"\",\n \"uptime\": 0\n}"
3733
+ }
3734
+ ]
3735
+ }
3736
+ }
3737
+ ]
3738
+ }
3739
+ ]
3740
+ },
3741
+ "type": "rest_component_schema",
3742
+ "context": {
3743
+ "componentSchema": "HealthResponse",
3744
+ "group": [
3745
+ "Objects"
3746
+ ]
3747
+ }
3748
+ },
3749
+ {
3750
+ "title": "Error",
3751
+ "description": "",
3752
+ "canonical": "objects/Error",
3753
+ "definitions": [
3754
+ {
3755
+ "title": "Error",
3756
+ "properties": [
3757
+ {
3758
+ "name": "error",
3759
+ "type": "string",
3760
+ "description": "Error message",
3761
+ "meta": [
3762
+ {
3763
+ "name": "required",
3764
+ "value": "true"
3765
+ }
3766
+ ]
3767
+ },
3768
+ {
3769
+ "name": "code",
3770
+ "type": "string",
3771
+ "description": "Error code",
3772
+ "meta": [
3773
+ {
3774
+ "name": "required",
3775
+ "value": "true"
3776
+ }
3777
+ ]
3778
+ },
3779
+ {
3780
+ "name": "details",
3781
+ "type": "object",
3782
+ "description": "Additional error details",
3783
+ "meta": []
3784
+ },
3785
+ {
3786
+ "name": "timestamp",
3787
+ "type": "string",
3788
+ "description": "When the error occurred",
3789
+ "meta": [
3790
+ {
3791
+ "name": "required",
3792
+ "value": "true"
3793
+ }
3794
+ ]
3795
+ }
3796
+ ],
3797
+ "meta": []
3798
+ }
3799
+ ],
3800
+ "examples": {
3801
+ "groups": [
3802
+ {
3803
+ "description": "Example",
3804
+ "examples": [
3805
+ {
3806
+ "codeblock": {
3807
+ "tabs": [
3808
+ {
3809
+ "title": "json",
3810
+ "language": "json",
3811
+ "code": "{\n \"error\": \"\",\n \"code\": \"\",\n \"details\": null,\n \"timestamp\": \"\"\n}"
3812
+ }
3813
+ ]
3814
+ }
3815
+ }
3816
+ ]
3817
+ }
3818
+ ]
3819
+ },
3820
+ "type": "rest_component_schema",
3821
+ "context": {
3822
+ "componentSchema": "Error",
3823
+ "group": [
3824
+ "Objects"
3825
+ ]
3826
+ }
3827
+ }
3828
+ ]