create-docusaurus-openapi-docs 0.0.0-1235

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 (138) hide show
  1. package/LICENSE +21 -0
  2. package/bin/index.js +36 -0
  3. package/lib/index.d.ts +4 -0
  4. package/lib/index.js +191 -0
  5. package/package.json +48 -0
  6. package/templates/default/blog/2019-05-28-first-blog-post.md +12 -0
  7. package/templates/default/blog/2019-05-29-long-blog-post.md +44 -0
  8. package/templates/default/blog/2021-08-01-mdx-blog-post.mdx +20 -0
  9. package/templates/default/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  10. package/templates/default/blog/2021-08-26-welcome/index.md +25 -0
  11. package/templates/default/blog/authors.yml +17 -0
  12. package/templates/default/docs/intro.md +49 -0
  13. package/templates/default/docs/petstore/add-pet.ParamsDetails.json +19 -0
  14. package/templates/default/docs/petstore/add-pet.RequestSchema.json +288 -0
  15. package/templates/default/docs/petstore/add-pet.StatusCodes.json +1 -0
  16. package/templates/default/docs/petstore/add-pet.api.mdx +45 -0
  17. package/templates/default/docs/petstore/create-user.RequestSchema.json +345 -0
  18. package/templates/default/docs/petstore/create-user.StatusCodes.json +1 -0
  19. package/templates/default/docs/petstore/create-user.api.mdx +45 -0
  20. package/templates/default/docs/petstore/create-users-with-array-input.RequestSchema.json +348 -0
  21. package/templates/default/docs/petstore/create-users-with-array-input.StatusCodes.json +1 -0
  22. package/templates/default/docs/petstore/create-users-with-array-input.api.mdx +47 -0
  23. package/templates/default/docs/petstore/create-users-with-list-input.RequestSchema.json +348 -0
  24. package/templates/default/docs/petstore/create-users-with-list-input.StatusCodes.json +1 -0
  25. package/templates/default/docs/petstore/create-users-with-list-input.api.mdx +47 -0
  26. package/templates/default/docs/petstore/delete-order.ParamsDetails.json +11 -0
  27. package/templates/default/docs/petstore/delete-order.RequestSchema.json +1 -0
  28. package/templates/default/docs/petstore/delete-order.StatusCodes.json +6 -0
  29. package/templates/default/docs/petstore/delete-order.api.mdx +49 -0
  30. package/templates/default/docs/petstore/delete-pet.ParamsDetails.json +18 -0
  31. package/templates/default/docs/petstore/delete-pet.RequestSchema.json +1 -0
  32. package/templates/default/docs/petstore/delete-pet.StatusCodes.json +1 -0
  33. package/templates/default/docs/petstore/delete-pet.api.mdx +43 -0
  34. package/templates/default/docs/petstore/delete-user.ParamsDetails.json +11 -0
  35. package/templates/default/docs/petstore/delete-user.RequestSchema.json +1 -0
  36. package/templates/default/docs/petstore/delete-user.StatusCodes.json +6 -0
  37. package/templates/default/docs/petstore/delete-user.api.mdx +45 -0
  38. package/templates/default/docs/petstore/find-pets-by-status.ParamsDetails.json +21 -0
  39. package/templates/default/docs/petstore/find-pets-by-status.RequestSchema.json +1 -0
  40. package/templates/default/docs/petstore/find-pets-by-status.StatusCodes.json +522 -0
  41. package/templates/default/docs/petstore/find-pets-by-status.api.mdx +51 -0
  42. package/templates/default/docs/petstore/find-pets-by-tags.ParamsDetails.json +12 -0
  43. package/templates/default/docs/petstore/find-pets-by-tags.RequestSchema.json +1 -0
  44. package/templates/default/docs/petstore/find-pets-by-tags.StatusCodes.json +522 -0
  45. package/templates/default/docs/petstore/find-pets-by-tags.api.mdx +55 -0
  46. package/templates/default/docs/petstore/get-inventory.RequestSchema.json +1 -0
  47. package/templates/default/docs/petstore/get-inventory.StatusCodes.json +15 -0
  48. package/templates/default/docs/petstore/get-inventory.api.mdx +43 -0
  49. package/templates/default/docs/petstore/get-order-by-id.ParamsDetails.json +16 -0
  50. package/templates/default/docs/petstore/get-order-by-id.RequestSchema.json +1 -0
  51. package/templates/default/docs/petstore/get-order-by-id.StatusCodes.json +127 -0
  52. package/templates/default/docs/petstore/get-order-by-id.api.mdx +49 -0
  53. package/templates/default/docs/petstore/get-pet-by-id.ParamsDetails.json +12 -0
  54. package/templates/default/docs/petstore/get-pet-by-id.RequestSchema.json +1 -0
  55. package/templates/default/docs/petstore/get-pet-by-id.StatusCodes.json +517 -0
  56. package/templates/default/docs/petstore/get-pet-by-id.api.mdx +49 -0
  57. package/templates/default/docs/petstore/get-user-by-name.ParamsDetails.json +11 -0
  58. package/templates/default/docs/petstore/get-user-by-name.RequestSchema.json +1 -0
  59. package/templates/default/docs/petstore/get-user-by-name.StatusCodes.json +683 -0
  60. package/templates/default/docs/petstore/get-user-by-name.api.mdx +47 -0
  61. package/templates/default/docs/petstore/login-user.ParamsDetails.json +18 -0
  62. package/templates/default/docs/petstore/login-user.RequestSchema.json +1 -0
  63. package/templates/default/docs/petstore/login-user.StatusCodes.json +29 -0
  64. package/templates/default/docs/petstore/login-user.api.mdx +43 -0
  65. package/templates/default/docs/petstore/logout-user.RequestSchema.json +1 -0
  66. package/templates/default/docs/petstore/logout-user.StatusCodes.json +1 -0
  67. package/templates/default/docs/petstore/logout-user.api.mdx +39 -0
  68. package/templates/default/docs/petstore/new-pet.RequestSchema.json +260 -0
  69. package/templates/default/docs/petstore/new-pet.StatusCodes.json +7 -0
  70. package/templates/default/docs/petstore/new-pet.api.mdx +45 -0
  71. package/templates/default/docs/petstore/pet.tag.mdx +15 -0
  72. package/templates/default/docs/petstore/place-order.RequestSchema.json +96 -0
  73. package/templates/default/docs/petstore/place-order.StatusCodes.json +133 -0
  74. package/templates/default/docs/petstore/place-order.api.mdx +43 -0
  75. package/templates/default/docs/petstore/schemas/cat.Schema.json +224 -0
  76. package/templates/default/docs/petstore/schemas/cat.schema.mdx +30 -0
  77. package/templates/default/docs/petstore/sidebar.ts +180 -0
  78. package/templates/default/docs/petstore/store.tag.mdx +15 -0
  79. package/templates/default/docs/petstore/subscribe-to-the-store-events.RequestSchema.2.json +28 -0
  80. package/templates/default/docs/petstore/subscribe-to-the-store-events.RequestSchema.3.json +28 -0
  81. package/templates/default/docs/petstore/subscribe-to-the-store-events.RequestSchema.4.json +25 -0
  82. package/templates/default/docs/petstore/subscribe-to-the-store-events.RequestSchema.5.json +20 -0
  83. package/templates/default/docs/petstore/subscribe-to-the-store-events.RequestSchema.json +27 -0
  84. package/templates/default/docs/petstore/subscribe-to-the-store-events.StatusCodes.2.json +21 -0
  85. package/templates/default/docs/petstore/subscribe-to-the-store-events.StatusCodes.3.json +17 -0
  86. package/templates/default/docs/petstore/subscribe-to-the-store-events.StatusCodes.4.json +9 -0
  87. package/templates/default/docs/petstore/subscribe-to-the-store-events.StatusCodes.5.json +9 -0
  88. package/templates/default/docs/petstore/subscribe-to-the-store-events.StatusCodes.json +20 -0
  89. package/templates/default/docs/petstore/subscribe-to-the-store-events.api.mdx +120 -0
  90. package/templates/default/docs/petstore/swagger-petstore-yaml.info.mdx +249 -0
  91. package/templates/default/docs/petstore/update-pet-with-form.ParamsDetails.json +11 -0
  92. package/templates/default/docs/petstore/update-pet-with-form.RequestSchema.json +22 -0
  93. package/templates/default/docs/petstore/update-pet-with-form.StatusCodes.json +1 -0
  94. package/templates/default/docs/petstore/update-pet-with-form.api.mdx +49 -0
  95. package/templates/default/docs/petstore/update-pet.ParamsDetails.json +19 -0
  96. package/templates/default/docs/petstore/update-pet.RequestSchema.json +288 -0
  97. package/templates/default/docs/petstore/update-pet.StatusCodes.json +7 -0
  98. package/templates/default/docs/petstore/update-pet.api.mdx +43 -0
  99. package/templates/default/docs/petstore/update-user.ParamsDetails.json +11 -0
  100. package/templates/default/docs/petstore/update-user.RequestSchema.json +345 -0
  101. package/templates/default/docs/petstore/update-user.StatusCodes.json +6 -0
  102. package/templates/default/docs/petstore/update-user.api.mdx +45 -0
  103. package/templates/default/docs/petstore/upload-file.ParamsDetails.json +11 -0
  104. package/templates/default/docs/petstore/upload-file.RequestSchema.json +10 -0
  105. package/templates/default/docs/petstore/upload-file.StatusCodes.json +20 -0
  106. package/templates/default/docs/petstore/upload-file.api.mdx +43 -0
  107. package/templates/default/docs/petstore/user.tag.mdx +15 -0
  108. package/templates/default/docs/tutorial-basics/_category_.json +8 -0
  109. package/templates/default/docs/tutorial-basics/congratulations.md +23 -0
  110. package/templates/default/docs/tutorial-basics/create-a-blog-post.md +36 -0
  111. package/templates/default/docs/tutorial-basics/create-a-document.md +55 -0
  112. package/templates/default/docs/tutorial-basics/create-a-page.md +45 -0
  113. package/templates/default/docs/tutorial-basics/deploy-your-site.md +31 -0
  114. package/templates/default/docs/tutorial-basics/markdown-features.mdx +145 -0
  115. package/templates/default/docs/tutorial-extras/_category_.json +7 -0
  116. package/templates/default/docs/tutorial-extras/manage-docs-versions.md +57 -0
  117. package/templates/default/docs/tutorial-extras/translate-your-site.md +90 -0
  118. package/templates/default/docusaurus.config.ts +273 -0
  119. package/templates/default/examples/petstore.yaml +1271 -0
  120. package/templates/default/gitignore +21 -0
  121. package/templates/default/package.json +44 -0
  122. package/templates/default/sidebars.ts +37 -0
  123. package/templates/default/src/components/HomepageFeatures/index.js +64 -0
  124. package/templates/default/src/components/HomepageFeatures/styles.module.css +11 -0
  125. package/templates/default/src/css/custom.css +77 -0
  126. package/templates/default/src/pages/index.js +42 -0
  127. package/templates/default/src/pages/index.module.css +23 -0
  128. package/templates/default/src/pages/markdown-page.md +7 -0
  129. package/templates/default/static/.nojekyll +0 -0
  130. package/templates/default/static/img/docusaurus.png +0 -0
  131. package/templates/default/static/img/favicon.ico +0 -0
  132. package/templates/default/static/img/logo.svg +1 -0
  133. package/templates/default/static/img/tutorial/docsVersionDropdown.png +0 -0
  134. package/templates/default/static/img/tutorial/localeDropdown.png +0 -0
  135. package/templates/default/static/img/undraw_docusaurus_mountain.svg +171 -0
  136. package/templates/default/static/img/undraw_docusaurus_react.svg +170 -0
  137. package/templates/default/static/img/undraw_docusaurus_tree.svg +40 -0
  138. package/templates/default/tsconfig.json +10 -0
