rapipdf 2.2.1 → 3.0.0

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 (175) hide show
  1. package/README.md +66 -14
  2. package/dist/chunks/generate-BQLGaRvK.js +386 -0
  3. package/dist/chunks/generate-BQLGaRvK.js.LICENSE.txt +224 -0
  4. package/dist/chunks/localize-CRvDVkIz.js +8 -0
  5. package/dist/node.js +13096 -0
  6. package/dist/node.js.LICENSE.txt +195 -0
  7. package/dist/rapipdf-min.js +352 -90
  8. package/dist/rapipdf-min.js.LICENSE.txt +224 -0
  9. package/dist/rapipdf.js +69 -0
  10. package/package.json +58 -52
  11. package/src/node.d.ts +82 -0
  12. package/src/rapipdf.d.ts +50 -0
  13. package/.babelrc +0 -11
  14. package/.eslintrc +0 -28
  15. package/dist/index.html +0 -7
  16. package/dist/index.html.gz +0 -0
  17. package/dist/rapipdf-min.js.gz +0 -0
  18. package/dist/rapipdf-min.js.map +0 -1
  19. package/dist/rapipdf-min.js.map.gz +0 -0
  20. package/dist/report.html +0 -53
  21. package/docs/api.html +0 -285
  22. package/docs/examples/example1.html +0 -68
  23. package/docs/examples/list.html +0 -27
  24. package/docs/examples/rapidoc-regular.woff2 +0 -0
  25. package/docs/examples/rapidoc-semi-bold.woff2 +0 -0
  26. package/docs/examples/roboto-mono-bold.woff2 +0 -0
  27. package/docs/examples/roboto-mono-regular.woff2 +0 -0
  28. package/docs/highlight/CHANGES.md +0 -1803
  29. package/docs/highlight/LICENSE +0 -24
  30. package/docs/highlight/README.md +0 -188
  31. package/docs/highlight/README.ru.md +0 -142
  32. package/docs/highlight/highlight.pack.js +0 -2
  33. package/docs/highlight/styles/a11y-dark.css +0 -99
  34. package/docs/highlight/styles/a11y-light.css +0 -99
  35. package/docs/highlight/styles/agate.css +0 -108
  36. package/docs/highlight/styles/an-old-hope.css +0 -89
  37. package/docs/highlight/styles/androidstudio.css +0 -66
  38. package/docs/highlight/styles/arduino-light.css +0 -88
  39. package/docs/highlight/styles/arta.css +0 -73
  40. package/docs/highlight/styles/ascetic.css +0 -45
  41. package/docs/highlight/styles/atelier-cave-dark.css +0 -83
  42. package/docs/highlight/styles/atelier-cave-light.css +0 -85
  43. package/docs/highlight/styles/atelier-dune-dark.css +0 -69
  44. package/docs/highlight/styles/atelier-dune-light.css +0 -69
  45. package/docs/highlight/styles/atelier-estuary-dark.css +0 -84
  46. package/docs/highlight/styles/atelier-estuary-light.css +0 -84
  47. package/docs/highlight/styles/atelier-forest-dark.css +0 -69
  48. package/docs/highlight/styles/atelier-forest-light.css +0 -69
  49. package/docs/highlight/styles/atelier-heath-dark.css +0 -69
  50. package/docs/highlight/styles/atelier-heath-light.css +0 -69
  51. package/docs/highlight/styles/atelier-lakeside-dark.css +0 -69
  52. package/docs/highlight/styles/atelier-lakeside-light.css +0 -69
  53. package/docs/highlight/styles/atelier-plateau-dark.css +0 -84
  54. package/docs/highlight/styles/atelier-plateau-light.css +0 -84
  55. package/docs/highlight/styles/atelier-savanna-dark.css +0 -84
  56. package/docs/highlight/styles/atelier-savanna-light.css +0 -84
  57. package/docs/highlight/styles/atelier-seaside-dark.css +0 -69
  58. package/docs/highlight/styles/atelier-seaside-light.css +0 -69
  59. package/docs/highlight/styles/atelier-sulphurpool-dark.css +0 -69
  60. package/docs/highlight/styles/atelier-sulphurpool-light.css +0 -69
  61. package/docs/highlight/styles/atom-one-dark-reasonable.css +0 -77
  62. package/docs/highlight/styles/atom-one-dark.css +0 -96
  63. package/docs/highlight/styles/atom-one-light.css +0 -96
  64. package/docs/highlight/styles/brown-paper.css +0 -64
  65. package/docs/highlight/styles/brown-papersq.png +0 -0
  66. package/docs/highlight/styles/codepen-embed.css +0 -60
  67. package/docs/highlight/styles/color-brewer.css +0 -71
  68. package/docs/highlight/styles/darcula.css +0 -77
  69. package/docs/highlight/styles/dark.css +0 -63
  70. package/docs/highlight/styles/darkula.css +0 -6
  71. package/docs/highlight/styles/default.css +0 -99
  72. package/docs/highlight/styles/docco.css +0 -97
  73. package/docs/highlight/styles/dracula.css +0 -76
  74. package/docs/highlight/styles/far.css +0 -71
  75. package/docs/highlight/styles/foundation.css +0 -88
  76. package/docs/highlight/styles/github-gist.css +0 -71
  77. package/docs/highlight/styles/github.css +0 -99
  78. package/docs/highlight/styles/gml.css +0 -78
  79. package/docs/highlight/styles/googlecode.css +0 -89
  80. package/docs/highlight/styles/grayscale.css +0 -101
  81. package/docs/highlight/styles/gruvbox-dark.css +0 -108
  82. package/docs/highlight/styles/gruvbox-light.css +0 -108
  83. package/docs/highlight/styles/hopscotch.css +0 -83
  84. package/docs/highlight/styles/hybrid.css +0 -102
  85. package/docs/highlight/styles/idea.css +0 -97
  86. package/docs/highlight/styles/ir-black.css +0 -73
  87. package/docs/highlight/styles/isbl-editor-dark.css +0 -112
  88. package/docs/highlight/styles/isbl-editor-light.css +0 -112
  89. package/docs/highlight/styles/kimbie.dark.css +0 -74
  90. package/docs/highlight/styles/kimbie.light.css +0 -74
  91. package/docs/highlight/styles/lightfair.css +0 -87
  92. package/docs/highlight/styles/magula.css +0 -70
  93. package/docs/highlight/styles/mono-blue.css +0 -59
  94. package/docs/highlight/styles/monokai-sublime.css +0 -83
  95. package/docs/highlight/styles/monokai.css +0 -70
  96. package/docs/highlight/styles/nord.css +0 -309
  97. package/docs/highlight/styles/obsidian.css +0 -88
  98. package/docs/highlight/styles/ocean.css +0 -74
  99. package/docs/highlight/styles/paraiso-dark.css +0 -72
  100. package/docs/highlight/styles/paraiso-light.css +0 -72
  101. package/docs/highlight/styles/pojoaque.css +0 -83
  102. package/docs/highlight/styles/pojoaque.jpg +0 -0
  103. package/docs/highlight/styles/purebasic.css +0 -96
  104. package/docs/highlight/styles/qtcreator_dark.css +0 -83
  105. package/docs/highlight/styles/qtcreator_light.css +0 -83
  106. package/docs/highlight/styles/railscasts.css +0 -106
  107. package/docs/highlight/styles/rainbow.css +0 -85
  108. package/docs/highlight/styles/routeros.css +0 -108
  109. package/docs/highlight/styles/school-book.css +0 -72
  110. package/docs/highlight/styles/school-book.png +0 -0
  111. package/docs/highlight/styles/shades-of-purple.css +0 -97
  112. package/docs/highlight/styles/solarized-dark.css +0 -84
  113. package/docs/highlight/styles/solarized-light.css +0 -84
  114. package/docs/highlight/styles/sunburst.css +0 -102
  115. package/docs/highlight/styles/tomorrow-night-blue.css +0 -75
  116. package/docs/highlight/styles/tomorrow-night-bright.css +0 -74
  117. package/docs/highlight/styles/tomorrow-night-eighties.css +0 -74
  118. package/docs/highlight/styles/tomorrow-night.css +0 -75
  119. package/docs/highlight/styles/tomorrow.css +0 -72
  120. package/docs/highlight/styles/vs.css +0 -68
  121. package/docs/highlight/styles/vs2015.css +0 -115
  122. package/docs/highlight/styles/xcode.css +0 -104
  123. package/docs/highlight/styles/xt256.css +0 -92
  124. package/docs/highlight/styles/zenburn.css +0 -80
  125. package/docs/images/console.svg +0 -12
  126. package/docs/images/dark_ss.png +0 -0
  127. package/docs/images/easy.svg +0 -14
  128. package/docs/images/fast.svg +0 -8
  129. package/docs/images/gears.svg +0 -11
  130. package/docs/images/light_ss.png +0 -0
  131. package/docs/images/logo-outline.png +0 -0
  132. package/docs/images/logo.png +0 -0
  133. package/docs/images/love.svg +0 -8
  134. package/docs/images/mask.svg +0 -16
  135. package/docs/images/mouse.svg +0 -7
  136. package/docs/images/pdf_sample1.png +0 -0
  137. package/docs/images/pdf_sample2.png +0 -0
  138. package/docs/images/webcomponent.svg +0 -13
  139. package/docs/index.css +0 -257
  140. package/docs/index.html +0 -186
  141. package/docs/rapipdf-min.js +0 -95
  142. package/docs/specs/allof-primitives.json +0 -80
  143. package/docs/specs/allof.json +0 -73
  144. package/docs/specs/anyof.json +0 -84
  145. package/docs/specs/basic.json +0 -75
  146. package/docs/specs/bitbucket.json +0 -12916
  147. package/docs/specs/data-types.yaml +0 -168
  148. package/docs/specs/gcloud.json +0 -1347
  149. package/docs/specs/no-server.json +0 -1
  150. package/docs/specs/oneof.json +0 -64
  151. package/docs/specs/petstore.json +0 -1042
  152. package/docs/specs/petstore_extended.yaml +0 -889
  153. package/docs/specs/temp.json +0 -53
  154. package/docs/specs/test-specs/large-models.json +0 -5998
  155. package/docs/specs/test-specs/long-descriptions.json +0 -5443
  156. package/docs/specs/test-specs/long-paths.json +0 -9562
  157. package/docs/specs/test-specs/oneof-allof-nested.yaml +0 -105
  158. package/docs/specs/test-specs/partial-spec-main.json +0 -29
  159. package/docs/specs/test-specs/partial.json +0 -17
  160. package/docs/specs/test-specs/petstore_complex_request.yaml +0 -335
  161. package/docs/specs/test-specs/petstore_experimental.yaml +0 -167
  162. package/docs/specs/test-specs/xxx-of-with-primitives-and-recursive-model.yaml +0 -952
  163. package/docs/welcome.html +0 -186
  164. package/index.html +0 -48
  165. package/logo.png +0 -0
  166. package/src/index.js +0 -3
  167. package/src/markdown.js +0 -120
  168. package/src/object-tree-gen.js +0 -370
  169. package/src/pdf-gen.js +0 -113
  170. package/src/pdf-parts-gen.js +0 -488
  171. package/src/rapipdf.js +0 -246
  172. package/src/spec-parser.js +0 -178
  173. package/src/table-layouts.js +0 -35
  174. package/src/vfs_fonts.js +0 -7
  175. package/webpack.config.js +0 -118
