@redocly/openapi-docs 3.24.1 → 3.25.0-next.1

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 (283) hide show
  1. package/dist/{redocly-openapi-docs.min.AiChatProvider-j-VDfFJ9.js → redocly-openapi-docs.min.AiChatProvider-CDMc3dS6.js} +1 -1
  2. package/dist/{redocly-openapi-docs.min.AiChatSqliteDBStorage-BBRBmffc.js → redocly-openapi-docs.min.AiChatSqliteDBStorage-BopXqcPv.js} +1 -1
  3. package/dist/{redocly-openapi-docs.min.AiPanel-DTzHqAiI.js → redocly-openapi-docs.min.AiPanel-DkXOeLs5.js} +1 -1
  4. package/dist/redocly-openapi-docs.min.FileWatcher-DMjNW66W.js +1 -0
  5. package/dist/{redocly-openapi-docs.min.SemanticSearchService-DNFOPBZK.js → redocly-openapi-docs.min.SemanticSearchService-DbpnWseN.js} +1 -1
  6. package/dist/{redocly-openapi-docs.min.SqliteDBStorage-Dy40Vq04.js → redocly-openapi-docs.min.SqliteDBStorage-ak3Zqgtw.js} +1 -1
  7. package/dist/{redocly-openapi-docs.min.TauriFileSystemAdapter-CpViFqJQ.js → redocly-openapi-docs.min.TauriFileSystemAdapter-Dl2fY3am.js} +1 -1
  8. package/dist/{redocly-openapi-docs.min.TauriRootStorage-TCUrp2uB.js → redocly-openapi-docs.min.TauriRootStorage-m4plsfqx.js} +1 -1
  9. package/dist/{redocly-openapi-docs.min.ai-chat-mappers-CmX-8902.js → redocly-openapi-docs.min.ai-chat-mappers-Dg8U8w8r.js} +1 -1
  10. package/dist/{redocly-openapi-docs.min.external-resolver-BkceRyB4.js → redocly-openapi-docs.min.external-resolver-Db7hewsm.js} +1 -1
  11. package/dist/{redocly-openapi-docs.min.index-BCcol5vU.js → redocly-openapi-docs.min.index-B5-R6EGY.js} +1 -1
  12. package/dist/{redocly-openapi-docs.min.index-CmXZfuiZ.js → redocly-openapi-docs.min.index-D9U4Tk7n.js} +1320 -1213
  13. package/dist/{redocly-openapi-docs.min.index-DVWw0ICA.js → redocly-openapi-docs.min.index-DeHk4n2z.js} +1 -1
  14. package/dist/{redocly-openapi-docs.min.index-C6uU_v-b.js → redocly-openapi-docs.min.index-EVRmC_IQ.js} +1 -1
  15. package/dist/redocly-openapi-docs.min.js +1 -1
  16. package/dist/{redocly-openapi-docs.min.lint-2YpbCz3r.js → redocly-openapi-docs.min.lint-PvmGrAK3.js} +2 -2
  17. package/dist/{redocly-openapi-docs.min.lint-graphql-Bgfcu2tP.js → redocly-openapi-docs.min.lint-graphql-CMMhYVr_.js} +1 -1
  18. package/dist/{redocly-openapi-docs.min.respect-run-Ct8taisL.js → redocly-openapi-docs.min.respect-run-DgsYdmxw.js} +1 -1
  19. package/dist/{redocly-openapi-docs.min.standalone-BPCdJgtH.js → redocly-openapi-docs.min.standalone-D9becCWS.js} +708 -673
  20. package/dist/redocly-openapi-docs.min.tauri-path-Bv9A5DVf.js +1 -0
  21. package/dist/{redocly-openapi-docs.min.useAiChatQueries-t8oy8jik.js → redocly-openapi-docs.min.useAiChatQueries-Cb-1pa0w.js} +2 -2
  22. package/lib/telemetry/RedocTelemetry.js +1 -31
  23. package/package.json +5 -5
  24. package/dist/redocly-openapi-docs.min.FileWatcher-DDoyaS7A.js +0 -1
  25. package/dist/redocly-openapi-docs.min.tauri-path-CmqBCxGb.js +0 -1
  26. package/lib/components/ApiInfo/__tests__/ApiInfo.test.d.ts +0 -1
  27. package/lib/components/ApiInfo/__tests__/ApiInfo.test.js +0 -46
  28. package/lib/components/Callbacks/__tests__/Callbacks.test.d.ts +0 -1
  29. package/lib/components/Callbacks/__tests__/Callbacks.test.js +0 -46
  30. package/lib/components/Content/__tests__/useAutoScroll.test.d.ts +0 -1
  31. package/lib/components/Content/__tests__/useAutoScroll.test.js +0 -88
  32. package/lib/components/ContentItem/__tests__/useIsExpanded.test.d.ts +0 -1
  33. package/lib/components/ContentItem/__tests__/useIsExpanded.test.js +0 -123
  34. package/lib/components/ContentItems/__tests__/Items.test.d.ts +0 -1
  35. package/lib/components/ContentItems/__tests__/Items.test.js +0 -66
  36. package/lib/components/ContentItems/__tests__/VirtualList.test.d.ts +0 -1
  37. package/lib/components/ContentItems/__tests__/VirtualList.test.js +0 -135
  38. package/lib/components/Discriminator/__tests__/DiscriminatorDropdown.test.d.ts +0 -1
  39. package/lib/components/Discriminator/__tests__/DiscriminatorDropdown.test.js +0 -63
  40. package/lib/components/Download/__tests__/DownloadSpecification.test.d.ts +0 -1
  41. package/lib/components/Download/__tests__/DownloadSpecification.test.js +0 -52
  42. package/lib/components/ExpandAllButton/__tests__/ExpandAllButton.test.d.ts +0 -1
  43. package/lib/components/ExpandAllButton/__tests__/ExpandAllButton.test.js +0 -60
  44. package/lib/components/ExpandAllButton/__tests__/helpers.test.d.ts +0 -1
  45. package/lib/components/ExpandAllButton/__tests__/helpers.test.js +0 -133
  46. package/lib/components/Language/__tests__/LanguageDropdown.test.d.ts +0 -1
  47. package/lib/components/Language/__tests__/LanguageDropdown.test.js +0 -23
  48. package/lib/components/Markdown/__tests__/Markdown.test.d.ts +0 -1
  49. package/lib/components/Markdown/__tests__/Markdown.test.js +0 -34
  50. package/lib/components/McpOverview/__tests__/McpOverview.test.d.ts +0 -1
  51. package/lib/components/McpOverview/__tests__/McpOverview.test.js +0 -66
  52. package/lib/components/McpTool/__tests__/McpPrompt.test.d.ts +0 -1
  53. package/lib/components/McpTool/__tests__/McpPrompt.test.js +0 -57
  54. package/lib/components/McpTool/__tests__/McpResource.test.d.ts +0 -1
  55. package/lib/components/McpTool/__tests__/McpResource.test.js +0 -81
  56. package/lib/components/McpTool/__tests__/McpTool.test.d.ts +0 -1
  57. package/lib/components/McpTool/__tests__/McpTool.test.js +0 -82
  58. package/lib/components/MediaTypeSwitch/__tests__/MediaTypesSwitch.test.d.ts +0 -1
  59. package/lib/components/MediaTypeSwitch/__tests__/MediaTypesSwitch.test.js +0 -79
  60. package/lib/components/OperationItem/__tests__/OperationItem.test.d.ts +0 -1
  61. package/lib/components/OperationItem/__tests__/OperationItem.test.js +0 -70
  62. package/lib/components/OperationItem/__tests__/__mocks__/mock-intersection-observer.d.ts +0 -16
  63. package/lib/components/OperationItem/__tests__/__mocks__/mock-intersection-observer.js +0 -42
  64. package/lib/components/Overview/__tests__/Overview.test.d.ts +0 -1
  65. package/lib/components/Overview/__tests__/Overview.test.js +0 -59
  66. package/lib/components/PayloadSamples/__tests__/Example.test.d.ts +0 -1
  67. package/lib/components/PayloadSamples/__tests__/Example.test.js +0 -36
  68. package/lib/components/PayloadSamples/__tests__/ExampleValue.test.d.ts +0 -1
  69. package/lib/components/PayloadSamples/__tests__/ExampleValue.test.js +0 -197
  70. package/lib/components/PayloadSamples/__tests__/PayloadSamples.test.d.ts +0 -1
  71. package/lib/components/PayloadSamples/__tests__/PayloadSamples.test.js +0 -38
  72. package/lib/components/PropertyDetails/__tests__/Extensions.test.d.ts +0 -1
  73. package/lib/components/PropertyDetails/__tests__/Extensions.test.js +0 -21
  74. package/lib/components/PropertyDetails/__tests__/FieldDetail.test.d.ts +0 -1
  75. package/lib/components/PropertyDetails/__tests__/FieldDetail.test.js +0 -52
  76. package/lib/components/PropertyDetails/__tests__/FieldDetails.test.d.ts +0 -1
  77. package/lib/components/PropertyDetails/__tests__/FieldDetails.test.js +0 -191
  78. package/lib/components/PropertyDetails/__tests__/PropertyDetails.test.d.ts +0 -1
  79. package/lib/components/PropertyDetails/__tests__/PropertyDetails.test.js +0 -365
  80. package/lib/components/PropertyDetails/__tests__/cycleColorsByLevel.test.d.ts +0 -1
  81. package/lib/components/PropertyDetails/__tests__/cycleColorsByLevel.test.js +0 -23
  82. package/lib/components/RedoclyOpenAPIDocs/__tests__/AppProvider.test.d.ts +0 -1
  83. package/lib/components/RedoclyOpenAPIDocs/__tests__/AppProvider.test.js +0 -16
  84. package/lib/components/RedoclyOpenAPIDocs/__tests__/RedoclyOpenAPIDocs.test.d.ts +0 -1
  85. package/lib/components/RedoclyOpenAPIDocs/__tests__/RedoclyOpenAPIDocs.test.js +0 -104
  86. package/lib/components/RenderHook/__tests__/RenderHook.test.d.ts +0 -1
  87. package/lib/components/RenderHook/__tests__/RenderHook.test.js +0 -15
  88. package/lib/components/Replay/__tests__/utils.test.d.ts +0 -1
  89. package/lib/components/Replay/__tests__/utils.test.js +0 -526
  90. package/lib/components/Request/__tests__/RequestDetails.test.d.ts +0 -1
  91. package/lib/components/Request/__tests__/RequestDetails.test.js +0 -98
  92. package/lib/components/RequestSamples/__tests__/Example.test.d.ts +0 -1
  93. package/lib/components/RequestSamples/__tests__/Example.test.js +0 -384
  94. package/lib/components/RequestSamples/__tests__/RequestSamples.test.d.ts +0 -1
  95. package/lib/components/RequestSamples/__tests__/RequestSamples.test.js +0 -226
  96. package/lib/components/RequestSamples/__tests__/useCodeSamples.test.d.ts +0 -1
  97. package/lib/components/RequestSamples/__tests__/useCodeSamples.test.js +0 -64
  98. package/lib/components/ResponseSamples/__tests__/ResponseSamples.test.d.ts +0 -1
  99. package/lib/components/ResponseSamples/__tests__/ResponseSamples.test.js +0 -29
  100. package/lib/components/Responses/__tests__/OperationResponseList.test.d.ts +0 -1
  101. package/lib/components/Responses/__tests__/OperationResponseList.test.js +0 -89
  102. package/lib/components/Responses/__tests__/ResponseDetails.test.d.ts +0 -1
  103. package/lib/components/Responses/__tests__/ResponseDetails.test.js +0 -111
  104. package/lib/components/Responses/__tests__/ResponsesHeaders.test.d.ts +0 -1
  105. package/lib/components/Responses/__tests__/ResponsesHeaders.test.js +0 -26
  106. package/lib/components/Schema/__tests__/ArraySchema.test.d.ts +0 -1
  107. package/lib/components/Schema/__tests__/ArraySchema.test.js +0 -93
  108. package/lib/components/Schema/__tests__/ObjectSchema.test.d.ts +0 -1
  109. package/lib/components/Schema/__tests__/ObjectSchema.test.js +0 -115
  110. package/lib/components/Schema/__tests__/OneOfSchema.test.d.ts +0 -1
  111. package/lib/components/Schema/__tests__/OneOfSchema.test.js +0 -33
  112. package/lib/components/Schema/__tests__/Schema.test.d.ts +0 -1
  113. package/lib/components/Schema/__tests__/Schema.test.js +0 -67
  114. package/lib/components/Schema/__tests__/useOneOfLocationIdx.test.d.ts +0 -1
  115. package/lib/components/Schema/__tests__/useOneOfLocationIdx.test.js +0 -22
  116. package/lib/components/SchemaCatalogLink/__tests__/SchemaCatalogLink.test.d.ts +0 -1
  117. package/lib/components/SchemaCatalogLink/__tests__/SchemaCatalogLink.test.js +0 -95
  118. package/lib/components/Security/__tests__/Security.test.d.ts +0 -1
  119. package/lib/components/Security/__tests__/Security.test.js +0 -38
  120. package/lib/components/Security/__tests__/SecurityButton.test.d.ts +0 -1
  121. package/lib/components/Security/__tests__/SecurityButton.test.js +0 -92
  122. package/lib/components/Security/__tests__/SecurityModal.test.d.ts +0 -1
  123. package/lib/components/Security/__tests__/SecurityModal.test.js +0 -172
  124. package/lib/components/ServerList/__tests__/ServerList.test.d.ts +0 -1
  125. package/lib/components/ServerList/__tests__/ServerList.test.js +0 -83
  126. package/lib/components/Tabs/__tests__/Tabs.test.d.ts +0 -1
  127. package/lib/components/Tabs/__tests__/Tabs.test.js +0 -27
  128. package/lib/components/ViewNested/__tests__/ViewNested.test.d.ts +0 -1
  129. package/lib/components/ViewNested/__tests__/ViewNested.test.js +0 -42
  130. package/lib/components/__tests__/Samples/ExampleSwitch.test.d.ts +0 -1
  131. package/lib/components/__tests__/Samples/ExampleSwitch.test.js +0 -45
  132. package/lib/components/__tests__/Samples/use-example-key.test.d.ts +0 -1
  133. package/lib/components/__tests__/Samples/use-example-key.test.js +0 -28
  134. package/lib/components/__tests__/common/ClearButton.test.d.ts +0 -1
  135. package/lib/components/__tests__/common/ClearButton.test.js +0 -18
  136. package/lib/components/__tests__/common/Dropdown.test.d.ts +0 -1
  137. package/lib/components/__tests__/common/Dropdown.test.js +0 -52
  138. package/lib/components/__tests__/mocks/examples.d.ts +0 -4
  139. package/lib/components/__tests__/mocks/examples.js +0 -115
  140. package/lib/components/common/__tests__/Dropdown.test.d.ts +0 -1
  141. package/lib/components/common/__tests__/Dropdown.test.js +0 -129
  142. package/lib/components/common/__tests__/LinkToField.test.d.ts +0 -1
  143. package/lib/components/common/__tests__/LinkToField.test.js +0 -39
  144. package/lib/jotai/__tests__/app.test.d.ts +0 -1
  145. package/lib/jotai/__tests__/app.test.js +0 -53
  146. package/lib/models/__tests__/Callback.test.d.ts +0 -1
  147. package/lib/models/__tests__/Callback.test.js +0 -15
  148. package/lib/models/__tests__/FieldModel.test.d.ts +0 -1
  149. package/lib/models/__tests__/FieldModel.test.js +0 -117
  150. package/lib/models/__tests__/MediaContent.test.d.ts +0 -1
  151. package/lib/models/__tests__/MediaContent.test.js +0 -105
  152. package/lib/models/__tests__/Operation.test.d.ts +0 -1
  153. package/lib/models/__tests__/Operation.test.js +0 -459
  154. package/lib/models/__tests__/Response.test.d.ts +0 -1
  155. package/lib/models/__tests__/Response.test.js +0 -221
  156. package/lib/models/__tests__/Schema.circular.test.d.ts +0 -1
  157. package/lib/models/__tests__/Schema.circular.test.js +0 -694
  158. package/lib/models/__tests__/Schema.test.d.ts +0 -1
  159. package/lib/models/__tests__/Schema.test.js +0 -1395
  160. package/lib/models/__tests__/example.test.d.ts +0 -1
  161. package/lib/models/__tests__/example.test.js +0 -90
  162. package/lib/models/__tests__/group.test.d.ts +0 -1
  163. package/lib/models/__tests__/group.test.js +0 -52
  164. package/lib/models/__tests__/helpers.d.ts +0 -5
  165. package/lib/models/__tests__/helpers.js +0 -62
  166. package/lib/models/__tests__/request.test.d.ts +0 -1
  167. package/lib/models/__tests__/request.test.js +0 -119
  168. package/lib/services/__tests__/OpenAPIParser.test.d.ts +0 -1
  169. package/lib/services/__tests__/OpenAPIParser.test.js +0 -80
  170. package/lib/services/__tests__/check.test.d.ts +0 -1
  171. package/lib/services/__tests__/check.test.js +0 -22
  172. package/lib/services/__tests__/utils.test.d.ts +0 -1
  173. package/lib/services/__tests__/utils.test.js +0 -42
  174. package/lib/services/code-samples/__tests__/apply-environments.test.d.ts +0 -1
  175. package/lib/services/code-samples/__tests__/apply-environments.test.js +0 -64
  176. package/lib/services/code-samples/__tests__/build-code-samples.test.d.ts +0 -1
  177. package/lib/services/code-samples/__tests__/build-code-samples.test.js +0 -70
  178. package/lib/services/code-samples/__tests__/convertSampleToString.test.d.ts +0 -1
  179. package/lib/services/code-samples/__tests__/convertSampleToString.test.js +0 -116
  180. package/lib/services/code-samples/__tests__/generator-data-value.test.d.ts +0 -1
  181. package/lib/services/code-samples/__tests__/generator-data-value.test.js +0 -277
  182. package/lib/services/code-samples/__tests__/generator-serialized-value.test.d.ts +0 -1
  183. package/lib/services/code-samples/__tests__/generator-serialized-value.test.js +0 -258
  184. package/lib/services/code-samples/__tests__/generator-value.test.d.ts +0 -1
  185. package/lib/services/code-samples/__tests__/generator-value.test.js +0 -273
  186. package/lib/services/code-samples/__tests__/generator.test.d.ts +0 -249
  187. package/lib/services/code-samples/__tests__/generator.test.js +0 -1201
  188. package/lib/services/code-samples/__tests__/get-example-value-by-mime-type.test.d.ts +0 -1
  189. package/lib/services/code-samples/__tests__/get-example-value-by-mime-type.test.js +0 -31
  190. package/lib/services/code-samples/httpsnippet/__tests__/device-authorization.test.d.ts +0 -1
  191. package/lib/services/code-samples/httpsnippet/__tests__/device-authorization.test.js +0 -222
  192. package/lib/services/code-samples/httpsnippet/helpers/__tests__/code-helpers.test.d.ts +0 -1
  193. package/lib/services/code-samples/httpsnippet/helpers/__tests__/code-helpers.test.js +0 -129
  194. package/lib/services/code-samples/httpsnippet/helpers/__tests__/string-utility.test.d.ts +0 -1
  195. package/lib/services/code-samples/httpsnippet/helpers/__tests__/string-utility.test.js +0 -49
  196. package/lib/services/code-samples/httpsnippet/targets/csharp/__tests__/httpclient.test.d.ts +0 -1
  197. package/lib/services/code-samples/httpsnippet/targets/csharp/__tests__/httpclient.test.js +0 -172
  198. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/__tests__/httpclient.test.d.ts +0 -1
  199. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/__tests__/httpclient.test.js +0 -172
  200. package/lib/services/code-samples/httpsnippet/targets/go/__tests__/native.test.d.ts +0 -1
  201. package/lib/services/code-samples/httpsnippet/targets/go/__tests__/native.test.js +0 -130
  202. package/lib/services/code-samples/httpsnippet/targets/java/__tests__/httpclient.test.d.ts +0 -1
  203. package/lib/services/code-samples/httpsnippet/targets/java/__tests__/httpclient.test.js +0 -191
  204. package/lib/services/code-samples/httpsnippet/targets/java8/__tests__/apachehttp.test.d.ts +0 -1
  205. package/lib/services/code-samples/httpsnippet/targets/java8/__tests__/apachehttp.test.js +0 -172
  206. package/lib/services/code-samples/httpsnippet/targets/javascript/__tests__/fetch.test.d.ts +0 -1
  207. package/lib/services/code-samples/httpsnippet/targets/javascript/__tests__/fetch.test.js +0 -85
  208. package/lib/services/code-samples/httpsnippet/targets/node/__tests__/fetch.test.d.ts +0 -1
  209. package/lib/services/code-samples/httpsnippet/targets/node/__tests__/fetch.test.js +0 -85
  210. package/lib/services/code-samples/httpsnippet/targets/php/__tests__/curl.test.d.ts +0 -1
  211. package/lib/services/code-samples/httpsnippet/targets/php/__tests__/curl.test.js +0 -126
  212. package/lib/services/code-samples/httpsnippet/targets/python/__tests__/requests.test.d.ts +0 -1
  213. package/lib/services/code-samples/httpsnippet/targets/python/__tests__/requests.test.js +0 -105
  214. package/lib/services/code-samples/httpsnippet/targets/r/__tests__/httr.test.d.ts +0 -1
  215. package/lib/services/code-samples/httpsnippet/targets/r/__tests__/httr.test.js +0 -126
  216. package/lib/services/code-samples/httpsnippet/targets/ruby/__tests__/native.test.d.ts +0 -1
  217. package/lib/services/code-samples/httpsnippet/targets/ruby/__tests__/native.test.js +0 -129
  218. package/lib/services/code-samples/httpsnippet/targets/shell/__tests__/curl.test.d.ts +0 -1
  219. package/lib/services/code-samples/httpsnippet/targets/shell/__tests__/curl.test.js +0 -129
  220. package/lib/services/config-options/__tests__/helpers.test.d.ts +0 -1
  221. package/lib/services/config-options/__tests__/helpers.test.js +0 -234
  222. package/lib/services/history/__tests__/helpers.test.d.ts +0 -1
  223. package/lib/services/history/__tests__/helpers.test.js +0 -19
  224. package/lib/services/menu/__tests__/buildNestedTagsItems.test.d.ts +0 -1
  225. package/lib/services/menu/__tests__/buildNestedTagsItems.test.js +0 -109
  226. package/lib/services/menu/__tests__/builder.test.d.ts +0 -1
  227. package/lib/services/menu/__tests__/builder.test.js +0 -307
  228. package/lib/services/menu/__tests__/operation.test.d.ts +0 -1
  229. package/lib/services/menu/__tests__/operation.test.js +0 -240
  230. package/lib/services/menu/__tests__/tags.test.d.ts +0 -1
  231. package/lib/services/menu/__tests__/tags.test.js +0 -71
  232. package/lib/telemetry/__tests__/RedocTelemetry.test.d.ts +0 -1
  233. package/lib/telemetry/__tests__/RedocTelemetry.test.js +0 -107
  234. package/lib/testProviders.d.ts +0 -6
  235. package/lib/testProviders.js +0 -14
  236. package/lib/utils/__tests__/areArraysEqual.test.d.ts +0 -1
  237. package/lib/utils/__tests__/areArraysEqual.test.js +0 -33
  238. package/lib/utils/__tests__/argValuesHelpers.d.ts +0 -1
  239. package/lib/utils/__tests__/argValuesHelpers.js +0 -56
  240. package/lib/utils/__tests__/calculateMaxLength.test.d.ts +0 -1
  241. package/lib/utils/__tests__/calculateMaxLength.test.js +0 -119
  242. package/lib/utils/__tests__/configure-helpers.test.d.ts +0 -1
  243. package/lib/utils/__tests__/configure-helpers.test.js +0 -356
  244. package/lib/utils/__tests__/convertSwagger2OpenAPI.test.d.ts +0 -1
  245. package/lib/utils/__tests__/convertSwagger2OpenAPI.test.js +0 -392
  246. package/lib/utils/__tests__/debounce.test.d.ts +0 -1
  247. package/lib/utils/__tests__/debounce.test.js +0 -54
  248. package/lib/utils/__tests__/debug.test.d.ts +0 -1
  249. package/lib/utils/__tests__/debug.test.js +0 -23
  250. package/lib/utils/__tests__/dom.test.d.ts +0 -1
  251. package/lib/utils/__tests__/dom.test.js +0 -108
  252. package/lib/utils/__tests__/getBreadcrumbs.test.d.ts +0 -1
  253. package/lib/utils/__tests__/getBreadcrumbs.test.js +0 -98
  254. package/lib/utils/__tests__/hasNestedFields.test.d.ts +0 -1
  255. package/lib/utils/__tests__/hasNestedFields.test.js +0 -147
  256. package/lib/utils/__tests__/helpers.test.d.ts +0 -1
  257. package/lib/utils/__tests__/helpers.test.js +0 -174
  258. package/lib/utils/__tests__/isMobile.test.d.ts +0 -1
  259. package/lib/utils/__tests__/isMobile.test.js +0 -28
  260. package/lib/utils/__tests__/loadAndBundleSpec.test.d.ts +0 -1
  261. package/lib/utils/__tests__/loadAndBundleSpec.test.js +0 -22
  262. package/lib/utils/__tests__/local-storage.test.d.ts +0 -1
  263. package/lib/utils/__tests__/local-storage.test.js +0 -48
  264. package/lib/utils/__tests__/object.test.d.ts +0 -1
  265. package/lib/utils/__tests__/object.test.js +0 -45
  266. package/lib/utils/__tests__/openapi.test.d.ts +0 -1
  267. package/lib/utils/__tests__/openapi.test.js +0 -1378
  268. package/lib/utils/__tests__/path.test.d.ts +0 -1
  269. package/lib/utils/__tests__/path.test.js +0 -16
  270. package/lib/utils/__tests__/queryString.test.d.ts +0 -1
  271. package/lib/utils/__tests__/queryString.test.js +0 -60
  272. package/lib/utils/__tests__/replaceVariables.test.d.ts +0 -1
  273. package/lib/utils/__tests__/replaceVariables.test.js +0 -46
  274. package/lib/utils/__tests__/simplifyAstStructure.test.d.ts +0 -1
  275. package/lib/utils/__tests__/simplifyAstStructure.test.js +0 -26
  276. package/lib/utils/__tests__/sort.test.d.ts +0 -1
  277. package/lib/utils/__tests__/sort.test.js +0 -16
  278. package/lib/utils/__tests__/string.test.d.ts +0 -1
  279. package/lib/utils/__tests__/string.test.js +0 -16
  280. package/lib/utils/__tests__/theme-helpers.test.d.ts +0 -1
  281. package/lib/utils/__tests__/theme-helpers.test.js +0 -24
  282. package/lib/utils/__tests__/url.test.d.ts +0 -1
  283. package/lib/utils/__tests__/url.test.js +0 -134
