@redocly/respect-core 0.0.0-snapshot.1739898268

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 (423) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +25 -0
  3. package/lib/arazzo-schema.d.ts +2385 -0
  4. package/lib/arazzo-schema.d.ts.map +1 -0
  5. package/lib/arazzo-schema.js +372 -0
  6. package/lib/arazzo-schema.js.map +1 -0
  7. package/lib/handlers/generate.d.ts +3 -0
  8. package/lib/handlers/generate.d.ts.map +1 -0
  9. package/lib/handlers/generate.js +18 -0
  10. package/lib/handlers/generate.js.map +1 -0
  11. package/lib/handlers/index.d.ts +3 -0
  12. package/lib/handlers/index.d.ts.map +1 -0
  13. package/lib/handlers/index.js +19 -0
  14. package/lib/handlers/index.js.map +1 -0
  15. package/lib/handlers/run.d.ts +2 -0
  16. package/lib/handlers/run.d.ts.map +1 -0
  17. package/lib/handlers/run.js +67 -0
  18. package/lib/handlers/run.js.map +1 -0
  19. package/lib/index.d.ts +2 -0
  20. package/lib/index.d.ts.map +1 -0
  21. package/lib/index.js +7 -0
  22. package/lib/index.js.map +1 -0
  23. package/lib/modules/checks/checks.d.ts +9 -0
  24. package/lib/modules/checks/checks.d.ts.map +1 -0
  25. package/lib/modules/checks/checks.js +12 -0
  26. package/lib/modules/checks/checks.js.map +1 -0
  27. package/lib/modules/checks/index.d.ts +3 -0
  28. package/lib/modules/checks/index.d.ts.map +1 -0
  29. package/lib/modules/checks/index.js +19 -0
  30. package/lib/modules/checks/index.js.map +1 -0
  31. package/lib/modules/checks/severity.d.ts +9 -0
  32. package/lib/modules/checks/severity.d.ts.map +1 -0
  33. package/lib/modules/checks/severity.js +29 -0
  34. package/lib/modules/checks/severity.js.map +1 -0
  35. package/lib/modules/cli-output/calculate-tests-passed.d.ts +3 -0
  36. package/lib/modules/cli-output/calculate-tests-passed.d.ts.map +1 -0
  37. package/lib/modules/cli-output/calculate-tests-passed.js +67 -0
  38. package/lib/modules/cli-output/calculate-tests-passed.js.map +1 -0
  39. package/lib/modules/cli-output/display-checks.d.ts +3 -0
  40. package/lib/modules/cli-output/display-checks.d.ts.map +1 -0
  41. package/lib/modules/cli-output/display-checks.js +86 -0
  42. package/lib/modules/cli-output/display-checks.js.map +1 -0
  43. package/lib/modules/cli-output/display-errors.d.ts +3 -0
  44. package/lib/modules/cli-output/display-errors.d.ts.map +1 -0
  45. package/lib/modules/cli-output/display-errors.js +45 -0
  46. package/lib/modules/cli-output/display-errors.js.map +1 -0
  47. package/lib/modules/cli-output/display-files-summary-table.d.ts +11 -0
  48. package/lib/modules/cli-output/display-files-summary-table.d.ts.map +1 -0
  49. package/lib/modules/cli-output/display-files-summary-table.js +100 -0
  50. package/lib/modules/cli-output/display-files-summary-table.js.map +1 -0
  51. package/lib/modules/cli-output/display-summary.d.ts +7 -0
  52. package/lib/modules/cli-output/display-summary.d.ts.map +1 -0
  53. package/lib/modules/cli-output/display-summary.js +75 -0
  54. package/lib/modules/cli-output/display-summary.js.map +1 -0
  55. package/lib/modules/cli-output/index.d.ts +9 -0
  56. package/lib/modules/cli-output/index.d.ts.map +1 -0
  57. package/lib/modules/cli-output/index.js +25 -0
  58. package/lib/modules/cli-output/index.js.map +1 -0
  59. package/lib/modules/cli-output/json-logs.d.ts +3 -0
  60. package/lib/modules/cli-output/json-logs.d.ts.map +1 -0
  61. package/lib/modules/cli-output/json-logs.js +27 -0
  62. package/lib/modules/cli-output/json-logs.js.map +1 -0
  63. package/lib/modules/cli-output/mask-secrets.d.ts +5 -0
  64. package/lib/modules/cli-output/mask-secrets.d.ts.map +1 -0
  65. package/lib/modules/cli-output/mask-secrets.js +34 -0
  66. package/lib/modules/cli-output/mask-secrets.js.map +1 -0
  67. package/lib/modules/cli-output/verbose-logs.d.ts +3 -0
  68. package/lib/modules/cli-output/verbose-logs.d.ts.map +1 -0
  69. package/lib/modules/cli-output/verbose-logs.js +24 -0
  70. package/lib/modules/cli-output/verbose-logs.js.map +1 -0
  71. package/lib/modules/config-parser/get-value-from-context.d.ts +12 -0
  72. package/lib/modules/config-parser/get-value-from-context.d.ts.map +1 -0
  73. package/lib/modules/config-parser/get-value-from-context.js +183 -0
  74. package/lib/modules/config-parser/get-value-from-context.js.map +1 -0
  75. package/lib/modules/config-parser/handle-request-body-replacements.d.ts +3 -0
  76. package/lib/modules/config-parser/handle-request-body-replacements.d.ts.map +1 -0
  77. package/lib/modules/config-parser/handle-request-body-replacements.js +24 -0
  78. package/lib/modules/config-parser/handle-request-body-replacements.js.map +1 -0
  79. package/lib/modules/config-parser/index.d.ts +8 -0
  80. package/lib/modules/config-parser/index.d.ts.map +1 -0
  81. package/lib/modules/config-parser/index.js +24 -0
  82. package/lib/modules/config-parser/index.js.map +1 -0
  83. package/lib/modules/config-parser/map-header-params-and-cookie-to-object.d.ts +6 -0
  84. package/lib/modules/config-parser/map-header-params-and-cookie-to-object.d.ts.map +1 -0
  85. package/lib/modules/config-parser/map-header-params-and-cookie-to-object.js +22 -0
  86. package/lib/modules/config-parser/map-header-params-and-cookie-to-object.js.map +1 -0
  87. package/lib/modules/config-parser/parse-parameters.d.ts +10 -0
  88. package/lib/modules/config-parser/parse-parameters.d.ts.map +1 -0
  89. package/lib/modules/config-parser/parse-parameters.js +48 -0
  90. package/lib/modules/config-parser/parse-parameters.js.map +1 -0
  91. package/lib/modules/config-parser/parse-request-body.d.ts +8 -0
  92. package/lib/modules/config-parser/parse-request-body.d.ts.map +1 -0
  93. package/lib/modules/config-parser/parse-request-body.js +149 -0
  94. package/lib/modules/config-parser/parse-request-body.js.map +1 -0
  95. package/lib/modules/config-parser/resolve-reusable-component.d.ts +3 -0
  96. package/lib/modules/config-parser/resolve-reusable-component.d.ts.map +1 -0
  97. package/lib/modules/config-parser/resolve-reusable-component.js +8 -0
  98. package/lib/modules/config-parser/resolve-reusable-component.js.map +1 -0
  99. package/lib/modules/config-parser/resolve-reusable-object-reference.d.ts +5 -0
  100. package/lib/modules/config-parser/resolve-reusable-object-reference.d.ts.map +1 -0
  101. package/lib/modules/config-parser/resolve-reusable-object-reference.js +20 -0
  102. package/lib/modules/config-parser/resolve-reusable-object-reference.js.map +1 -0
  103. package/lib/modules/description-parser/bundle-openapi.d.ts +2 -0
  104. package/lib/modules/description-parser/bundle-openapi.d.ts.map +1 -0
  105. package/lib/modules/description-parser/bundle-openapi.js +41 -0
  106. package/lib/modules/description-parser/bundle-openapi.js.map +1 -0
  107. package/lib/modules/description-parser/extract-first-example.d.ts +2 -0
  108. package/lib/modules/description-parser/extract-first-example.d.ts.map +1 -0
  109. package/lib/modules/description-parser/extract-first-example.js +10 -0
  110. package/lib/modules/description-parser/extract-first-example.js.map +1 -0
  111. package/lib/modules/description-parser/get-operation-by-id.d.ts +3 -0
  112. package/lib/modules/description-parser/get-operation-by-id.d.ts.map +1 -0
  113. package/lib/modules/description-parser/get-operation-by-id.js +56 -0
  114. package/lib/modules/description-parser/get-operation-by-id.js.map +1 -0
  115. package/lib/modules/description-parser/get-operation-by-path.d.ts +7 -0
  116. package/lib/modules/description-parser/get-operation-by-path.d.ts.map +1 -0
  117. package/lib/modules/description-parser/get-operation-by-path.js +44 -0
  118. package/lib/modules/description-parser/get-operation-by-path.js.map +1 -0
  119. package/lib/modules/description-parser/get-operation-from-description.d.ts +18 -0
  120. package/lib/modules/description-parser/get-operation-from-description.d.ts.map +1 -0
  121. package/lib/modules/description-parser/get-operation-from-description.js +26 -0
  122. package/lib/modules/description-parser/get-operation-from-description.js.map +1 -0
  123. package/lib/modules/description-parser/get-request-body-schema.d.ts +3 -0
  124. package/lib/modules/description-parser/get-request-body-schema.d.ts.map +1 -0
  125. package/lib/modules/description-parser/get-request-body-schema.js +12 -0
  126. package/lib/modules/description-parser/get-request-body-schema.js.map +1 -0
  127. package/lib/modules/description-parser/get-request-data-from-openapi.d.ts +9 -0
  128. package/lib/modules/description-parser/get-request-data-from-openapi.d.ts.map +1 -0
  129. package/lib/modules/description-parser/get-request-data-from-openapi.js +63 -0
  130. package/lib/modules/description-parser/get-request-data-from-openapi.js.map +1 -0
  131. package/lib/modules/description-parser/get-response-schema.d.ts +6 -0
  132. package/lib/modules/description-parser/get-response-schema.d.ts.map +1 -0
  133. package/lib/modules/description-parser/get-response-schema.js +10 -0
  134. package/lib/modules/description-parser/get-response-schema.js.map +1 -0
  135. package/lib/modules/description-parser/index.d.ts +10 -0
  136. package/lib/modules/description-parser/index.d.ts.map +1 -0
  137. package/lib/modules/description-parser/index.js +26 -0
  138. package/lib/modules/description-parser/index.js.map +1 -0
  139. package/lib/modules/description-parser/remove-write-only-properties.d.ts +3 -0
  140. package/lib/modules/description-parser/remove-write-only-properties.d.ts.map +1 -0
  141. package/lib/modules/description-parser/remove-write-only-properties.js +41 -0
  142. package/lib/modules/description-parser/remove-write-only-properties.js.map +1 -0
  143. package/lib/modules/faker.d.ts +42 -0
  144. package/lib/modules/faker.d.ts.map +1 -0
  145. package/lib/modules/faker.js +36 -0
  146. package/lib/modules/faker.js.map +1 -0
  147. package/lib/modules/flow-runner/call-api-and-analyze-results.d.ts +30 -0
  148. package/lib/modules/flow-runner/call-api-and-analyze-results.d.ts.map +1 -0
  149. package/lib/modules/flow-runner/call-api-and-analyze-results.js +100 -0
  150. package/lib/modules/flow-runner/call-api-and-analyze-results.js.map +1 -0
  151. package/lib/modules/flow-runner/context/create-runtime-expression-ctx.d.ts +7 -0
  152. package/lib/modules/flow-runner/context/create-runtime-expression-ctx.d.ts.map +1 -0
  153. package/lib/modules/flow-runner/context/create-runtime-expression-ctx.js +56 -0
  154. package/lib/modules/flow-runner/context/create-runtime-expression-ctx.js.map +1 -0
  155. package/lib/modules/flow-runner/context/create-test-context.d.ts +5 -0
  156. package/lib/modules/flow-runner/context/create-test-context.d.ts.map +1 -0
  157. package/lib/modules/flow-runner/context/create-test-context.js +88 -0
  158. package/lib/modules/flow-runner/context/create-test-context.js.map +1 -0
  159. package/lib/modules/flow-runner/context/index.d.ts +5 -0
  160. package/lib/modules/flow-runner/context/index.d.ts.map +1 -0
  161. package/lib/modules/flow-runner/context/index.js +21 -0
  162. package/lib/modules/flow-runner/context/index.js.map +1 -0
  163. package/lib/modules/flow-runner/context/set-public-steps.d.ts +3 -0
  164. package/lib/modules/flow-runner/context/set-public-steps.d.ts.map +1 -0
  165. package/lib/modules/flow-runner/context/set-public-steps.js +11 -0
  166. package/lib/modules/flow-runner/context/set-public-steps.js.map +1 -0
  167. package/lib/modules/flow-runner/context/set-public-workflows.d.ts +7 -0
  168. package/lib/modules/flow-runner/context/set-public-workflows.d.ts.map +1 -0
  169. package/lib/modules/flow-runner/context/set-public-workflows.js +29 -0
  170. package/lib/modules/flow-runner/context/set-public-workflows.js.map +1 -0
  171. package/lib/modules/flow-runner/error-message-matcher.d.ts +4 -0
  172. package/lib/modules/flow-runner/error-message-matcher.d.ts.map +1 -0
  173. package/lib/modules/flow-runner/error-message-matcher.js +11 -0
  174. package/lib/modules/flow-runner/error-message-matcher.js.map +1 -0
  175. package/lib/modules/flow-runner/get-server-url.d.ts +12 -0
  176. package/lib/modules/flow-runner/get-server-url.d.ts.map +1 -0
  177. package/lib/modules/flow-runner/get-server-url.js +67 -0
  178. package/lib/modules/flow-runner/get-server-url.js.map +1 -0
  179. package/lib/modules/flow-runner/get-test-description-from-file.d.ts +20 -0
  180. package/lib/modules/flow-runner/get-test-description-from-file.d.ts.map +1 -0
  181. package/lib/modules/flow-runner/get-test-description-from-file.js +75 -0
  182. package/lib/modules/flow-runner/get-test-description-from-file.js.map +1 -0
  183. package/lib/modules/flow-runner/get-workflows-to-run.d.ts +3 -0
  184. package/lib/modules/flow-runner/get-workflows-to-run.d.ts.map +1 -0
  185. package/lib/modules/flow-runner/get-workflows-to-run.js +50 -0
  186. package/lib/modules/flow-runner/get-workflows-to-run.js.map +1 -0
  187. package/lib/modules/flow-runner/index.d.ts +16 -0
  188. package/lib/modules/flow-runner/index.d.ts.map +1 -0
  189. package/lib/modules/flow-runner/index.js +32 -0
  190. package/lib/modules/flow-runner/index.js.map +1 -0
  191. package/lib/modules/flow-runner/inputs/format-cli-inputs.d.ts +2 -0
  192. package/lib/modules/flow-runner/inputs/format-cli-inputs.d.ts.map +1 -0
  193. package/lib/modules/flow-runner/inputs/format-cli-inputs.js +45 -0
  194. package/lib/modules/flow-runner/inputs/format-cli-inputs.js.map +1 -0
  195. package/lib/modules/flow-runner/inputs/index.d.ts +3 -0
  196. package/lib/modules/flow-runner/inputs/index.d.ts.map +1 -0
  197. package/lib/modules/flow-runner/inputs/index.js +19 -0
  198. package/lib/modules/flow-runner/inputs/index.js.map +1 -0
  199. package/lib/modules/flow-runner/inputs/map-input-values-to-schema.d.ts +7 -0
  200. package/lib/modules/flow-runner/inputs/map-input-values-to-schema.d.ts.map +1 -0
  201. package/lib/modules/flow-runner/inputs/map-input-values-to-schema.js +29 -0
  202. package/lib/modules/flow-runner/inputs/map-input-values-to-schema.js.map +1 -0
  203. package/lib/modules/flow-runner/outputs/index.d.ts +2 -0
  204. package/lib/modules/flow-runner/outputs/index.d.ts.map +1 -0
  205. package/lib/modules/flow-runner/outputs/index.js +18 -0
  206. package/lib/modules/flow-runner/outputs/index.js.map +1 -0
  207. package/lib/modules/flow-runner/outputs/print-message.d.ts +7 -0
  208. package/lib/modules/flow-runner/outputs/print-message.d.ts.map +1 -0
  209. package/lib/modules/flow-runner/outputs/print-message.js +17 -0
  210. package/lib/modules/flow-runner/outputs/print-message.js.map +1 -0
  211. package/lib/modules/flow-runner/prepare-request.d.ts +15 -0
  212. package/lib/modules/flow-runner/prepare-request.d.ts.map +1 -0
  213. package/lib/modules/flow-runner/prepare-request.js +166 -0
  214. package/lib/modules/flow-runner/prepare-request.js.map +1 -0
  215. package/lib/modules/flow-runner/read-env-variables.d.ts +2 -0
  216. package/lib/modules/flow-runner/read-env-variables.d.ts.map +1 -0
  217. package/lib/modules/flow-runner/read-env-variables.js +44 -0
  218. package/lib/modules/flow-runner/read-env-variables.js.map +1 -0
  219. package/lib/modules/flow-runner/resolve-running-workflows.d.ts +2 -0
  220. package/lib/modules/flow-runner/resolve-running-workflows.d.ts.map +1 -0
  221. package/lib/modules/flow-runner/resolve-running-workflows.js +25 -0
  222. package/lib/modules/flow-runner/resolve-running-workflows.js.map +1 -0
  223. package/lib/modules/flow-runner/run-step.d.ts +12 -0
  224. package/lib/modules/flow-runner/run-step.d.ts.map +1 -0
  225. package/lib/modules/flow-runner/run-step.js +250 -0
  226. package/lib/modules/flow-runner/run-step.js.map +1 -0
  227. package/lib/modules/flow-runner/runner.d.ts +11 -0
  228. package/lib/modules/flow-runner/runner.d.ts.map +1 -0
  229. package/lib/modules/flow-runner/runner.js +225 -0
  230. package/lib/modules/flow-runner/runner.js.map +1 -0
  231. package/lib/modules/flow-runner/schema/index.d.ts +2 -0
  232. package/lib/modules/flow-runner/schema/index.d.ts.map +1 -0
  233. package/lib/modules/flow-runner/schema/index.js +18 -0
  234. package/lib/modules/flow-runner/schema/index.js.map +1 -0
  235. package/lib/modules/flow-runner/schema/schema-checker.d.ts +7 -0
  236. package/lib/modules/flow-runner/schema/schema-checker.d.ts.map +1 -0
  237. package/lib/modules/flow-runner/schema/schema-checker.js +124 -0
  238. package/lib/modules/flow-runner/schema/schema-checker.js.map +1 -0
  239. package/lib/modules/flow-runner/success-criteria/check-success-criteria.d.ts +8 -0
  240. package/lib/modules/flow-runner/success-criteria/check-success-criteria.d.ts.map +1 -0
  241. package/lib/modules/flow-runner/success-criteria/check-success-criteria.js +97 -0
  242. package/lib/modules/flow-runner/success-criteria/check-success-criteria.js.map +1 -0
  243. package/lib/modules/flow-runner/success-criteria/index.d.ts +3 -0
  244. package/lib/modules/flow-runner/success-criteria/index.d.ts.map +1 -0
  245. package/lib/modules/flow-runner/success-criteria/index.js +19 -0
  246. package/lib/modules/flow-runner/success-criteria/index.js.map +1 -0
  247. package/lib/modules/flow-runner/success-criteria/validate-success-criteria.d.ts +6 -0
  248. package/lib/modules/flow-runner/success-criteria/validate-success-criteria.d.ts.map +1 -0
  249. package/lib/modules/flow-runner/success-criteria/validate-success-criteria.js +63 -0
  250. package/lib/modules/flow-runner/success-criteria/validate-success-criteria.js.map +1 -0
  251. package/lib/modules/runtime-expressions/abnf-parser.d.ts +15 -0
  252. package/lib/modules/runtime-expressions/abnf-parser.d.ts.map +1 -0
  253. package/lib/modules/runtime-expressions/abnf-parser.js +2012 -0
  254. package/lib/modules/runtime-expressions/abnf-parser.js.map +1 -0
  255. package/lib/modules/runtime-expressions/evaluate.d.ts +9 -0
  256. package/lib/modules/runtime-expressions/evaluate.d.ts.map +1 -0
  257. package/lib/modules/runtime-expressions/evaluate.js +169 -0
  258. package/lib/modules/runtime-expressions/evaluate.js.map +1 -0
  259. package/lib/modules/runtime-expressions/index.d.ts +2 -0
  260. package/lib/modules/runtime-expressions/index.d.ts.map +1 -0
  261. package/lib/modules/runtime-expressions/index.js +18 -0
  262. package/lib/modules/runtime-expressions/index.js.map +1 -0
  263. package/lib/modules/runtime-expressions/lint.d.ts +2 -0
  264. package/lib/modules/runtime-expressions/lint.d.ts.map +1 -0
  265. package/lib/modules/runtime-expressions/lint.js +13 -0
  266. package/lib/modules/runtime-expressions/lint.js.map +1 -0
  267. package/lib/modules/runtime-expressions/replace-json-pointers.d.ts +2 -0
  268. package/lib/modules/runtime-expressions/replace-json-pointers.d.ts.map +1 -0
  269. package/lib/modules/runtime-expressions/replace-json-pointers.js +62 -0
  270. package/lib/modules/runtime-expressions/replace-json-pointers.js.map +1 -0
  271. package/lib/modules/test-config-generator/cleanup-test-description.d.ts +16 -0
  272. package/lib/modules/test-config-generator/cleanup-test-description.d.ts.map +1 -0
  273. package/lib/modules/test-config-generator/cleanup-test-description.js +28 -0
  274. package/lib/modules/test-config-generator/cleanup-test-description.js.map +1 -0
  275. package/lib/modules/test-config-generator/generate-example-value.d.ts +3 -0
  276. package/lib/modules/test-config-generator/generate-example-value.d.ts.map +1 -0
  277. package/lib/modules/test-config-generator/generate-example-value.js +17 -0
  278. package/lib/modules/test-config-generator/generate-example-value.js.map +1 -0
  279. package/lib/modules/test-config-generator/generate-test-config.d.ts +7 -0
  280. package/lib/modules/test-config-generator/generate-test-config.d.ts.map +1 -0
  281. package/lib/modules/test-config-generator/generate-test-config.js +117 -0
  282. package/lib/modules/test-config-generator/generate-test-config.js.map +1 -0
  283. package/lib/modules/test-config-generator/generate-test-data-from-json-schema.d.ts +2 -0
  284. package/lib/modules/test-config-generator/generate-test-data-from-json-schema.d.ts.map +1 -0
  285. package/lib/modules/test-config-generator/generate-test-data-from-json-schema.js +42 -0
  286. package/lib/modules/test-config-generator/generate-test-data-from-json-schema.js.map +1 -0
  287. package/lib/modules/test-config-generator/index.d.ts +5 -0
  288. package/lib/modules/test-config-generator/index.d.ts.map +1 -0
  289. package/lib/modules/test-config-generator/index.js +21 -0
  290. package/lib/modules/test-config-generator/index.js.map +1 -0
  291. package/lib/types.d.ts +241 -0
  292. package/lib/types.d.ts.map +1 -0
  293. package/lib/types.js +3 -0
  294. package/lib/types.js.map +1 -0
  295. package/lib/utils/ajv-errors.d.ts +3 -0
  296. package/lib/utils/ajv-errors.d.ts.map +1 -0
  297. package/lib/utils/ajv-errors.js +28 -0
  298. package/lib/utils/ajv-errors.js.map +1 -0
  299. package/lib/utils/api-fetcher.d.ts +27 -0
  300. package/lib/utils/api-fetcher.d.ts.map +1 -0
  301. package/lib/utils/api-fetcher.js +243 -0
  302. package/lib/utils/api-fetcher.js.map +1 -0
  303. package/lib/utils/check-circular-refs-in-schema.d.ts +2 -0
  304. package/lib/utils/check-circular-refs-in-schema.d.ts.map +1 -0
  305. package/lib/utils/check-circular-refs-in-schema.js +13 -0
  306. package/lib/utils/check-circular-refs-in-schema.js.map +1 -0
  307. package/lib/utils/clean-colors.d.ts +2 -0
  308. package/lib/utils/clean-colors.d.ts.map +1 -0
  309. package/lib/utils/clean-colors.js +8 -0
  310. package/lib/utils/clean-colors.js.map +1 -0
  311. package/lib/utils/cli-outputs.d.ts +18 -0
  312. package/lib/utils/cli-outputs.d.ts.map +1 -0
  313. package/lib/utils/cli-outputs.js +70 -0
  314. package/lib/utils/cli-outputs.js.map +1 -0
  315. package/lib/utils/delay.d.ts +2 -0
  316. package/lib/utils/delay.d.ts.map +1 -0
  317. package/lib/utils/delay.js +8 -0
  318. package/lib/utils/delay.js.map +1 -0
  319. package/lib/utils/env.d.ts +3 -0
  320. package/lib/utils/env.d.ts.map +1 -0
  321. package/lib/utils/env.js +13 -0
  322. package/lib/utils/env.js.map +1 -0
  323. package/lib/utils/file.d.ts +2 -0
  324. package/lib/utils/file.d.ts.map +1 -0
  325. package/lib/utils/file.js +7 -0
  326. package/lib/utils/file.js.map +1 -0
  327. package/lib/utils/get-nested-value.d.ts +2 -0
  328. package/lib/utils/get-nested-value.d.ts.map +1 -0
  329. package/lib/utils/get-nested-value.js +16 -0
  330. package/lib/utils/get-nested-value.js.map +1 -0
  331. package/lib/utils/get-reunite-url.d.ts +2 -0
  332. package/lib/utils/get-reunite-url.d.ts.map +1 -0
  333. package/lib/utils/get-reunite-url.js +18 -0
  334. package/lib/utils/get-reunite-url.js.map +1 -0
  335. package/lib/utils/har-logs/create-har-log.d.ts +2 -0
  336. package/lib/utils/har-logs/create-har-log.d.ts.map +1 -0
  337. package/lib/utils/har-logs/create-har-log.js +28 -0
  338. package/lib/utils/har-logs/create-har-log.js.map +1 -0
  339. package/lib/utils/har-logs/helpers/add-headers.d.ts +2 -0
  340. package/lib/utils/har-logs/helpers/add-headers.d.ts.map +1 -0
  341. package/lib/utils/har-logs/helpers/add-headers.js +20 -0
  342. package/lib/utils/har-logs/helpers/add-headers.js.map +1 -0
  343. package/lib/utils/har-logs/helpers/build-headers.d.ts +10 -0
  344. package/lib/utils/har-logs/helpers/build-headers.d.ts.map +1 -0
  345. package/lib/utils/har-logs/helpers/build-headers.js +35 -0
  346. package/lib/utils/har-logs/helpers/build-headers.js.map +1 -0
  347. package/lib/utils/har-logs/helpers/build-params.d.ts +2 -0
  348. package/lib/utils/har-logs/helpers/build-params.d.ts.map +1 -0
  349. package/lib/utils/har-logs/helpers/build-params.js +44 -0
  350. package/lib/utils/har-logs/helpers/build-params.js.map +1 -0
  351. package/lib/utils/har-logs/helpers/build-request-cookies.d.ts +2 -0
  352. package/lib/utils/har-logs/helpers/build-request-cookies.d.ts.map +1 -0
  353. package/lib/utils/har-logs/helpers/build-request-cookies.js +44 -0
  354. package/lib/utils/har-logs/helpers/build-request-cookies.js.map +1 -0
  355. package/lib/utils/har-logs/helpers/build-response-cookies.d.ts +2 -0
  356. package/lib/utils/har-logs/helpers/build-response-cookies.d.ts.map +1 -0
  357. package/lib/utils/har-logs/helpers/build-response-cookies.js +66 -0
  358. package/lib/utils/har-logs/helpers/build-response-cookies.js.map +1 -0
  359. package/lib/utils/har-logs/helpers/get-agent.d.ts +2 -0
  360. package/lib/utils/har-logs/helpers/get-agent.d.ts.map +1 -0
  361. package/lib/utils/har-logs/helpers/get-agent.js +115 -0
  362. package/lib/utils/har-logs/helpers/get-agent.js.map +1 -0
  363. package/lib/utils/har-logs/helpers/get-duration.d.ts +2 -0
  364. package/lib/utils/har-logs/helpers/get-duration.d.ts.map +1 -0
  365. package/lib/utils/har-logs/helpers/get-duration.js +9 -0
  366. package/lib/utils/har-logs/helpers/get-duration.js.map +1 -0
  367. package/lib/utils/har-logs/helpers/get-input-url.d.ts +2 -0
  368. package/lib/utils/har-logs/helpers/get-input-url.d.ts.map +1 -0
  369. package/lib/utils/har-logs/helpers/get-input-url.js +8 -0
  370. package/lib/utils/har-logs/helpers/get-input-url.js.map +1 -0
  371. package/lib/utils/har-logs/helpers/handle-request.d.ts +9 -0
  372. package/lib/utils/har-logs/helpers/handle-request.d.ts.map +1 -0
  373. package/lib/utils/har-logs/helpers/handle-request.js +202 -0
  374. package/lib/utils/har-logs/helpers/handle-request.js.map +1 -0
  375. package/lib/utils/har-logs/index.d.ts +3 -0
  376. package/lib/utils/har-logs/index.d.ts.map +1 -0
  377. package/lib/utils/har-logs/index.js +19 -0
  378. package/lib/utils/har-logs/index.js.map +1 -0
  379. package/lib/utils/har-logs/with-har.d.ts +6 -0
  380. package/lib/utils/har-logs/with-har.d.ts.map +1 -0
  381. package/lib/utils/har-logs/with-har.js +216 -0
  382. package/lib/utils/har-logs/with-har.js.map +1 -0
  383. package/lib/utils/is-empty.d.ts +2 -0
  384. package/lib/utils/is-empty.d.ts.map +1 -0
  385. package/lib/utils/is-empty.js +16 -0
  386. package/lib/utils/is-empty.js.map +1 -0
  387. package/lib/utils/is-json.d.ts +2 -0
  388. package/lib/utils/is-json.d.ts.map +1 -0
  389. package/lib/utils/is-json.js +13 -0
  390. package/lib/utils/is-json.js.map +1 -0
  391. package/lib/utils/is-url.d.ts +2 -0
  392. package/lib/utils/is-url.d.ts.map +1 -0
  393. package/lib/utils/is-url.js +16 -0
  394. package/lib/utils/is-url.js.map +1 -0
  395. package/lib/utils/logger/logger.d.ts +16 -0
  396. package/lib/utils/logger/logger.d.ts.map +1 -0
  397. package/lib/utils/logger/logger.js +33 -0
  398. package/lib/utils/logger/logger.js.map +1 -0
  399. package/lib/utils/mtls/create-mtls-client.d.ts +4 -0
  400. package/lib/utils/mtls/create-mtls-client.d.ts.map +1 -0
  401. package/lib/utils/mtls/create-mtls-client.js +22 -0
  402. package/lib/utils/mtls/create-mtls-client.js.map +1 -0
  403. package/lib/utils/mtls/resolve-mtls-certificates.d.ts +7 -0
  404. package/lib/utils/mtls/resolve-mtls-certificates.d.ts.map +1 -0
  405. package/lib/utils/mtls/resolve-mtls-certificates.js +69 -0
  406. package/lib/utils/mtls/resolve-mtls-certificates.js.map +1 -0
  407. package/lib/utils/sort.d.ts +2 -0
  408. package/lib/utils/sort.d.ts.map +1 -0
  409. package/lib/utils/sort.js +29 -0
  410. package/lib/utils/sort.js.map +1 -0
  411. package/lib/utils/time.d.ts +2 -0
  412. package/lib/utils/time.d.ts.map +1 -0
  413. package/lib/utils/time.js +10 -0
  414. package/lib/utils/time.js.map +1 -0
  415. package/lib/utils/url.d.ts +2 -0
  416. package/lib/utils/url.d.ts.map +1 -0
  417. package/lib/utils/url.js +9 -0
  418. package/lib/utils/url.js.map +1 -0
  419. package/lib/utils/yaml.d.ts +5 -0
  420. package/lib/utils/yaml.d.ts.map +1 -0
  421. package/lib/utils/yaml.js +23 -0
  422. package/lib/utils/yaml.js.map +1 -0
  423. package/package.json +68 -0
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.stripFileDecorator = stripFileDecorator;
27
+ exports.parseRequestBody = parseRequestBody;
28
+ const node_fs_1 = require("node:fs");
29
+ const path = __importStar(require("node:path"));
30
+ const FormData = require("form-data");
31
+ const handle_request_body_replacements_1 = require("./handle-request-body-replacements");
32
+ const querystring = __importStar(require("node:querystring"));
33
+ const KNOWN_BINARY_CONTENT_TYPES_REGEX = /^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;
34
+ function stripFileDecorator(payload) {
35
+ return payload.startsWith('$file(') && payload.endsWith(')')
36
+ ? payload.substring(7, payload.length - 2)
37
+ : payload;
38
+ }
39
+ const appendFileToFormData = (formData, key, item) => {
40
+ return new Promise((resolve, reject) => {
41
+ const filePath = path.resolve(__dirname, '../', stripFileDecorator(item));
42
+ (0, node_fs_1.access)(filePath, node_fs_1.constants.F_OK | node_fs_1.constants.R_OK, (err) => {
43
+ if (err) {
44
+ const relativePath = path.relative(process.cwd(), filePath);
45
+ reject(new Error(`File ${relativePath} doesn't exist or isn't readable.`));
46
+ }
47
+ else {
48
+ formData.append(key, (0, node_fs_1.createReadStream)(filePath));
49
+ resolve();
50
+ }
51
+ });
52
+ });
53
+ };
54
+ const appendObjectToFormData = (promises, formData, payload, parentKey) => {
55
+ Object.entries(payload).forEach(([key, item]) => {
56
+ const formKey = parentKey ? `${parentKey}[${key}]` : key;
57
+ if (typeof item === 'string' && item.startsWith('$file(') && item.endsWith(')')) {
58
+ promises.push(appendFileToFormData(formData, formKey, item));
59
+ }
60
+ else if (Array.isArray(item)) {
61
+ item.forEach((i) => {
62
+ if (typeof i === 'string' && i.startsWith('$file(') && i.endsWith(')')) {
63
+ promises.push(appendFileToFormData(formData, formKey, i));
64
+ }
65
+ else {
66
+ formData.append(formKey, i.toString());
67
+ }
68
+ });
69
+ }
70
+ else if (typeof item === 'object' && item !== null) {
71
+ appendObjectToFormData(promises, formData, item, formKey);
72
+ }
73
+ else if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
74
+ formData.append(formKey, item.toString());
75
+ }
76
+ });
77
+ };
78
+ const getRequestBodyMultipartFormData = async (payload, formData) => {
79
+ if (payload && typeof payload === 'object' && !Array.isArray(payload)) {
80
+ const promises = [];
81
+ appendObjectToFormData(promises, formData, payload);
82
+ await Promise.all(promises);
83
+ }
84
+ };
85
+ const getRequestBodyOctetStream = async (payload) => {
86
+ if (typeof payload === 'string' && payload.startsWith('$file(') && payload.endsWith(')')) {
87
+ const filePath = path.resolve(__dirname, '../', stripFileDecorator(payload));
88
+ await new Promise((resolve, reject) => {
89
+ (0, node_fs_1.access)(filePath, node_fs_1.constants.F_OK | node_fs_1.constants.R_OK, (err) => {
90
+ if (err) {
91
+ const relativePath = path.relative(process.cwd(), filePath);
92
+ reject(new Error(`File ${relativePath} doesn't exist or isn't readable.`));
93
+ }
94
+ else {
95
+ resolve(filePath);
96
+ }
97
+ });
98
+ });
99
+ return (0, node_fs_1.createReadStream)(filePath);
100
+ }
101
+ else {
102
+ return payload;
103
+ }
104
+ };
105
+ async function parseRequestBody(stepRequestBody) {
106
+ if (!stepRequestBody) {
107
+ return {
108
+ payload: undefined,
109
+ contentType: undefined,
110
+ encoding: undefined,
111
+ };
112
+ }
113
+ const { payload, encoding, contentType, replacements } = stepRequestBody;
114
+ if (contentType === 'multipart/form-data') {
115
+ const formData = new FormData();
116
+ await getRequestBodyMultipartFormData(payload, formData);
117
+ return {
118
+ payload: formData,
119
+ contentType: `multipart/form-data; boundary=${formData.getBoundary()}`,
120
+ encoding,
121
+ };
122
+ }
123
+ else if (contentType === 'application/octet-stream' ||
124
+ (typeof contentType === 'string' && KNOWN_BINARY_CONTENT_TYPES_REGEX.test(contentType))) {
125
+ return {
126
+ payload: await getRequestBodyOctetStream(payload),
127
+ contentType: 'application/octet-stream',
128
+ encoding,
129
+ };
130
+ }
131
+ let resolvedPayload = payload;
132
+ if (replacements) {
133
+ // To handle string replacement properly with variables it's better to parse
134
+ // the string into an object and process the replacement.
135
+ // Also resolves query string variables before sending.
136
+ if (typeof resolvedPayload === 'string') {
137
+ resolvedPayload = querystring.parse(resolvedPayload);
138
+ }
139
+ if (typeof resolvedPayload === 'object') {
140
+ (0, handle_request_body_replacements_1.handlePayloadReplacements)(resolvedPayload, replacements);
141
+ }
142
+ }
143
+ return {
144
+ payload: resolvedPayload,
145
+ contentType,
146
+ encoding,
147
+ };
148
+ }
149
+ //# sourceMappingURL=parse-request-body.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-request-body.js","sourceRoot":"","sources":["../../../src/modules/config-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4EAA4E;QAC5E,yDAAyD;QACzD,uDAAuD;QACvD,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;YACxC,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;YACxC,IAAA,4DAAyB,EAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,eAAe;QACxB,WAAW;QACX,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { OnFailureObject, OnSuccessObject, Parameter, TestContext } from '../../types';
2
+ export declare function resolveReusableComponentItem<T extends OnSuccessObject | OnFailureObject | Parameter>(item: T, ctx: TestContext): T;
3
+ //# sourceMappingURL=resolve-reusable-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-reusable-component.d.ts","sourceRoot":"","sources":["../../../src/modules/config-parser/resolve-reusable-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE5F,wBAAgB,4BAA4B,CAC1C,CAAC,SAAS,eAAe,GAAG,eAAe,GAAG,SAAS,EACvD,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,GAAG,CAAC,CAE9B"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveReusableComponentItem = resolveReusableComponentItem;
4
+ const resolve_reusable_object_reference_1 = require("./resolve-reusable-object-reference");
5
+ function resolveReusableComponentItem(item, ctx) {
6
+ return 'reference' in item ? (0, resolve_reusable_object_reference_1.resolveReusableObjectReference)(item, ctx) : item;
7
+ }
8
+ //# sourceMappingURL=resolve-reusable-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-reusable-component.js","sourceRoot":"","sources":["../../../src/modules/config-parser/resolve-reusable-component.ts"],"names":[],"mappings":";;AAIA,oEAIC;AARD,2FAAqF;AAIrF,SAAgB,4BAA4B,CAE1C,IAAO,EAAE,GAAgB;IACzB,OAAO,WAAW,IAAI,IAAI,CAAC,CAAC,CAAE,IAAA,kEAA8B,EAAC,IAAI,EAAE,GAAG,CAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACvF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { ReusableObject, TestContext, OnSuccessObject, OnFailureObject, Parameter } from '../../types';
2
+ type ComponentType<T extends ReusableObject> = T['reference'] extends `$components.successActions${string}` ? OnSuccessObject : T['reference'] extends `$components.failureActions${string}` ? OnFailureObject : T['reference'] extends `$components.parameters${string}` ? Parameter : never;
3
+ export declare function resolveReusableObjectReference<T extends ReusableObject>(reusableObject: T, ctx: TestContext): ComponentType<T>;
4
+ export {};
5
+ //# sourceMappingURL=resolve-reusable-object-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-reusable-object-reference.d.ts","sourceRoot":"","sources":["../../../src/modules/config-parser/resolve-reusable-object-reference.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACV,MAAM,aAAa,CAAC;AAErB,KAAK,aAAa,CAAC,CAAC,SAAS,cAAc,IACzC,CAAC,CAAC,WAAW,CAAC,SAAS,6BAA6B,MAAM,EAAE,GACxD,eAAe,GACf,CAAC,CAAC,WAAW,CAAC,SAAS,6BAA6B,MAAM,EAAE,GAC5D,eAAe,GACf,CAAC,CAAC,WAAW,CAAC,SAAS,yBAAyB,MAAM,EAAE,GACxD,SAAS,GACT,KAAK,CAAC;AAIZ,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,cAAc,EACrE,cAAc,EAAE,CAAC,EACjB,GAAG,EAAE,WAAW,GACf,aAAa,CAAC,CAAC,CAAC,CAmBlB"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveReusableObjectReference = resolveReusableObjectReference;
4
+ const get_value_from_context_1 = require("./get-value-from-context");
5
+ const VALID_COMPONENTS = ['parameters', 'failureActions', 'successActions'];
6
+ function resolveReusableObjectReference(reusableObject, ctx) {
7
+ const { reference, value: valueOverride } = reusableObject;
8
+ if (!VALID_COMPONENTS.some((component) => reference.includes(`$components.${component}`))) {
9
+ throw new Error('Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions');
10
+ }
11
+ const component = (0, get_value_from_context_1.getValueFromContext)(reference, ctx);
12
+ if ('value' in component && valueOverride) {
13
+ return {
14
+ ...component,
15
+ value: valueOverride,
16
+ };
17
+ }
18
+ return component;
19
+ }
20
+ //# sourceMappingURL=resolve-reusable-object-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-reusable-object-reference.js","sourceRoot":"","sources":["../../../src/modules/config-parser/resolve-reusable-object-reference.ts"],"names":[],"mappings":";;AAqBA,wEAsBC;AA3CD,qEAA+D;AAmB/D,MAAM,gBAAgB,GAAG,CAAC,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;AAE5E,SAAgB,8BAA8B,CAC5C,cAAiB,EACjB,GAAgB;IAEhB,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,cAAc,CAAC;IAE3D,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;QAC1F,MAAM,IAAI,KAAK,CACb,+HAA+H,CAChI,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,IAAA,4CAAmB,EAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAEtD,IAAI,OAAO,IAAI,SAAS,IAAI,aAAa,EAAE,CAAC;QAC1C,OAAO;YACL,GAAG,SAAS;YACZ,KAAK,EAAE,aAAa;SACD,CAAC;IACxB,CAAC;IAED,OAAO,SAA6B,CAAC;AACvC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function bundleOpenApi(path: string | undefined, workflowPath: string): Promise<any>;
2
+ //# sourceMappingURL=bundle-openapi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-openapi.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/bundle-openapi.ts"],"names":[],"mappings":"AAMA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,YAAK,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA0CzF"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bundleOpenApi = bundleOpenApi;
4
+ const node_path_1 = require("node:path");
5
+ const node_fs_1 = require("node:fs");
6
+ const openapi_core_1 = require("@redocly/openapi-core");
7
+ const is_url_1 = require("../../utils/is-url");
8
+ async function bundleOpenApi(path = '', workflowPath) {
9
+ const isUrl = (0, is_url_1.isURL)(path);
10
+ const config = await (0, openapi_core_1.loadConfig)();
11
+ let bundleDocument;
12
+ if (isUrl) {
13
+ // Download OpenAPI YAML file
14
+ const response = await fetch(path);
15
+ if (!response.ok) {
16
+ throw new Error(`Failed to fetch OpenAPI YAML file. Status: ${response.status}`);
17
+ }
18
+ const openApiYaml = await response.text();
19
+ bundleDocument = await (0, openapi_core_1.bundleFromString)({
20
+ source: openApiYaml,
21
+ config,
22
+ dereference: true,
23
+ });
24
+ }
25
+ else {
26
+ const descriptionPath = path && (0, node_path_1.resolve)((0, node_path_1.dirname)(workflowPath), path);
27
+ if (!(0, node_fs_1.existsSync)(descriptionPath)) {
28
+ throw new Error(`Could not find source description file '${path}' at path '${workflowPath}'`);
29
+ }
30
+ bundleDocument = await (0, openapi_core_1.bundle)({
31
+ ref: descriptionPath,
32
+ config,
33
+ dereference: true,
34
+ });
35
+ }
36
+ if (!bundleDocument)
37
+ return;
38
+ const { bundle: { parsed: { paths, servers, info }, }, } = bundleDocument;
39
+ return { paths, servers, info };
40
+ }
41
+ //# sourceMappingURL=bundle-openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-openapi.js","sourceRoot":"","sources":["../../../src/modules/description-parser/bundle-openapi.ts"],"names":[],"mappings":";;AAMA,sCA0CC;AAhDD,yCAA6C;AAC7C,qCAAqC;AACrC,wDAA6E;AAE7E,+CAA2C;AAEpC,KAAK,UAAU,aAAa,CAAC,OAAe,EAAE,EAAE,YAAoB;IACzE,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,IAAI,CAAC,CAAC;IAC1B,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAU,GAAE,CAAC;IAClC,IAAI,cAA4B,CAAC;IAEjC,IAAI,KAAK,EAAE,CAAC;QACV,6BAA6B;QAC7B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;QAEnC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,8CAA8C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1C,cAAc,GAAG,MAAM,IAAA,+BAAgB,EAAC;YACtC,MAAM,EAAE,WAAW;YACnB,MAAM;YACN,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,eAAe,GAAG,IAAI,IAAI,IAAA,mBAAO,EAAC,IAAA,mBAAO,EAAC,YAAY,CAAC,EAAE,IAAI,CAAC,CAAC;QAErE,IAAI,CAAC,IAAA,oBAAU,EAAC,eAAe,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,2CAA2C,IAAI,cAAc,YAAY,GAAG,CAAC,CAAC;QAChG,CAAC;QAED,cAAc,GAAG,MAAM,IAAA,qBAAM,EAAC;YAC5B,GAAG,EAAE,eAAe;YACpB,MAAM;YACN,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,cAAc;QAAE,OAAO;IAE5B,MAAM,EACJ,MAAM,EAAE,EACN,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GACjC,GACF,GAAG,cAAc,CAAC;IAEnB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAClC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function extractFirstExample(examples: Record<string, any> | undefined): any;
2
+ //# sourceMappingURL=extract-first-example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-first-example.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/extract-first-example.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,OAK5E"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractFirstExample = extractFirstExample;
4
+ function extractFirstExample(examples) {
5
+ if (typeof examples !== 'object')
6
+ return;
7
+ const firstKey = Object.keys(examples)[0];
8
+ return firstKey ? examples[firstKey]?.value : undefined;
9
+ }
10
+ //# sourceMappingURL=extract-first-example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-first-example.js","sourceRoot":"","sources":["../../../src/modules/description-parser/extract-first-example.ts"],"names":[],"mappings":";;AAAA,kDAKC;AALD,SAAgB,mBAAmB,CAAC,QAAyC;IAC3E,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO;IACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1C,OAAO,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { OperationDetails } from './get-operation-from-description';
2
+ export declare function getOperationById(operationIdStr: string, descriptions: any): (OperationDetails & Record<string, any>) | undefined;
3
+ //# sourceMappingURL=get-operation-by-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation-by-id.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/get-operation-by-id.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,GAAG,GAChB,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAyDtD"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOperationById = getOperationById;
4
+ const colorette_1 = require("colorette");
5
+ // TODO: create a type: ExtendedOpenAPIOperation = OpenAPIOperation & { pathParameters: Parameter[], path, ... }
6
+ function getOperationById(operationIdStr, descriptions) {
7
+ let descriptionName;
8
+ let operationId;
9
+ if (operationIdStr.includes('$sourceDescriptions.')) {
10
+ const [, sourceDescriptionName, operationIdIdentifier] = operationIdStr.split('.');
11
+ descriptionName = sourceDescriptionName;
12
+ operationId = operationIdIdentifier;
13
+ }
14
+ else if (!operationIdStr.includes('.')) {
15
+ operationId = operationIdStr;
16
+ descriptionName = Object.keys(descriptions)[0];
17
+ }
18
+ else {
19
+ [descriptionName, operationId] = operationIdStr.split('.');
20
+ }
21
+ const availableDescriptions = Object.keys(descriptions);
22
+ if (!descriptions[descriptionName]) {
23
+ throw new Error(`Unknown description name ${(0, colorette_1.red)(descriptionName)} at ${(0, colorette_1.red)(operationIdStr)}. Available descriptions: ${availableDescriptions.join(', ')}.`);
24
+ }
25
+ const description = descriptions[descriptionName];
26
+ const rootServers = description.servers;
27
+ for (const [path, pathDetails] of Object.entries(descriptions[descriptionName].paths)) {
28
+ if (!pathDetails) {
29
+ return undefined;
30
+ }
31
+ for (const [method, operationDetails] of Object.entries(pathDetails)) {
32
+ // @ indicates autogenerated operationId
33
+ if (operationId.includes('@/')) {
34
+ // TODO: replace this with construct of path
35
+ const [methodPrefix, pathSuffix] = operationId.split('@');
36
+ if (methodPrefix === method && pathSuffix === path) {
37
+ return { ...operationDetails, path, method, descriptionName };
38
+ }
39
+ }
40
+ else {
41
+ if (operationDetails.operationId === operationId) {
42
+ return {
43
+ servers: pathDetails.servers || rootServers,
44
+ ...operationDetails,
45
+ pathParameters: operationDetails.parameters || [],
46
+ path,
47
+ method,
48
+ descriptionName,
49
+ };
50
+ }
51
+ }
52
+ }
53
+ }
54
+ throw new Error(`Unknown operationId ${(0, colorette_1.red)(operationId)} at ${(0, colorette_1.red)(operationIdStr)}.`);
55
+ }
56
+ //# sourceMappingURL=get-operation-by-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation-by-id.js","sourceRoot":"","sources":["../../../src/modules/description-parser/get-operation-by-id.ts"],"names":[],"mappings":";;AAKA,4CA4DC;AAjED,yCAAgC;AAIhC,gHAAgH;AAChH,SAAgB,gBAAgB,CAC9B,cAAsB,EACtB,YAAiB;IAEjB,IAAI,eAAe,CAAC;IACpB,IAAI,WAAW,CAAC;IAEhB,IAAI,cAAc,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACpD,MAAM,CAAC,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnF,eAAe,GAAG,qBAAqB,CAAC;QACxC,WAAW,GAAG,qBAAqB,CAAC;IACtC,CAAC;SAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,WAAW,GAAG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M,EAAE,eAAe,EAAE,CAAC;gBAChE,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,gBAAgB,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;oBACjD,OAAO;wBACL,OAAO,EAAG,WAAmB,CAAC,OAAO,IAAI,WAAW;wBACpD,GAAG,gBAAgB;wBACnB,cAAc,EAAE,gBAAgB,CAAC,UAAU,IAAI,EAAE;wBACjD,IAAI;wBACJ,MAAM;wBACN,eAAe;qBAChB,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAA,eAAG,EAAC,WAAW,CAAC,OAAO,IAAA,eAAG,EAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACxF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { OperationDetails } from './get-operation-from-description';
2
+ import type { SourceDescription } from '../../types';
3
+ export declare function getOperationByPath(operationPath: string, descriptionDetails: {
4
+ $sourceDescriptions: any;
5
+ sourceDescriptions: SourceDescription[] | undefined;
6
+ }): (OperationDetails & Record<string, string>) | undefined;
7
+ //# sourceMappingURL=get-operation-by-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation-by-path.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/get-operation-by-path.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE;IAClB,mBAAmB,EAAE,GAAG,CAAC;IACzB,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;CACrD,GACA,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAmDzD"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOperationByPath = getOperationByPath;
4
+ const colorette_1 = require("colorette");
5
+ const JsonPointerLib = require('json-pointer');
6
+ function getOperationByPath(operationPath, descriptionDetails) {
7
+ const { $sourceDescriptions, sourceDescriptions } = descriptionDetails;
8
+ const [basePath, fragmentIdentifier] = operationPath.split('#');
9
+ if (!sourceDescriptions) {
10
+ throw new Error(`Missing described sourceDescriptions`);
11
+ }
12
+ const descriptionName = sourceDescriptions.find((sourceDescription) => {
13
+ if (['openapi', 'arazzo'].includes(sourceDescription.type)) {
14
+ if (basePath.includes('$sourceDescriptions.')) {
15
+ const [, sourceDescriptionName] = basePath.split('.');
16
+ return sourceDescription.name === sourceDescriptionName;
17
+ }
18
+ return 'url' in sourceDescription && sourceDescription.url === basePath;
19
+ }
20
+ return false;
21
+ })?.name;
22
+ if (!descriptionName) {
23
+ throw new Error(`Unknown operationPath ${(0, colorette_1.red)(operationPath)}. API description ${(0, colorette_1.red)(basePath)} is not listed in 'sourceDescriptions' workflow section.`);
24
+ }
25
+ const description = $sourceDescriptions[descriptionName] || {};
26
+ const [prop, path, method] = JsonPointerLib.parse(fragmentIdentifier);
27
+ if (prop !== 'paths') {
28
+ throw new Error(`Invalid fragment identifier: ${fragmentIdentifier} at operationPath ${(0, colorette_1.red)(operationPath)}.`);
29
+ }
30
+ const { servers } = description;
31
+ const operation = JsonPointerLib.get(description, fragmentIdentifier) || {};
32
+ const pathItemObject = JsonPointerLib.get(description, JsonPointerLib.compile(['paths', path])) ||
33
+ {};
34
+ // FIXME: use servers from path level
35
+ return {
36
+ servers: pathItemObject.servers || servers, // use servers from path level if exists
37
+ ...operation, // operation level servers override path level or global servers
38
+ pathParameters: pathItemObject.parameters || [],
39
+ path,
40
+ method,
41
+ descriptionName,
42
+ };
43
+ }
44
+ //# sourceMappingURL=get-operation-by-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation-by-path.js","sourceRoot":"","sources":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C;IAC/D,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAEtE,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,gCAAgC,kBAAkB,qBAAqB,IAAA,eAAG,EAAC,aAAa,CAAC,GAAG,CAC7F,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;IAChC,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,kBAAkB,CAAC,IAAK,EAAuB,CAAC;IAClG,MAAM,cAAc,GAClB,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QACvE,EAAuB,CAAC;IAE3B,qCAAqC;IACrC,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,OAAO,IAAI,OAAO,EAAE,wCAAwC;QACpF,GAAG,SAAS,EAAE,gEAAgE;QAC9E,cAAc,EAAE,cAAc,CAAC,UAAU,IAAI,EAAE;QAC/C,IAAI;QACJ,MAAM;QACN,eAAe;KAChB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type Oas3Responses } from '@redocly/openapi-core/lib/typings/openapi';
2
+ import { type OperationMethod, type TestContext } from '../../types';
3
+ export type DescriptionSource = {
4
+ operationId?: string;
5
+ operationPath?: string;
6
+ };
7
+ export type OperationDetails = {
8
+ method: OperationMethod;
9
+ path: string;
10
+ descriptionName: string;
11
+ servers?: Array<{
12
+ url: string;
13
+ }>;
14
+ responses: Oas3Responses;
15
+ };
16
+ export declare function getOperationFromDescription(path: string, method: string, descriptionPaths: Record<string, any>): Record<string, string> | undefined;
17
+ export declare function getOperationFromDescriptionBySource(source: DescriptionSource, ctx: TestContext): (OperationDetails & Record<string, any>) | undefined;
18
+ //# sourceMappingURL=get-operation-from-description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation-from-description.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/get-operation-from-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAIrE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjC,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEpC;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,iBAAiB,EACzB,GAAG,EAAE,WAAW,GACf,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAetD"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOperationFromDescription = getOperationFromDescription;
4
+ exports.getOperationFromDescriptionBySource = getOperationFromDescriptionBySource;
5
+ const get_operation_by_id_1 = require("./get-operation-by-id");
6
+ const get_operation_by_path_1 = require("./get-operation-by-path");
7
+ function getOperationFromDescription(path, method, descriptionPaths) {
8
+ return descriptionPaths?.[path]?.[method];
9
+ }
10
+ function getOperationFromDescriptionBySource(source, ctx) {
11
+ if (!source.operationId && !source.operationPath) {
12
+ return undefined;
13
+ }
14
+ const { $sourceDescriptions, sourceDescriptions } = ctx;
15
+ const { operationId, operationPath } = source;
16
+ if (operationId) {
17
+ return (0, get_operation_by_id_1.getOperationById)(operationId, $sourceDescriptions);
18
+ }
19
+ else if (operationPath) {
20
+ return (0, get_operation_by_path_1.getOperationByPath)(operationPath, { $sourceDescriptions, sourceDescriptions });
21
+ }
22
+ else {
23
+ return undefined;
24
+ }
25
+ }
26
+ //# sourceMappingURL=get-operation-from-description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation-from-description.js","sourceRoot":"","sources":["../../../src/modules/description-parser/get-operation-from-description.ts"],"names":[],"mappings":";;AAkBA,kEAMC;AAED,kFAkBC;AA1CD,+DAAyD;AACzD,mEAA6D;AAe7D,SAAgB,2BAA2B,CACzC,IAAY,EACZ,MAAc,EACd,gBAAqC;IAErC,OAAO,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAA2B,CAAC;AACtE,CAAC;AAED,SAAgB,mCAAmC,CACjD,MAAyB,EACzB,GAAgB;IAEhB,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;QACjD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,GAAG,GAAG,CAAC;IACxD,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;IAE9C,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,IAAA,sCAAgB,EAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC5D,CAAC;SAAM,IAAI,aAAa,EAAE,CAAC;QACzB,OAAO,IAAA,0CAAkB,EAAC,aAAa,EAAE,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACxF,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { OperationDetails } from './get-operation-from-description';
2
+ export declare function getRequestBodySchema(contentType: string, descriptionOperation: (OperationDetails & Record<string, any>) | undefined): any;
3
+ //# sourceMappingURL=get-request-body-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-request-body-schema.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/get-request-body-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,OAS3E"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRequestBodySchema = getRequestBodySchema;
4
+ function getRequestBodySchema(contentType, descriptionOperation) {
5
+ if (!descriptionOperation)
6
+ return undefined;
7
+ const requestBody = descriptionOperation.requestBody;
8
+ const requestBodyContent = requestBody?.content;
9
+ const schema = requestBodyContent && requestBodyContent[contentType]?.schema;
10
+ return schema || undefined;
11
+ }
12
+ //# sourceMappingURL=get-request-body-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-request-body-schema.js","sourceRoot":"","sources":["../../../src/modules/description-parser/get-request-body-schema.ts"],"names":[],"mappings":";;AAEA,oDAWC;AAXD,SAAgB,oBAAoB,CAClC,WAAmB,EACnB,oBAA0E;IAE1E,IAAI,CAAC,oBAAoB;QAAE,OAAO,SAAS,CAAC;IAE5C,MAAM,WAAW,GAAG,oBAAoB,CAAC,WAAW,CAAC;IACrD,MAAM,kBAAkB,GAAG,WAAW,EAAE,OAAO,CAAC;IAChD,MAAM,MAAM,GAAG,kBAAkB,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE7E,OAAO,MAAM,IAAI,SAAS,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ParameterWithIn } from '../config-parser';
2
+ import type { OperationDetails } from './get-operation-from-description';
3
+ export interface OpenApiRequestData {
4
+ requestBody?: Record<string, unknown>;
5
+ contentType?: string;
6
+ parameters: ParameterWithIn[];
7
+ }
8
+ export declare function getRequestDataFromOpenApi(operation: OperationDetails & Record<string, any>): OpenApiRequestData;
9
+ //# sourceMappingURL=get-request-data-from-openapi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-request-data-from-openapi.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/get-request-data-from-openapi.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAChD,kBAAkB,CAsBpB"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRequestDataFromOpenApi = getRequestDataFromOpenApi;
4
+ const utils_1 = require("@redocly/openapi-core/lib/utils");
5
+ const test_config_generator_1 = require("../test-config-generator");
6
+ const extract_first_example_1 = require("./extract-first-example");
7
+ const config_parser_1 = require("../config-parser");
8
+ function getRequestDataFromOpenApi(operation) {
9
+ const content = operation?.requestBody?.content || {};
10
+ const [contentType, contentItem] = Object.entries(content)[0] || [];
11
+ const requestBody = contentItem?.example ||
12
+ (0, extract_first_example_1.extractFirstExample)(contentItem?.examples) ||
13
+ (0, test_config_generator_1.generateTestDataFromJsonSchema)(contentItem?.schema);
14
+ const accept = getAcceptHeader(operation);
15
+ const parameters = getUniqueParameters([
16
+ ...transformParameters(operation.pathParameters),
17
+ { name: 'content-type', in: 'header', value: contentType },
18
+ ...(accept ? [{ name: 'accept', in: 'header', value: accept }] : []),
19
+ ...transformParameters(operation.parameters),
20
+ ]).filter(({ value }) => value);
21
+ return {
22
+ parameters,
23
+ requestBody,
24
+ contentType,
25
+ };
26
+ }
27
+ function getAcceptHeader(descriptionOperation) {
28
+ return descriptionOperation?.responses
29
+ ? Array.from(new Set(Object.values(descriptionOperation.responses).flatMap((response) => {
30
+ if ((0, utils_1.isPlainObject)(response) && 'content' in response) {
31
+ return Object.keys(response.content || {});
32
+ }
33
+ return [];
34
+ }))).join(', ')
35
+ : undefined;
36
+ }
37
+ function transformParameters(params) {
38
+ return (params || [])
39
+ .filter((parameter) => parameter?.required === true)
40
+ .map((parameter) => {
41
+ if ((0, config_parser_1.isParameterWithIn)(parameter)) {
42
+ return {
43
+ name: parameter.name,
44
+ in: parameter.in,
45
+ value: (0, test_config_generator_1.generateExampleValue)(parameter),
46
+ };
47
+ }
48
+ // Return undefined for non-matching parameters
49
+ return undefined;
50
+ })
51
+ .filter((parameter) => parameter !== undefined);
52
+ }
53
+ function getUniqueParameters(parameters) {
54
+ const uniqParameters = {};
55
+ for (const parameter of parameters) {
56
+ if (!(0, config_parser_1.isParameterWithIn)(parameter)) {
57
+ continue;
58
+ }
59
+ uniqParameters[(parameter.name + ':' + parameter.in).toLowerCase()] = parameter;
60
+ }
61
+ return Object.values(uniqParameters);
62
+ }
63
+ //# sourceMappingURL=get-request-data-from-openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-request-data-from-openapi.js","sourceRoot":"","sources":["../../../src/modules/description-parser/get-request-data-from-openapi.ts"],"names":[],"mappings":";;AAeA,8DAwBC;AAv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,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function getResponseSchema({ statusCode, contentType, descriptionResponses, }: {
2
+ statusCode: number;
3
+ contentType: string;
4
+ descriptionResponses?: Record<string, any>;
5
+ }): any;
6
+ //# sourceMappingURL=get-response-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-response-schema.d.ts","sourceRoot":"","sources":["../../../src/modules/description-parser/get-response-schema.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,WAAW,EACX,oBAAoB,GACrB,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5C,OAMA"}