@@ -0,0 +1,683 @@
1
+ {
2
+ "responses": {
3
+ "200": {
4
+ "description": "successful operation",
5
+ "content": {
6
+ "application/json": {
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "type": "integer",
12
+ "format": "int64",
13
+ "readOnly": true,
14
+ "title": "Id"
15
+ },
16
+ "pet": {
17
+ "oneOf": [
18
+ {
19
+ "type": "object",
20
+ "required": ["name", "photoUrls", "tags"],
21
+ "discriminator": {
22
+ "propertyName": "petType",
23
+ "mapping": {
24
+ "cat": {
25
+ "x-tags": ["pet"],
26
+ "description": "A representation of a cat",
27
+ "allOf": [
28
+ "circular(Pet)",
29
+ {
30
+ "type": "object",
31
+ "properties": {
32
+ "huntingSkill": {
33
+ "type": "string",
34
+ "description": "The measured skill for hunting",
35
+ "default": "lazy",
36
+ "example": "adventurous",
37
+ "enum": [
38
+ "clueless",
39
+ "lazy",
40
+ "adventurous",
41
+ "aggressive"
42
+ ]
43
+ }
44
+ },
45
+ "required": ["huntingSkill"]
46
+ }
47
+ ],
48
+ "title": "Cat"
49
+ },
50
+ "dog": {
51
+ "description": "A representation of a dog",
52
+ "allOf": [
53
+ "circular(Pet)",
54
+ {
55
+ "type": "object",
56
+ "properties": {
57
+ "packSize": {
58
+ "type": "integer",
59
+ "format": "int32",
60
+ "description": "The size of the pack the dog is from",
61
+ "default": 1,
62
+ "minimum": 1
63
+ }
64
+ },
65
+ "required": ["packSize"]
66
+ }
67
+ ],
68
+ "title": "Dog"
69
+ },
70
+ "bee": {
71
+ "description": "A representation of a honey bee",
72
+ "allOf": [
73
+ "circular(Pet)",
74
+ {
75
+ "type": "object",
76
+ "properties": {
77
+ "honeyPerDay": {
78
+ "type": "number",
79
+ "description": "Average amount of honey produced per day in ounces",
80
+ "example": 3.14,
81
+ "multipleOf": 0.01,
82
+ "default": 0
83
+ }
84
+ },
85
+ "required": ["honeyPerDay"]
86
+ }
87
+ ],
88
+ "title": "HoneyBee"
89
+ }
90
+ }
91
+ },
92
+ "properties": {
93
+ "id": {
94
+ "externalDocs": {
95
+ "description": "Find more info here",
96
+ "url": "https://example.com"
97
+ },
98
+ "description": "Pet ID",
99
+ "allOf": [
100
+ {
101
+ "type": "integer",
102
+ "format": "int64",
103
+ "readOnly": true,
104
+ "title": "Id"
105
+ }
106
+ ]
107
+ },
108
+ "category": {
109
+ "description": "Categories this pet belongs to",
110
+ "allOf": [
111
+ {
112
+ "type": "object",
113
+ "properties": {
114
+ "id": {
115
+ "description": "Category ID",
116
+ "allOf": [
117
+ {
118
+ "type": "integer",
119
+ "format": "int64",
120
+ "readOnly": true,
121
+ "title": "Id"
122
+ }
123
+ ]
124
+ },
125
+ "name": {
126
+ "description": "Category name",
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "sub": {
131
+ "description": "Test Sub Category",
132
+ "type": "object",
133
+ "properties": {
134
+ "prop1": {
135
+ "type": "string",
136
+ "description": "Dumb Property"
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "xml": { "name": "Category" },
142
+ "title": "Category"
143
+ }
144
+ ]
145
+ },
146
+ "name": {
147
+ "description": "The name given to a pet",
148
+ "type": "string",
149
+ "example": "Guru"
150
+ },
151
+ "photoUrls": {
152
+ "description": "The list of URL to a cute photos featuring pet",
153
+ "type": "array",
154
+ "maxItems": 20,
155
+ "xml": { "name": "photoUrl", "wrapped": true },
156
+ "items": { "type": "string", "format": "url" }
157
+ },
158
+ "friend": { "allOf": ["circular(Pet)"] },
159
+ "tags": {
160
+ "description": "Tags attached to the pet",
161
+ "type": "array",
162
+ "minItems": 1,
163
+ "xml": { "name": "tag", "wrapped": true },
164
+ "items": {
165
+ "type": "object",
166
+ "properties": {
167
+ "id": {
168
+ "description": "Tag ID",
169
+ "allOf": [
170
+ {
171
+ "type": "integer",
172
+ "format": "int64",
173
+ "readOnly": true,
174
+ "title": "Id"
175
+ }
176
+ ]
177
+ },
178
+ "name": {
179
+ "description": "Tag name",
180
+ "type": "string",
181
+ "minLength": 1
182
+ }
183
+ },
184
+ "xml": { "name": "Tag" },
185
+ "title": "Tag"
186
+ }
187
+ },
188
+ "status": {
189
+ "type": "string",
190
+ "description": "Pet status in the store",
191
+ "enum": ["available", "pending", "sold"]
192
+ },
193
+ "petType": {
194
+ "description": "Type of a pet",
195
+ "type": "string",
196
+ "oneOf": [
197
+ {
198
+ "x-tags": ["pet"],
199
+ "description": "A representation of a cat",
200
+ "allOf": [
201
+ "circular(Pet)",
202
+ {
203
+ "type": "object",
204
+ "properties": {
205
+ "huntingSkill": {
206
+ "type": "string",
207
+ "description": "The measured skill for hunting",
208
+ "default": "lazy",
209
+ "example": "adventurous",
210
+ "enum": [
211
+ "clueless",
212
+ "lazy",
213
+ "adventurous",
214
+ "aggressive"
215
+ ]
216
+ }
217
+ },
218
+ "required": ["huntingSkill"]
219
+ }
220
+ ],
221
+ "title": "Cat"
222
+ },
223
+ {
224
+ "description": "A representation of a dog",
225
+ "allOf": [
226
+ "circular(Pet)",
227
+ {
228
+ "type": "object",
229
+ "properties": {
230
+ "packSize": {
231
+ "type": "integer",
232
+ "format": "int32",
233
+ "description": "The size of the pack the dog is from",
234
+ "default": 1,
235
+ "minimum": 1
236
+ }
237
+ },
238
+ "required": ["packSize"]
239
+ }
240
+ ],
241
+ "title": "Dog"
242
+ },
243
+ {
244
+ "description": "A representation of a honey bee",
245
+ "allOf": [
246
+ "circular(Pet)",
247
+ {
248
+ "type": "object",
249
+ "properties": {
250
+ "honeyPerDay": {
251
+ "type": "number",
252
+ "description": "Average amount of honey produced per day in ounces",
253
+ "example": 3.14,
254
+ "multipleOf": 0.01,
255
+ "default": 0
256
+ }
257
+ },
258
+ "required": ["honeyPerDay"]
259
+ }
260
+ ],
261
+ "title": "HoneyBee"
262
+ }
263
+ ]
264
+ }
265
+ },
266
+ "xml": { "name": "Pet" },
267
+ "title": "Pet"
268
+ },
269
+ {
270
+ "type": "object",
271
+ "properties": {
272
+ "id": {
273
+ "description": "Tag ID",
274
+ "allOf": [
275
+ {
276
+ "type": "integer",
277
+ "format": "int64",
278
+ "readOnly": true,
279
+ "title": "Id"
280
+ }
281
+ ]
282
+ },
283
+ "name": {
284
+ "description": "Tag name",
285
+ "type": "string",
286
+ "minLength": 1
287
+ }
288
+ },
289
+ "xml": { "name": "Tag" },
290
+ "title": "Tag"
291
+ }
292
+ ]
293
+ },
294
+ "username": {
295
+ "description": "User supplied username",
296
+ "type": "string",
297
+ "minLength": 4,
298
+ "example": "John78"
299
+ },
300
+ "firstName": {
301
+ "description": "User first name",
302
+ "type": "string",
303
+ "minLength": 1,
304
+ "example": "John"
305
+ },
306
+ "lastName": {
307
+ "description": "User last name",
308
+ "type": "string",
309
+ "minLength": 1,
310
+ "example": "Smith"
311
+ },
312
+ "email": {
313
+ "description": "User email address",
314
+ "type": "string",
315
+ "format": "email",
316
+ "example": "john.smith@example.com"
317
+ },
318
+ "password": {
319
+ "type": "string",
320
+ "description": "User password, MUST contain a mix of upper and lower case letters, as well as digits",
321
+ "format": "password",
322
+ "minLength": 8,
323
+ "pattern": "/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/",
324
+ "example": "drowssaP123"
325
+ },
326
+ "phone": {
327
+ "description": "User phone number in international format",
328
+ "type": "string",
329
+ "pattern": "/^\\+(?:[0-9]-?){6,14}[0-9]$/",
330
+ "example": "+1-202-555-0192"
331
+ },
332
+ "userStatus": {
333
+ "description": "User status",
334
+ "type": "integer",
335
+ "format": "int32"
336
+ }
337
+ },
338
+ "xml": { "name": "User" },
339
+ "title": "User"
340
+ }
341
+ },
342
+ "application/xml": {
343
+ "schema": {
344
+ "type": "object",
345
+ "properties": {
346
+ "id": {
347
+ "type": "integer",
348
+ "format": "int64",
349
+ "readOnly": true,
350
+ "title": "Id"
351
+ },
352
+ "pet": {
353
+ "oneOf": [
354
+ {
355
+ "type": "object",
356
+ "required": ["name", "photoUrls", "tags"],
357
+ "discriminator": {
358
+ "propertyName": "petType",
359
+ "mapping": {
360
+ "cat": {
361
+ "x-tags": ["pet"],
362
+ "description": "A representation of a cat",
363
+ "allOf": [
364
+ "circular(Pet)",
365
+ {
366
+ "type": "object",
367
+ "properties": {
368
+ "huntingSkill": {
369
+ "type": "string",
370
+ "description": "The measured skill for hunting",
371
+ "default": "lazy",
372
+ "example": "adventurous",
373
+ "enum": [
374
+ "clueless",
375
+ "lazy",
376
+ "adventurous",
377
+ "aggressive"
378
+ ]
379
+ }
380
+ },
381
+ "required": ["huntingSkill"]
382
+ }
383
+ ],
384
+ "title": "Cat"
385
+ },
386
+ "dog": {
387
+ "description": "A representation of a dog",
388
+ "allOf": [
389
+ "circular(Pet)",
390
+ {
391
+ "type": "object",
392
+ "properties": {
393
+ "packSize": {
394
+ "type": "integer",
395
+ "format": "int32",
396
+ "description": "The size of the pack the dog is from",
397
+ "default": 1,
398
+ "minimum": 1
399
+ }
400
+ },
401
+ "required": ["packSize"]
402
+ }
403
+ ],
404
+ "title": "Dog"
405
+ },
406
+ "bee": {
407
+ "description": "A representation of a honey bee",
408
+ "allOf": [
409
+ "circular(Pet)",
410
+ {
411
+ "type": "object",
412
+ "properties": {
413
+ "honeyPerDay": {
414
+ "type": "number",
415
+ "description": "Average amount of honey produced per day in ounces",
416
+ "example": 3.14,
417
+ "multipleOf": 0.01,
418
+ "default": 0
419
+ }
420
+ },
421
+ "required": ["honeyPerDay"]
422
+ }
423
+ ],
424
+ "title": "HoneyBee"
425
+ }
426
+ }
427
+ },
428
+ "properties": {
429
+ "id": {
430
+ "externalDocs": {
431
+ "description": "Find more info here",
432
+ "url": "https://example.com"
433
+ },
434
+ "description": "Pet ID",
435
+ "allOf": [
436
+ {
437
+ "type": "integer",
438
+ "format": "int64",
439
+ "readOnly": true,
440
+ "title": "Id"
441
+ }
442
+ ]
443
+ },
444
+ "category": {
445
+ "description": "Categories this pet belongs to",
446
+ "allOf": [
447
+ {
448
+ "type": "object",
449
+ "properties": {
450
+ "id": {
451
+ "description": "Category ID",
452
+ "allOf": [
453
+ {
454
+ "type": "integer",
455
+ "format": "int64",
456
+ "readOnly": true,
457
+ "title": "Id"
458
+ }
459
+ ]
460
+ },
461
+ "name": {
462
+ "description": "Category name",
463
+ "type": "string",
464
+ "minLength": 1
465
+ },
466
+ "sub": {
467
+ "description": "Test Sub Category",
468
+ "type": "object",
469
+ "properties": {
470
+ "prop1": {
471
+ "type": "string",
472
+ "description": "Dumb Property"
473
+ }
474
+ }
475
+ }
476
+ },
477
+ "xml": { "name": "Category" },
478
+ "title": "Category"
479
+ }
480
+ ]
481
+ },
482
+ "name": {
483
+ "description": "The name given to a pet",
484
+ "type": "string",
485
+ "example": "Guru"
486
+ },
487
+ "photoUrls": {
488
+ "description": "The list of URL to a cute photos featuring pet",
489
+ "type": "array",
490
+ "maxItems": 20,
491
+ "xml": { "name": "photoUrl", "wrapped": true },
492
+ "items": { "type": "string", "format": "url" }
493
+ },
494
+ "friend": { "allOf": ["circular(Pet)"] },
495
+ "tags": {
496
+ "description": "Tags attached to the pet",
497
+ "type": "array",
498
+ "minItems": 1,
499
+ "xml": { "name": "tag", "wrapped": true },
500
+ "items": {
501
+ "type": "object",
502
+ "properties": {
503
+ "id": {
504
+ "description": "Tag ID",
505
+ "allOf": [
506
+ {
507
+ "type": "integer",
508
+ "format": "int64",
509
+ "readOnly": true,
510
+ "title": "Id"
511
+ }
512
+ ]
513
+ },
514
+ "name": {
515
+ "description": "Tag name",
516
+ "type": "string",
517
+ "minLength": 1
518
+ }
519
+ },
520
+ "xml": { "name": "Tag" },
521
+ "title": "Tag"
522
+ }
523
+ },
524
+ "status": {
525
+ "type": "string",
526
+ "description": "Pet status in the store",
527
+ "enum": ["available", "pending", "sold"]
528
+ },
529
+ "petType": {
530
+ "description": "Type of a pet",
531
+ "type": "string",
532
+ "oneOf": [
533
+ {
534
+ "x-tags": ["pet"],
535
+ "description": "A representation of a cat",
536
+ "allOf": [
537
+ "circular(Pet)",
538
+ {
539
+ "type": "object",
540
+ "properties": {
541
+ "huntingSkill": {
542
+ "type": "string",
543
+ "description": "The measured skill for hunting",
544
+ "default": "lazy",
545
+ "example": "adventurous",
546
+ "enum": [
547
+ "clueless",
548
+ "lazy",
549
+ "adventurous",
550
+ "aggressive"
551
+ ]
552
+ }
553
+ },
554
+ "required": ["huntingSkill"]
555
+ }
556
+ ],
557
+ "title": "Cat"
558
+ },
559
+ {
560
+ "description": "A representation of a dog",
561
+ "allOf": [
562
+ "circular(Pet)",
563
+ {
564
+ "type": "object",
565
+ "properties": {
566
+ "packSize": {
567
+ "type": "integer",
568
+ "format": "int32",
569
+ "description": "The size of the pack the dog is from",
570
+ "default": 1,
571
+ "minimum": 1
572
+ }
573
+ },
574
+ "required": ["packSize"]
575
+ }
576
+ ],
577
+ "title": "Dog"
578
+ },
579
+ {
580
+ "description": "A representation of a honey bee",
581
+ "allOf": [
582
+ "circular(Pet)",
583
+ {
584
+ "type": "object",
585
+ "properties": {
586
+ "honeyPerDay": {
587
+ "type": "number",
588
+ "description": "Average amount of honey produced per day in ounces",
589
+ "example": 3.14,
590
+ "multipleOf": 0.01,
591
+ "default": 0
592
+ }
593
+ },
594
+ "required": ["honeyPerDay"]
595
+ }
596
+ ],
597
+ "title": "HoneyBee"
598
+ }
599
+ ]
600
+ }
601
+ },
602
+ "xml": { "name": "Pet" },
603
+ "title": "Pet"
604
+ },
605
+ {
606
+ "type": "object",
607
+ "properties": {
608
+ "id": {
609
+ "description": "Tag ID",
610
+ "allOf": [
611
+ {
612
+ "type": "integer",
613
+ "format": "int64",
614
+ "readOnly": true,
615
+ "title": "Id"
616
+ }
617
+ ]
618
+ },
619
+ "name": {
620
+ "description": "Tag name",
621
+ "type": "string",
622
+ "minLength": 1
623
+ }
624
+ },
625
+ "xml": { "name": "Tag" },
626
+ "title": "Tag"
627
+ }
628
+ ]
629
+ },
630
+ "username": {
631
+ "description": "User supplied username",
632
+ "type": "string",
633
+ "minLength": 4,
634
+ "example": "John78"
635
+ },
636
+ "firstName": {
637
+ "description": "User first name",
638
+ "type": "string",
639
+ "minLength": 1,
640
+ "example": "John"
641
+ },
642
+ "lastName": {
643
+ "description": "User last name",
644
+ "type": "string",
645
+ "minLength": 1,
646
+ "example": "Smith"
647
+ },
648
+ "email": {
649
+ "description": "User email address",
650
+ "type": "string",
651
+ "format": "email",
652
+ "example": "john.smith@example.com"
653
+ },
654
+ "password": {
655
+ "type": "string",
656
+ "description": "User password, MUST contain a mix of upper and lower case letters, as well as digits",
657
+ "format": "password",
658
+ "minLength": 8,
659
+ "pattern": "/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/",
660
+ "example": "drowssaP123"
661
+ },
662
+ "phone": {
663
+ "description": "User phone number in international format",
664
+ "type": "string",
665
+ "pattern": "/^\\+(?:[0-9]-?){6,14}[0-9]$/",
666
+ "example": "+1-202-555-0192"
667
+ },
668
+ "userStatus": {
669
+ "description": "User status",
670
+ "type": "integer",
671
+ "format": "int32"
672
+ }
673
+ },
674
+ "xml": { "name": "User" },
675
+ "title": "User"
676
+ }
677
+ }
678
+ }
679
+ },
680
+ "400": { "description": "Invalid username supplied" },
681
+ "404": { "description": "User not found" }
682
+ }
683
+ }