@@ -1,172 +0,0 @@
1
- export { HTTPSnippet } from '../../../index.js'; // we need to reexport it before to prevent circular ref issue
2
- import httpclient from '../httpclient.js';
3
- import { originalOptions, serverVariablesOptions, source } from '../../__mocks__/mock.js';
4
- describe('#code-samples C#+Newtonsoft', () => {
5
- describe('handler', () => {
6
- it('returns code API PUT /pet', () => {
7
- const result = httpclient(source['PUT http://petstore.swagger.io/v2/pet'], originalOptions, {
8
- target: 'csharpNewtonsoft',
9
- client: 'httpclient',
10
- });
11
- expect(result).toMatchSnapshot();
12
- });
13
- it('returns code with path parameters reserved (data) and not (petId) /pet/{petId}/uploadImage/{data}', () => {
14
- const result = httpclient(source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}'], originalOptions, { target: 'csharpNewtonsoft', client: 'httpclient' });
15
- expect(result).toMatchSnapshot();
16
- });
17
- it('returns code with one path parameter inside url /pet/{petId}/uploadImage', () => {
18
- const result = httpclient(source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage'], originalOptions, { target: 'csharpNewtonsoft', client: 'httpclient' });
19
- expect(result).toMatchSnapshot();
20
- });
21
- it('returns code with path parameter and query /pet/findByStatus/{id}?status=...', () => {
22
- const result = httpclient(source['GET http://petstore.swagger.io/v2/pet/findByStatus/{id}'], originalOptions, { target: 'csharpNewtonsoft', client: 'httpclient' });
23
- expect(result).toMatchSnapshot();
24
- });
25
- it('should generate code with server variables', () => {
26
- const result = httpclient(source['POST https://{customerId}.saas-app.com:{port}/v2'], serverVariablesOptions, {
27
- target: 'csharpNewtonsoft',
28
- client: 'httpclient',
29
- });
30
- expect(result).toMatchSnapshot();
31
- });
32
- it('should generate code with basic auth', () => {
33
- const result = httpclient(source['POST http://petstore.swagger.io/login'], serverVariablesOptions, {
34
- target: 'csharpNewtonsoft',
35
- client: 'httpclient',
36
- });
37
- expect(result).toMatchSnapshot();
38
- });
39
- it('should handle URL_ENCODED with text but no params (serializedValue case)', () => {
40
- const sourceWithUrlEncodedText = {
41
- method: 'post',
42
- url: 'http://petstore.swagger.io/v2/pet',
43
- httpVersion: 'HTTP/1.1',
44
- cookies: [],
45
- headers: [{ name: 'Content-Type', value: 'application/x-www-form-urlencoded' }],
46
- queryString: [],
47
- postData: {
48
- mimeType: 'application/x-www-form-urlencoded',
49
- text: 'name=Museum+Visitor&value=premium&count=5',
50
- params: [],
51
- },
52
- headersSize: 0,
53
- bodySize: 0,
54
- securityOAuth2ExtraCalls: [],
55
- pathParameters: {},
56
- serverVariables: {},
57
- queryObj: {},
58
- headersObj: { 'Content-Type': 'application/x-www-form-urlencoded' },
59
- cookiesObj: {},
60
- allHeaders: { 'Content-Type': 'application/x-www-form-urlencoded' },
61
- uriObj: {
62
- protocol: 'http:',
63
- slashes: true,
64
- auth: null,
65
- host: 'petstore.swagger.io',
66
- port: null,
67
- hostname: 'petstore.swagger.io',
68
- hash: null,
69
- search: '',
70
- query: {},
71
- pathname: '/v2/pet',
72
- path: '/v2/pet',
73
- href: 'http://petstore.swagger.io/v2/pet',
74
- },
75
- fullUrl: 'http://petstore.swagger.io/v2/pet',
76
- };
77
- const result = httpclient(sourceWithUrlEncodedText, originalOptions, {
78
- target: 'csharpNewtonsoft',
79
- client: 'httpclient',
80
- });
81
- expect(result).toMatchSnapshot();
82
- });
83
- it('should handle MULTIPART with text but no params (serializedValue case)', () => {
84
- const sourceWithMultipartText = {
85
- method: 'post',
86
- url: 'http://petstore.swagger.io/v2/pet',
87
- httpVersion: 'HTTP/1.1',
88
- cookies: [],
89
- headers: [{ name: 'Content-Type', value: 'multipart/form-data' }],
90
- queryString: [],
91
- postData: {
92
- mimeType: 'multipart/form-data',
93
- text: '--boundary123\r\nContent-Disposition: form-data; name="field1"\r\n\r\nvalue1\r\n--boundary123\r\nContent-Disposition: form-data; name="field2"\r\n\r\nvalue2\r\n--boundary123--',
94
- params: [],
95
- },
96
- headersSize: 0,
97
- bodySize: 0,
98
- securityOAuth2ExtraCalls: [],
99
- pathParameters: {},
100
- serverVariables: {},
101
- queryObj: {},
102
- headersObj: { 'Content-Type': 'multipart/form-data' },
103
- cookiesObj: {},
104
- allHeaders: { 'Content-Type': 'multipart/form-data' },
105
- uriObj: {
106
- protocol: 'http:',
107
- slashes: true,
108
- auth: null,
109
- host: 'petstore.swagger.io',
110
- port: null,
111
- hostname: 'petstore.swagger.io',
112
- hash: null,
113
- search: '',
114
- query: {},
115
- pathname: '/v2/pet',
116
- path: '/v2/pet',
117
- href: 'http://petstore.swagger.io/v2/pet',
118
- },
119
- fullUrl: 'http://petstore.swagger.io/v2/pet',
120
- };
121
- const result = httpclient(sourceWithMultipartText, originalOptions, {
122
- target: 'csharpNewtonsoft',
123
- client: 'httpclient',
124
- });
125
- expect(result).toMatchSnapshot();
126
- });
127
- it('should handle OCTET_STREAM with text (binary data case)', () => {
128
- const sourceWithOctetStream = {
129
- method: 'post',
130
- url: 'http://petstore.swagger.io/v2/upload',
131
- httpVersion: 'HTTP/1.1',
132
- cookies: [],
133
- headers: [{ name: 'Content-Type', value: 'application/octet-stream' }],
134
- queryString: [],
135
- postData: {
136
- mimeType: 'application/octet-stream',
137
- text: 'SGVsbG8gV29ybGQ=',
138
- },
139
- headersSize: 0,
140
- bodySize: 0,
141
- securityOAuth2ExtraCalls: [],
142
- pathParameters: {},
143
- serverVariables: {},
144
- queryObj: {},
145
- headersObj: { 'Content-Type': 'application/octet-stream' },
146
- cookiesObj: {},
147
- allHeaders: { 'Content-Type': 'application/octet-stream' },
148
- uriObj: {
149
- protocol: 'http:',
150
- slashes: true,
151
- auth: null,
152
- host: 'petstore.swagger.io',
153
- port: null,
154
- hostname: 'petstore.swagger.io',
155
- hash: null,
156
- search: '',
157
- query: {},
158
- pathname: '/v2/upload',
159
- path: '/v2/upload',
160
- href: 'http://petstore.swagger.io/v2/upload',
161
- },
162
- fullUrl: 'http://petstore.swagger.io/v2/upload',
163
- };
164
- const result = httpclient(sourceWithOctetStream, originalOptions, {
165
- target: 'csharpNewtonsoft',
166
- client: 'httpclient',
167
- });
168
- expect(result).toMatchSnapshot();
169
- });
170
- });
171
- });
172
- //# sourceMappingURL=httpclient.test.js.map
@@ -1 +0,0 @@
1
- export { HTTPSnippet } from '../../../index.js';
@@ -1,130 +0,0 @@
1
- // TODO: Please Fix linter - (details: https://github.com/Redocly/redocly/pull/16732)
2
- export { HTTPSnippet } from '../../../index.js'; // we need to reexport it before to prevent circular ref issue
3
- import native from '../native.js';
4
- import { originalOptions, serverVariablesOptions, source } from '../../__mocks__/mock.js';
5
- describe('#code-samples Go lang', () => {
6
- describe('handler', () => {
7
- it('returns code API POST /pet', () => {
8
- const result = native(source['POST http://petstore.swagger.io/v2/pet'], originalOptions, {
9
- target: 'go',
10
- client: 'http.DefaultClient',
11
- });
12
- expect(result).toMatchSnapshot();
13
- });
14
- it('returns code with path parameters reserved (data) and not (petId) /pet/{petId}/uploadImage/{data}', () => {
15
- const result = native(source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}'], originalOptions, { target: 'go', client: 'http.DefaultClient' });
16
- expect(result).toMatchSnapshot();
17
- });
18
- it('returns code with one path parameter inside url /pet/{petId}/uploadImage', () => {
19
- const result = native(source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage'], originalOptions, { target: 'go', client: 'http.DefaultClient' });
20
- expect(result).toMatchSnapshot();
21
- });
22
- it('returns code with path parameter and query /pet/findByStatus/{id}?status=...', () => {
23
- const result = native(source['GET http://petstore.swagger.io/v2/pet/findByStatus/{id}'], originalOptions, { target: 'go', client: 'http.DefaultClient' });
24
- expect(result).toMatchSnapshot();
25
- });
26
- it('should generate code with server variables', () => {
27
- const result = native(source['POST https://{customerId}.saas-app.com:{port}/v2'], serverVariablesOptions, {
28
- target: 'go',
29
- client: 'http.DefaultClient',
30
- });
31
- expect(result).toMatchSnapshot();
32
- });
33
- it('should generate code with basic auth', () => {
34
- const result = native(source['POST http://petstore.swagger.io/login'], serverVariablesOptions, {
35
- target: 'go',
36
- client: 'http.DefaultClient',
37
- });
38
- expect(result).toMatchSnapshot();
39
- });
40
- it('should handle URL_ENCODED with text but no params (serializedValue case)', () => {
41
- const sourceWithUrlEncodedText = {
42
- method: 'post',
43
- url: 'http://petstore.swagger.io/v2/pet',
44
- httpVersion: 'HTTP/1.1',
45
- cookies: [],
46
- headers: [{ name: 'Content-Type', value: 'application/x-www-form-urlencoded' }],
47
- queryString: [],
48
- postData: {
49
- mimeType: 'application/x-www-form-urlencoded',
50
- text: 'name=Museum+Visitor&value=premium&count=5',
51
- params: [],
52
- },
53
- headersSize: 0,
54
- bodySize: 0,
55
- securityOAuth2ExtraCalls: [],
56
- pathParameters: {},
57
- serverVariables: {},
58
- queryObj: {},
59
- headersObj: { 'Content-Type': 'application/x-www-form-urlencoded' },
60
- cookiesObj: {},
61
- allHeaders: { 'Content-Type': 'application/x-www-form-urlencoded' },
62
- uriObj: {
63
- protocol: 'http:',
64
- slashes: true,
65
- auth: null,
66
- host: 'petstore.swagger.io',
67
- port: null,
68
- hostname: 'petstore.swagger.io',
69
- hash: null,
70
- search: '',
71
- query: {},
72
- pathname: '/v2/pet',
73
- path: '/v2/pet',
74
- href: 'http://petstore.swagger.io/v2/pet',
75
- },
76
- fullUrl: 'http://petstore.swagger.io/v2/pet',
77
- };
78
- const result = native(sourceWithUrlEncodedText, originalOptions, {
79
- target: 'go',
80
- client: 'http.DefaultClient',
81
- });
82
- expect(result).toMatchSnapshot();
83
- });
84
- it('should handle MULTIPART with text but no params (serializedValue case)', () => {
85
- const sourceWithMultipartText = {
86
- method: 'post',
87
- url: 'http://petstore.swagger.io/v2/pet',
88
- httpVersion: 'HTTP/1.1',
89
- cookies: [],
90
- headers: [{ name: 'Content-Type', value: 'multipart/form-data' }],
91
- queryString: [],
92
- postData: {
93
- mimeType: 'multipart/form-data',
94
- text: '--boundary123\r\nContent-Disposition: form-data; name="field1"\r\n\r\nvalue1\r\n--boundary123\r\nContent-Disposition: form-data; name="field2"\r\n\r\nvalue2\r\n--boundary123--',
95
- params: [],
96
- },
97
- headersSize: 0,
98
- bodySize: 0,
99
- securityOAuth2ExtraCalls: [],
100
- pathParameters: {},
101
- serverVariables: {},
102
- queryObj: {},
103
- headersObj: { 'Content-Type': 'multipart/form-data' },
104
- cookiesObj: {},
105
- allHeaders: { 'Content-Type': 'multipart/form-data' },
106
- uriObj: {
107
- protocol: 'http:',
108
- slashes: true,
109
- auth: null,
110
- host: 'petstore.swagger.io',
111
- port: null,
112
- hostname: 'petstore.swagger.io',
113
- hash: null,
114
- search: '',
115
- query: {},
116
- pathname: '/v2/pet',
117
- path: '/v2/pet',
118
- href: 'http://petstore.swagger.io/v2/pet',
119
- },
120
- fullUrl: 'http://petstore.swagger.io/v2/pet',
121
- };
122
- const result = native(sourceWithMultipartText, originalOptions, {
123
- target: 'go',
124
- client: 'http.DefaultClient',
125
- });
126
- expect(result).toMatchSnapshot();
127
- });
128
- });
129
- });
130
- //# sourceMappingURL=native.test.js.map
@@ -1 +0,0 @@
1
- export { HTTPSnippet } from '../../../index.js';
@@ -1,191 +0,0 @@
1
- // TODO: Please Fix linter - (details: https://github.com/Redocly/redocly/pull/16732)
2
- export { HTTPSnippet } from '../../../index.js'; // we need to reexport it before to prevent circular ref issue
3
- import httpclient from '../httpclient.js';
4
- import { originalOptions, serverVariablesOptions, source } from '../../__mocks__/mock.js';
5
- describe('#code-samples Java', () => {
6
- describe('handler', () => {
7
- it('returns code API POST /pet', () => {
8
- const result = httpclient(source['POST http://petstore.swagger.io/v2/pet'], originalOptions, {
9
- target: 'java',
10
- client: 'httpclient',
11
- });
12
- expect(result).toMatchSnapshot();
13
- });
14
- it('returns code with path parameters reserved (data) and not (petId) /pet/{petId}/uploadImage/{data}', () => {
15
- const result = httpclient(source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage/{data}'], originalOptions, { target: 'java', client: 'httpclient' });
16
- expect(result).toMatchSnapshot();
17
- });
18
- it('returns code with one path parameter inside url /pet/{petId}/uploadImage', () => {
19
- const result = httpclient(source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage'], originalOptions, { target: 'java', client: 'httpclient' });
20
- expect(result).toMatchSnapshot();
21
- });
22
- it('returns code with path parameter and query /pet/findByStatus/{id}?status=...', () => {
23
- const result = httpclient(source['GET http://petstore.swagger.io/v2/pet/findByStatus/{id}'], originalOptions, { target: 'java', client: 'httpclient' });
24
- expect(result).toMatchSnapshot();
25
- });
26
- it('should generate code with server variables', () => {
27
- const result = httpclient(source['POST https://{customerId}.saas-app.com:{port}/v2'], serverVariablesOptions, {
28
- target: 'java',
29
- client: 'httpclient',
30
- });
31
- expect(result).toMatchSnapshot();
32
- });
33
- it('should generate code with basic auth', () => {
34
- const result = httpclient(source['POST http://petstore.swagger.io/login'], serverVariablesOptions, {
35
- target: 'java',
36
- client: 'httpclient',
37
- });
38
- expect(result).toMatchSnapshot();
39
- });
40
- it('should generate code with multipart form data', () => {
41
- const multipartSource = {
42
- ...source['POST http://petstore.swagger.io/v2/pet/{petId}/uploadImage'],
43
- postData: {
44
- mimeType: 'multipart/form-data',
45
- text: '',
46
- params: [
47
- { name: 'file', value: 'fileContent' },
48
- { name: 'metadata', value: 'someMeta' },
49
- ],
50
- },
51
- };
52
- const result = httpclient(multipartSource, originalOptions, {
53
- target: 'java',
54
- client: 'httpclient',
55
- });
56
- expect(result).toMatchSnapshot();
57
- });
58
- it('should handle URL_ENCODED with text but no params (serializedValue case)', () => {
59
- const sourceWithUrlEncodedText = {
60
- method: 'post',
61
- url: 'http://petstore.swagger.io/v2/pet',
62
- httpVersion: 'HTTP/1.1',
63
- cookies: [],
64
- headers: [{ name: 'Content-Type', value: 'application/x-www-form-urlencoded' }],
65
- queryString: [],
66
- postData: {
67
- mimeType: 'application/x-www-form-urlencoded',
68
- text: 'name=Museum+Visitor&value=premium&count=5',
69
- params: [],
70
- },
71
- headersSize: 0,
72
- bodySize: 0,
73
- securityOAuth2ExtraCalls: [],
74
- pathParameters: {},
75
- serverVariables: {},
76
- queryObj: {},
77
- headersObj: { 'Content-Type': 'application/x-www-form-urlencoded' },
78
- cookiesObj: {},
79
- allHeaders: { 'Content-Type': 'application/x-www-form-urlencoded' },
80
- uriObj: {
81
- protocol: 'http:',
82
- slashes: true,
83
- auth: null,
84
- host: 'petstore.swagger.io',
85
- port: null,
86
- hostname: 'petstore.swagger.io',
87
- hash: null,
88
- search: '',
89
- query: {},
90
- pathname: '/v2/pet',
91
- path: '/v2/pet',
92
- href: 'http://petstore.swagger.io/v2/pet',
93
- },
94
- fullUrl: 'http://petstore.swagger.io/v2/pet',
95
- };
96
- const result = httpclient(sourceWithUrlEncodedText, originalOptions, {
97
- target: 'java',
98
- client: 'httpclient',
99
- });
100
- expect(result).toMatchSnapshot();
101
- });
102
- it('should handle MULTIPART with text but no params (serializedValue case)', () => {
103
- const sourceWithMultipartText = {
104
- method: 'post',
105
- url: 'http://petstore.swagger.io/v2/pet',
106
- httpVersion: 'HTTP/1.1',
107
- cookies: [],
108
- headers: [{ name: 'Content-Type', value: 'multipart/form-data' }],
109
- queryString: [],
110
- postData: {
111
- mimeType: 'multipart/form-data',
112
- text: '--boundary123\r\nContent-Disposition: form-data; name="field1"\r\n\r\nvalue1\r\n--boundary123\r\nContent-Disposition: form-data; name="field2"\r\n\r\nvalue2\r\n--boundary123--',
113
- params: [],
114
- },
115
- headersSize: 0,
116
- bodySize: 0,
117
- securityOAuth2ExtraCalls: [],
118
- pathParameters: {},
119
- serverVariables: {},
120
- queryObj: {},
121
- headersObj: { 'Content-Type': 'multipart/form-data' },
122
- cookiesObj: {},
123
- allHeaders: { 'Content-Type': 'multipart/form-data' },
124
- uriObj: {
125
- protocol: 'http:',
126
- slashes: true,
127
- auth: null,
128
- host: 'petstore.swagger.io',
129
- port: null,
130
- hostname: 'petstore.swagger.io',
131
- hash: null,
132
- search: '',
133
- query: {},
134
- pathname: '/v2/pet',
135
- path: '/v2/pet',
136
- href: 'http://petstore.swagger.io/v2/pet',
137
- },
138
- fullUrl: 'http://petstore.swagger.io/v2/pet',
139
- };
140
- const result = httpclient(sourceWithMultipartText, originalOptions, {
141
- target: 'java',
142
- client: 'httpclient',
143
- });
144
- expect(result).toMatchSnapshot();
145
- });
146
- it('should handle OCTET_STREAM with text (binary data case)', () => {
147
- const sourceWithOctetStream = {
148
- method: 'post',
149
- url: 'http://petstore.swagger.io/v2/upload',
150
- httpVersion: 'HTTP/1.1',
151
- cookies: [],
152
- headers: [{ name: 'Content-Type', value: 'application/octet-stream' }],
153
- queryString: [],
154
- postData: {
155
- mimeType: 'application/octet-stream',
156
- text: 'SGVsbG8gV29ybGQ=',
157
- },
158
- headersSize: 0,
159
- bodySize: 0,
160
- securityOAuth2ExtraCalls: [],
161
- pathParameters: {},
162
- serverVariables: {},
163
- queryObj: {},
164
- headersObj: { 'Content-Type': 'application/octet-stream' },
165
- cookiesObj: {},
166
- allHeaders: { 'Content-Type': 'application/octet-stream' },
167
- uriObj: {
168
- protocol: 'http:',
169
- slashes: true,
170
- auth: null,
171
- host: 'petstore.swagger.io',
172
- port: null,
173
- hostname: 'petstore.swagger.io',
174
- hash: null,
175
- search: '',
176
- query: {},
177
- pathname: '/v2/upload',
178
- path: '/v2/upload',
179
- href: 'http://petstore.swagger.io/v2/upload',
180
- },
181
- fullUrl: 'http://petstore.swagger.io/v2/upload',
182
- };
183
- const result = httpclient(sourceWithOctetStream, originalOptions, {
184
- target: 'java',
185
- client: 'httpclient',
186
- });
187
- expect(result).toMatchSnapshot();
188
- });
189
- });
190
- });
191
- //# sourceMappingURL=httpclient.test.js.map
@@ -1 +0,0 @@
1
- export { HTTPSnippet } from '../../../index.js';