@@ -1 +0,0 @@
1
- {"swagger":"2.0","info":{"description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.","version":"1.0.0","title":"Swagger Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"pet","description":"Everything about your Pets","externalDocs":{"description":"Find out more","url":"http://swagger.io"}},{"name":"store","description":"Access to Petstore orders"},{"name":"user","description":"Operations about user","externalDocs":{"description":"Find out more about our store","url":"http://swagger.io"}}],"schemes":["https","http"],"paths":{"/pet":{"post":{"tags":["pet"],"summary":"Add a new pet to the store","description":"","operationId":"addPet","consumes":["application/json","application/xml"],"produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"Pet object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"put":{"tags":["pet"],"summary":"Update an existing pet","description":"","operationId":"updatePet","consumes":["application/json","application/xml"],"produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"Pet object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByStatus":{"get":{"tags":["pet"],"summary":"Finds Pets by status","description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","produces":["application/xml","application/json"],"parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByTags":{"get":{"tags":["pet"],"summary":"Finds Pets by tags","description":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","produces":["application/xml","application/json"],"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"deprecated":true}},"/pet/{petId}":{"get":{"tags":["pet"],"summary":"Find pet by ID","description":"Returns a single pet","operationId":"getPetById","produces":["application/xml","application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Pet"}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}]},"post":{"tags":["pet"],"summary":"Updates a pet in the store with form data","description":"","operationId":"updatePetWithForm","consumes":["application/x-www-form-urlencoded"],"produces":["application/xml","application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"type":"integer","format":"int64"},{"name":"name","in":"formData","description":"Updated name of the pet","required":false,"type":"string"},{"name":"status","in":"formData","description":"Updated status of the pet","required":false,"type":"string"}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"delete":{"tags":["pet"],"summary":"Deletes a pet","description":"","operationId":"deletePet","produces":["application/xml","application/json"],"parameters":[{"name":"api_key","in":"header","required":false,"type":"string"},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"type":"integer","format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{"post":{"tags":["pet"],"summary":"uploads an image","description":"","operationId":"uploadFile","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"type":"integer","format":"int64"},{"name":"additionalMetadata","in":"formData","description":"Additional data to pass to server","required":false,"type":"string"},{"name":"file","in":"formData","description":"file to upload","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/store/inventory":{"get":{"tags":["store"],"summary":"Returns pet inventories by status","description":"Returns a map of status codes to quantities","operationId":"getInventory","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}},"security":[{"api_key":[]}]}},"/store/order":{"post":{"tags":["store"],"summary":"Place an order for a pet","description":"","operationId":"placeOrder","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"order placed for purchasing the pet","required":true,"schema":{"$ref":"#/definitions/Order"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid Order"}}}},"/store/order/{orderId}":{"get":{"tags":["store"],"summary":"Find purchase order by ID","description":"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions","operationId":"getOrderById","produces":["application/xml","application/json"],"parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"type":"integer","maximum":10.0,"minimum":1.0,"format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}}},"delete":{"tags":["store"],"summary":"Delete purchase order by ID","description":"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors","operationId":"deleteOrder","produces":["application/xml","application/json"],"parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"type":"integer","minimum":1.0,"format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}}}},"/user":{"post":{"tags":["user"],"summary":"Create user","description":"This can only be done by the logged in user.","operationId":"createUser","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"Created user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"default":{"description":"successful operation"}}}},"/user/createWithArray":{"post":{"tags":["user"],"summary":"Creates list of users with given input array","description":"","operationId":"createUsersWithArrayInput","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"List of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful operation"}}}},"/user/createWithList":{"post":{"tags":["user"],"summary":"Creates list of users with given input array","description":"","operationId":"createUsersWithListInput","produces":["application/xml","application/json"],"parameters":[{"in":"body","name":"body","description":"List of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful operation"}}}},"/user/login":{"get":{"tags":["user"],"summary":"Logs user into the system","description":"","operationId":"loginUser","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"},"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"}}},"400":{"description":"Invalid username/password supplied"}}}},"/user/logout":{"get":{"tags":["user"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/xml","application/json"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/user/{username}":{"get":{"tags":["user"],"summary":"Get user by user name","description":"","operationId":"getUserByName","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/User"}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}},"put":{"tags":["user"],"summary":"Updated user","description":"This can only be done by the logged in user.","operationId":"updateUser","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"path","description":"name that need to be updated","required":true,"type":"string"},{"in":"body","name":"body","description":"Updated user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}}},"delete":{"tags":["user"],"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"deleteUser","produces":["application/xml","application/json"],"parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"type":"string"}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}}}},"securityDefinitions":{"petstore_auth":{"type":"oauth2","authorizationUrl":"https://petstore.swagger.io/oauth/authorize","flow":"implicit","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}},"api_key":{"type":"apiKey","name":"api_key","in":"header"}},"definitions":{"Order":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"petId":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int32"},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"type":"boolean","default":false}},"xml":{"name":"Order"}},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"phone":{"type":"string"},"userStatus":{"type":"integer","format":"int32","description":"User Status"}},"xml":{"name":"User"}},"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Category"}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Tag"}},"Pet":{"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64"},"category":{"$ref":"#/definitions/Category"},"name":{"type":"string","example":"doggie"},"photoUrls":{"type":"array","xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string"}},"tags":{"type":"array","xml":{"name":"tag","wrapped":true},"items":{"$ref":"#/definitions/Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"Pet"}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}}
@@ -1,64 +0,0 @@
1
- {
2
- "swagger": "2.0",
3
- "info": {
4
- "title": "one-of Models",
5
- "description": "Spec containing model composition using one-of. Checkout the model definition under the RESPONSE section"
6
- },
7
- "consumes": [ "application/json" ],
8
- "produces": [ "application/json" ],
9
- "paths": {
10
- "/api/employee": {
11
- "get": {
12
- "tags": [ "Employee Details"],
13
- "summary": "List of employees",
14
- "operationId": "empDetails",
15
- "responses": {
16
- "200": {
17
- "description": "Checkout the model tab to view object schemas defined using one-of",
18
- "schema": {
19
- "type": "array",
20
- "items": {
21
- "$ref": "#/definitions/employee"
22
- }
23
- }
24
- }
25
- }
26
- }
27
- }
28
- },
29
- "definitions": {
30
- "employee": {
31
- "type": "object",
32
- "additionalProperties": false,
33
- "properties": {
34
- "Id": { "type": "string", "description": "Employee ID"},
35
- "Employee": {
36
- "description": "Employee Details (Worker or Manager)",
37
- "oneOf": [
38
- { "$ref": "#/definitions/manager"},
39
- { "$ref": "#/definitions/worker"}
40
- ]
41
- }
42
- }
43
- },
44
- "manager": {
45
- "type": "object",
46
- "additionalProperties": false,
47
- "properties": {
48
- "name": { "type": "string", "description": "Name of employee" },
49
- "directReports": { "type": "integer", "description": "Count of direct reports" }
50
- }
51
- },
52
- "worker": {
53
- "type": "object",
54
- "additionalProperties": false,
55
- "properties": {
56
- "name": { "type": "string", "description": "Name of employee" },
57
- "managerName": { "type": "string", "description": "Name of manager" }
58
- }
59
- }
60
- },
61
- "tags": [
62
- { "name": "Employee Details", "description": "Employee Details" }
63
- ]
64
- }