@kubb/agent 5.0.0-alpha.3 → 5.0.0-alpha.30

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 (446) hide show
  1. package/.output/nitro.json +2 -2
  2. package/.output/server/chunks/nitro/nitro.mjs +12276 -10302
  3. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  4. package/.output/server/chunks/routes/api/health.get.mjs +7 -11
  5. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  6. package/.output/server/index.mjs +7 -11
  7. package/.output/server/index.mjs.map +1 -1
  8. package/.output/server/node_modules/.nitro/@readme/openapi-parser@6.0.1/dist/chunk-IYQ77VVR.js +25 -0
  9. package/.output/server/node_modules/.nitro/@readme/openapi-parser@6.0.1/dist/index.js +923 -0
  10. package/.output/server/node_modules/.nitro/@readme/openapi-parser@6.0.1/package.json +84 -0
  11. package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/constants.js +4 -0
  12. package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/parse.js +301 -0
  13. package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/picomatch.js +11 -3
  14. package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/package.json +2 -3
  15. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/add.js +2 -0
  16. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/addProp.js +2 -0
  17. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/allPass.js +2 -0
  18. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/anyPass.js +2 -0
  19. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/binarySearchCutoffIndex-CalebGhL.js +2 -0
  20. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/capitalize.js +2 -0
  21. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/ceil.js +2 -0
  22. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/chunk.js +2 -0
  23. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/clamp.js +2 -0
  24. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/clone.js +2 -0
  25. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/concat.js +2 -0
  26. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/conditional-CTEJD5TX.js +2 -0
  27. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/constant.js +2 -0
  28. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/countBy.js +2 -0
  29. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/debounce.js +2 -0
  30. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/defaultTo.js +2 -0
  31. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/difference.js +2 -0
  32. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/differenceWith.js +2 -0
  33. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/divide.js +2 -0
  34. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/doNothing.js +2 -0
  35. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/drop.js +2 -0
  36. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropFirstBy.js +2 -0
  37. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropLast.js +2 -0
  38. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropLastWhile.js +2 -0
  39. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/dropWhile.js +2 -0
  40. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/endsWith.js +2 -0
  41. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/entries.js +2 -0
  42. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/evolve.js +2 -0
  43. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/filter.js +2 -0
  44. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/find.js +2 -0
  45. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/findIndex.js +2 -0
  46. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/findLast.js +2 -0
  47. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/findLastIndex.js +2 -0
  48. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/first.js +2 -0
  49. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/firstBy.js +2 -0
  50. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/flat.js +2 -0
  51. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/flatMap.js +2 -0
  52. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/floor.js +2 -0
  53. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/forEach.js +2 -0
  54. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/forEachObj.js +2 -0
  55. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/fromEntries.js +2 -0
  56. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/fromKeys.js +2 -0
  57. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/funnel.js +2 -0
  58. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/groupBy.js +2 -0
  59. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/groupByProp.js +2 -0
  60. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/hasAtLeast.js +2 -0
  61. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/hasSubObject.js +2 -0
  62. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/heap-C8XIujMa.js +2 -0
  63. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/identity.js +2 -0
  64. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/index.js +1 -0
  65. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/indexBy.js +2 -0
  66. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/intersection.js +2 -0
  67. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/intersectionWith.js +2 -0
  68. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/invert.js +2 -0
  69. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isArray.js +2 -0
  70. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isBigInt.js +2 -0
  71. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isBoolean.js +2 -0
  72. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isDate.js +2 -0
  73. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isDeepEqual.js +2 -0
  74. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isDefined.js +2 -0
  75. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isEmpty.js +2 -0
  76. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isEmptyish.js +2 -0
  77. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isError.js +2 -0
  78. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isFunction.js +2 -0
  79. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isIncludedIn.js +2 -0
  80. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNonNull.js +2 -0
  81. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNonNullish.js +2 -0
  82. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNot.js +2 -0
  83. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNullish.js +2 -0
  84. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isNumber.js +2 -0
  85. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isObjectType.js +2 -0
  86. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isPlainObject.js +2 -0
  87. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isPromise.js +2 -0
  88. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isShallowEqual.js +2 -0
  89. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isStrictEqual.js +2 -0
  90. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isString.js +2 -0
  91. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isSymbol.js +2 -0
  92. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/isTruthy.js +2 -0
  93. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/join.js +2 -0
  94. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/keys.js +2 -0
  95. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/last.js +2 -0
  96. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/lazyDataLastImpl-DtF3cihj.js +2 -0
  97. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/length.js +2 -0
  98. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/map.js +2 -0
  99. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapKeys.js +2 -0
  100. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapToObj.js +2 -0
  101. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapValues.js +2 -0
  102. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mapWithFeedback.js +2 -0
  103. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mean.js +2 -0
  104. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/meanBy.js +2 -0
  105. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/median.js +2 -0
  106. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/merge.js +2 -0
  107. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mergeAll.js +2 -0
  108. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/mergeDeep.js +2 -0
  109. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/multiply.js +2 -0
  110. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/nthBy-DCn3SK1l.js +2 -0
  111. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/objOf.js +2 -0
  112. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/omit.js +2 -0
  113. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/omitBy.js +2 -0
  114. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/once.js +2 -0
  115. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/only.js +2 -0
  116. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/partialBind.js +2 -0
  117. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/partialLastBind.js +2 -0
  118. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/partition.js +2 -0
  119. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pathOr.js +2 -0
  120. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pick.js +2 -0
  121. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pickBy.js +2 -0
  122. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pipe.js +2 -0
  123. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/piped.js +2 -0
  124. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/product.js +2 -0
  125. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/prop.js +2 -0
  126. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/pullObject.js +2 -0
  127. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/purry.js +2 -0
  128. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/purryFromLazy-DELFL6Wm.js +2 -0
  129. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/purryOrderRules-BaB5mcHH.js +2 -0
  130. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/randomBigInt.js +2 -0
  131. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/randomInteger.js +2 -0
  132. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/randomString.js +2 -0
  133. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/range.js +2 -0
  134. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/rankBy.js +2 -0
  135. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/reduce.js +2 -0
  136. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/reverse.js +2 -0
  137. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/round.js +2 -0
  138. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sample.js +2 -0
  139. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/set.js +2 -0
  140. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/setPath.js +2 -0
  141. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/shuffle.js +2 -0
  142. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sliceString.js +2 -0
  143. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sort.js +2 -0
  144. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortBy.js +2 -0
  145. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedIndex.js +2 -0
  146. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedIndexBy.js +2 -0
  147. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedIndexWith.js +2 -0
  148. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedLastIndex.js +2 -0
  149. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sortedLastIndexBy.js +2 -0
  150. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/splice.js +2 -0
  151. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/split.js +2 -0
  152. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/splitAt.js +2 -0
  153. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/splitWhen.js +2 -0
  154. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/startsWith.js +2 -0
  155. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/stringToPath.js +2 -0
  156. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/subtract.js +2 -0
  157. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sum.js +2 -0
  158. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/sumBy.js +2 -0
  159. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/swapInPlace-Bb1dcddf.js +2 -0
  160. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/swapIndices.js +2 -0
  161. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/swapProps.js +2 -0
  162. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/take.js +2 -0
  163. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeFirstBy.js +2 -0
  164. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeLast.js +2 -0
  165. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeLastWhile.js +2 -0
  166. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/takeWhile.js +2 -0
  167. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/tap.js +2 -0
  168. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/times.js +2 -0
  169. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toCamelCase.js +2 -0
  170. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toKebabCase.js +2 -0
  171. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toLowerCase.js +2 -0
  172. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toSingle-1Si1O88f.js +2 -0
  173. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toSnakeCase.js +2 -0
  174. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toTitleCase.js +2 -0
  175. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/toUpperCase.js +2 -0
  176. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/truncate.js +2 -0
  177. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/uncapitalize.js +2 -0
  178. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/unique.js +2 -0
  179. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/uniqueBy.js +2 -0
  180. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/uniqueWith.js +2 -0
  181. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/utilityEvaluators-Cb8x6-JZ.js +2 -0
  182. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/values.js +2 -0
  183. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/when.js +2 -0
  184. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/withPrecision-7nvi8hnb.js +2 -0
  185. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/words-OcG39_Hp.js +3 -0
  186. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/zip.js +2 -0
  187. package/.output/server/node_modules/.nitro/remeda@2.33.7/dist/zipWith.js +2 -0
  188. package/.output/server/node_modules/.nitro/remeda@2.33.7/package.json +90 -0
  189. package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/permessage-deflate.js +6 -6
  190. package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket-server.js +5 -5
  191. package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket.js +6 -6
  192. package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/package.json +4 -3
  193. package/.output/server/node_modules/.nitro/ws@8.20.0/wrapper.mjs +21 -0
  194. package/.output/server/node_modules/@kubb/fabric-core/dist/{chunk-BVHe6Par.js → chunk-O_arW02_.js} +6 -11
  195. package/.output/server/node_modules/@kubb/fabric-core/dist/{defaultParser-BD_N68Bo.js → defaultParser-iCpMSYCp.js} +4 -5
  196. package/.output/server/node_modules/@kubb/fabric-core/dist/{getRelativePath-C4Au07ON.js → getRelativePath-NAm_Y-vp.js} +3 -6
  197. package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +71 -89
  198. package/.output/server/node_modules/@kubb/fabric-core/dist/{onProcessExit-CnZym153.js → onProcessExit-Cput7j2c.js} +124 -138
  199. package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +3 -4
  200. package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +4 -5
  201. package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +6 -12
  202. package/.output/server/node_modules/@kubb/fabric-core/package.json +2 -2
  203. package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-DbZtQ4qb.js → chunk-BGCRLu6H.js} +12 -21
  204. package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +33 -35
  205. package/.output/server/node_modules/@kubb/react-fabric/dist/{react-C2cYsofv.js → jsx-runtime-Bl0DfUmV.js} +262 -7
  206. package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +3 -5
  207. package/.output/server/node_modules/@kubb/react-fabric/dist/parsers.js +2 -3
  208. package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +4 -7
  209. package/.output/server/node_modules/@kubb/react-fabric/dist/{reactPlugin-DGKBWjiR.js → reactPlugin-QQPrjNuQ.js} +13 -28
  210. package/.output/server/node_modules/@kubb/react-fabric/package.json +7 -2
  211. package/.output/server/node_modules/@redocly/config/lib/default-theme-config-schema.js +1 -0
  212. package/.output/server/node_modules/@redocly/config/lib/ex-theme-config-schemas.js +5 -1
  213. package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +24 -4
  214. package/.output/server/node_modules/@redocly/config/package.json +2 -2
  215. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +1 -1
  216. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle.js +2 -2
  217. package/.output/server/node_modules/@redocly/openapi-core/lib/config/all.js +5 -0
  218. package/.output/server/node_modules/@redocly/openapi-core/lib/config/bundle-extends.js +1 -0
  219. package/.output/server/node_modules/@redocly/openapi-core/lib/config/config-resolvers.js +14 -5
  220. package/.output/server/node_modules/@redocly/openapi-core/lib/config/minimal.js +5 -0
  221. package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +5 -0
  222. package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended.js +5 -0
  223. package/.output/server/node_modules/@redocly/openapi-core/lib/config/spec.js +5 -0
  224. package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +1 -0
  225. package/.output/server/node_modules/@redocly/openapi-core/lib/lint.js +1 -1
  226. package/.output/server/node_modules/@redocly/openapi-core/lib/ref-utils.js +7 -6
  227. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +2 -0
  228. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/index.js +2 -0
  229. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/index.js +2 -0
  230. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-mixed-number-range-constraints.js +19 -0
  231. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +2 -0
  232. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js +39 -18
  233. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/utils.js +10 -1
  234. package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js +1 -1
  235. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas2.js +1 -1
  236. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3.js +1 -1
  237. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_2.js +9 -3
  238. package/.output/server/node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +4 -0
  239. package/.output/server/node_modules/@redocly/openapi-core/package.json +3 -3
  240. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
  241. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +60 -1
  242. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +25 -17
  243. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +2 -2
  244. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/helpers.js +3 -2
  245. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +17 -12
  246. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/runtime.js +25 -18
  247. package/.output/server/node_modules/handlebars/package.json +5 -6
  248. package/.output/server/node_modules/oas-normalize/package.json +4 -4
  249. package/.output/server/package.json +11 -11
  250. package/package.json +22 -22
  251. package/.output/server/node_modules/.nitro/ws@8.19.0/wrapper.mjs +0 -8
  252. package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime-CZxrhUx8.js +0 -266
  253. package/.output/server/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js +0 -22
  254. /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/dist/chunk-IYQ77VVR.js +0 -0
  255. /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/dist/index.js +0 -0
  256. /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/dist/lib/assertions.js +0 -0
  257. /package/.output/server/node_modules/{@readme/openapi-parser → .nitro/@readme/openapi-parser@6.0.0}/package.json +0 -0
  258. /package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/index.js +0 -0
  259. /package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/scan.js +0 -0
  260. /package/.output/server/node_modules/.nitro/{picomatch@4.0.3 → picomatch@4.0.4}/lib/utils.js +0 -0
  261. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/add.js +0 -0
  262. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/addProp.js +0 -0
  263. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/allPass.js +0 -0
  264. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/anyPass.js +0 -0
  265. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/binarySearchCutoffIndex-CLQRwIY1.js +0 -0
  266. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/capitalize.js +0 -0
  267. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/ceil.js +0 -0
  268. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/chunk.js +0 -0
  269. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/clamp.js +0 -0
  270. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/clone.js +0 -0
  271. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/concat.js +0 -0
  272. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/conditional.js +0 -0
  273. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/constant.js +0 -0
  274. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/countBy.js +0 -0
  275. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/debounce.js +0 -0
  276. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/defaultTo.js +0 -0
  277. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/difference.js +0 -0
  278. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/differenceWith.js +0 -0
  279. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/divide.js +0 -0
  280. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/doNothing.js +0 -0
  281. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/drop.js +0 -0
  282. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropFirstBy.js +0 -0
  283. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropLast.js +0 -0
  284. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropLastWhile.js +0 -0
  285. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/dropWhile.js +0 -0
  286. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/endsWith.js +0 -0
  287. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/entries.js +0 -0
  288. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/evolve.js +0 -0
  289. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/filter.js +0 -0
  290. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/find.js +0 -0
  291. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/findIndex.js +0 -0
  292. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/findLast.js +0 -0
  293. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/findLastIndex.js +0 -0
  294. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/first.js +0 -0
  295. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/firstBy.js +0 -0
  296. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/flat.js +0 -0
  297. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/flatMap.js +0 -0
  298. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/floor.js +0 -0
  299. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/forEach.js +0 -0
  300. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/forEachObj.js +0 -0
  301. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/fromEntries.js +0 -0
  302. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/fromKeys.js +0 -0
  303. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/funnel.js +0 -0
  304. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/groupBy.js +0 -0
  305. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/groupByProp.js +0 -0
  306. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/hasAtLeast.js +0 -0
  307. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/hasSubObject.js +0 -0
  308. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/heap-OOe_F8_z.js +0 -0
  309. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/identity.js +0 -0
  310. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/index.js +0 -0
  311. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/indexBy.js +0 -0
  312. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/intersection.js +0 -0
  313. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/intersectionWith.js +0 -0
  314. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/invert.js +0 -0
  315. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isArray.js +0 -0
  316. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isBigInt.js +0 -0
  317. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isBoolean.js +0 -0
  318. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isDate.js +0 -0
  319. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isDeepEqual.js +0 -0
  320. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isDefined.js +0 -0
  321. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isEmpty.js +0 -0
  322. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isEmptyish.js +0 -0
  323. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isError.js +0 -0
  324. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isFunction.js +0 -0
  325. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isIncludedIn.js +0 -0
  326. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNonNull.js +0 -0
  327. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNonNullish.js +0 -0
  328. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNot.js +0 -0
  329. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNullish.js +0 -0
  330. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isNumber.js +0 -0
  331. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isObjectType.js +0 -0
  332. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isPlainObject.js +0 -0
  333. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isPromise.js +0 -0
  334. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isShallowEqual.js +0 -0
  335. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isStrictEqual.js +0 -0
  336. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isString.js +0 -0
  337. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isSymbol.js +0 -0
  338. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/isTruthy.js +0 -0
  339. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/join.js +0 -0
  340. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/keys.js +0 -0
  341. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/last.js +0 -0
  342. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/lazyDataLastImpl-DtF3cihj.js +0 -0
  343. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/length.js +0 -0
  344. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/map.js +0 -0
  345. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapKeys.js +0 -0
  346. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapToObj.js +0 -0
  347. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapValues.js +0 -0
  348. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mapWithFeedback.js +0 -0
  349. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mean.js +0 -0
  350. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/meanBy.js +0 -0
  351. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/median.js +0 -0
  352. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/merge.js +0 -0
  353. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mergeAll.js +0 -0
  354. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/mergeDeep.js +0 -0
  355. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/multiply.js +0 -0
  356. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/nthBy.js +0 -0
  357. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/objOf.js +0 -0
  358. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/omit.js +0 -0
  359. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/omitBy.js +0 -0
  360. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/once.js +0 -0
  361. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/only.js +0 -0
  362. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/partialBind.js +0 -0
  363. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/partialLastBind.js +0 -0
  364. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/partition.js +0 -0
  365. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pathOr.js +0 -0
  366. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pick.js +0 -0
  367. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pickBy.js +0 -0
  368. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pipe.js +0 -0
  369. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/piped.js +0 -0
  370. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/product.js +0 -0
  371. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/prop.js +0 -0
  372. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/pullObject.js +0 -0
  373. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purry.js +0 -0
  374. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purryFromLazy-B-_oTxzb.js +0 -0
  375. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purryOn-D4wFIFMT.js +0 -0
  376. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/purryOrderRules-4JgY6z4X.js +0 -0
  377. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/quickSelect-B4eZ0JeB.js +0 -0
  378. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/randomBigInt.js +0 -0
  379. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/randomInteger.js +0 -0
  380. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/randomString.js +0 -0
  381. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/range.js +0 -0
  382. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/rankBy.js +0 -0
  383. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/reduce.js +0 -0
  384. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/reverse.js +0 -0
  385. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/round.js +0 -0
  386. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sample.js +0 -0
  387. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/set.js +0 -0
  388. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/setPath.js +0 -0
  389. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/shuffle.js +0 -0
  390. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sliceString.js +0 -0
  391. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sort.js +0 -0
  392. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortBy.js +0 -0
  393. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedIndex.js +0 -0
  394. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedIndexBy.js +0 -0
  395. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedIndexWith.js +0 -0
  396. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedLastIndex.js +0 -0
  397. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sortedLastIndexBy.js +0 -0
  398. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/splice.js +0 -0
  399. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/split.js +0 -0
  400. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/splitAt.js +0 -0
  401. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/splitWhen.js +0 -0
  402. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/startsWith.js +0 -0
  403. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/stringToPath.js +0 -0
  404. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/subtract.js +0 -0
  405. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sum.js +0 -0
  406. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/sumBy.js +0 -0
  407. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/swapInPlace-BrVgf3c3.js +0 -0
  408. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/swapIndices.js +0 -0
  409. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/swapProps.js +0 -0
  410. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/take.js +0 -0
  411. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeFirstBy.js +0 -0
  412. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeLast.js +0 -0
  413. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeLastWhile.js +0 -0
  414. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/takeWhile.js +0 -0
  415. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/tap.js +0 -0
  416. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/times.js +0 -0
  417. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toCamelCase.js +0 -0
  418. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toKebabCase.js +0 -0
  419. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toLowerCase.js +0 -0
  420. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toSingle-qs9PC5sP.js +0 -0
  421. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toSnakeCase.js +0 -0
  422. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toTitleCase.js +0 -0
  423. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/toUpperCase.js +0 -0
  424. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/truncate.js +0 -0
  425. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/uncapitalize.js +0 -0
  426. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/unique.js +0 -0
  427. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/uniqueBy.js +0 -0
  428. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/uniqueWith.js +0 -0
  429. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/utilityEvaluators-BQqW5Ir5.js +0 -0
  430. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/values.js +0 -0
  431. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/when.js +0 -0
  432. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/withPrecision-CDZ-Oor7.js +0 -0
  433. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/words-Dv8LmnKC.js +0 -0
  434. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/zip.js +0 -0
  435. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/dist/zipWith.js +0 -0
  436. /package/.output/server/node_modules/{remeda → .nitro/remeda@2.33.6}/package.json +0 -0
  437. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/buffer-util.js +0 -0
  438. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/constants.js +0 -0
  439. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/event-target.js +0 -0
  440. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/extension.js +0 -0
  441. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/limiter.js +0 -0
  442. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/receiver.js +0 -0
  443. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/sender.js +0 -0
  444. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/stream.js +0 -0
  445. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/subprotocol.js +0 -0
  446. /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/validation.js +0 -0
@@ -0,0 +1,923 @@
1
+ import {
2
+ isOpenAPI,
3
+ isOpenAPI30,
4
+ isOpenAPI31,
5
+ isOpenAPI32,
6
+ isSwagger
7
+ } from "./chunk-IYQ77VVR.js";
8
+
9
+ // src/index.ts
10
+ import { $RefParser, dereferenceInternal, MissingPointerError } from "@apidevtools/json-schema-ref-parser";
11
+
12
+ // src/util.ts
13
+ import { getJsonSchemaRefParserDefaultOptions } from "@apidevtools/json-schema-ref-parser";
14
+
15
+ // src/lib/index.ts
16
+ var pathParameterTemplateRegExp = /\{([^/}]+)}/g;
17
+ var supportedHTTPMethods = ["get", "post", "put", "delete", "patch", "options", "head", "trace"];
18
+ var swaggerHTTPMethods = ["get", "put", "post", "delete", "options", "head", "patch"];
19
+ function getSpecificationName(api) {
20
+ return isSwagger(api) ? "Swagger" : "OpenAPI";
21
+ }
22
+
23
+ // src/repair.ts
24
+ function fixServers(server, path) {
25
+ if (server && "url" in server && server.url && server.url.startsWith("/")) {
26
+ try {
27
+ const inUrl = new URL(path);
28
+ server.url = `${inUrl.protocol}//${inUrl.hostname}${server.url}`;
29
+ } catch {
30
+ }
31
+ }
32
+ }
33
+ function fixOasRelativeServers(schema, filePath) {
34
+ if (!schema || !isOpenAPI(schema) || !filePath || !filePath.startsWith("http:") && !filePath.startsWith("https:")) {
35
+ return;
36
+ }
37
+ if (schema.servers) {
38
+ schema.servers.map((server) => fixServers(server, filePath));
39
+ }
40
+ ["paths", "webhooks"].forEach((component) => {
41
+ if (component in schema) {
42
+ const schemaElement = schema.paths || {};
43
+ Object.keys(schemaElement).forEach((path) => {
44
+ const pathItem = schemaElement[path] || {};
45
+ Object.keys(pathItem).forEach((opItem) => {
46
+ const pathItemElement = pathItem[opItem];
47
+ if (!pathItemElement) {
48
+ return;
49
+ }
50
+ if (opItem === "servers" && Array.isArray(pathItemElement)) {
51
+ pathItemElement.forEach((server) => {
52
+ fixServers(server, filePath);
53
+ });
54
+ return;
55
+ }
56
+ if (supportedHTTPMethods.includes(opItem) && typeof pathItemElement === "object" && "servers" in pathItemElement && Array.isArray(pathItemElement.servers)) {
57
+ pathItemElement.servers.forEach((server) => {
58
+ fixServers(server, filePath);
59
+ });
60
+ }
61
+ });
62
+ });
63
+ }
64
+ });
65
+ }
66
+
67
+ // src/util.ts
68
+ function repairSchema(schema, filePath) {
69
+ if (isOpenAPI(schema)) {
70
+ fixOasRelativeServers(schema, filePath);
71
+ }
72
+ }
73
+ function normalizeArguments(api) {
74
+ return {
75
+ path: typeof api === "string" ? api : "",
76
+ schema: typeof api === "object" ? api : void 0
77
+ };
78
+ }
79
+ function convertOptionsForParser(options) {
80
+ const parserOptions = getJsonSchemaRefParserDefaultOptions();
81
+ return {
82
+ ...parserOptions,
83
+ dereference: {
84
+ ...parserOptions.dereference,
85
+ circular: options?.dereference && "circular" in options.dereference ? options.dereference.circular : parserOptions.dereference.circular,
86
+ onCircular: options?.dereference?.onCircular || parserOptions.dereference.onCircular,
87
+ onDereference: options?.dereference?.onDereference || parserOptions.dereference.onDereference,
88
+ // OpenAPI 3.1 allows for `summary` and `description` properties at the same level as a `$ref`
89
+ // pointer to be preserved when that `$ref` pointer is dereferenced. The default behavior of
90
+ // `json-schema-ref-parser` is to discard these properties but this option allows us to
91
+ // override that behavior.
92
+ preservedProperties: ["summary", "description"]
93
+ },
94
+ resolve: {
95
+ ...parserOptions.resolve,
96
+ external: options?.resolve && "external" in options.resolve ? options.resolve.external : parserOptions.resolve.external,
97
+ file: options?.resolve && "file" in options.resolve ? options.resolve.file : parserOptions.resolve.file,
98
+ http: {
99
+ ...typeof parserOptions.resolve.http === "object" ? parserOptions.resolve.http : {},
100
+ timeout: options?.resolve?.http && "timeout" in options.resolve.http ? options.resolve.http.timeout : 5e3
101
+ }
102
+ },
103
+ timeoutMs: options?.timeoutMs
104
+ };
105
+ }
106
+
107
+ // src/validators/schema.ts
108
+ import betterAjvErrors from "@readme/better-ajv-errors";
109
+ import { openapi } from "@readme/openapi-schemas";
110
+ import Ajv from "ajv/dist/2020.js";
111
+ import AjvDraft4 from "ajv-draft-04";
112
+
113
+ // src/lib/hasInvalidPaths.ts
114
+ function hasInvalidPaths(api) {
115
+ if (!api.paths || typeof api.paths !== "object" || Array.isArray(api.paths)) {
116
+ return false;
117
+ }
118
+ return Object.keys(api.paths).some((path) => !path.startsWith("/"));
119
+ }
120
+
121
+ // src/lib/reduceAjvErrors.ts
122
+ function reduceAjvErrors(errors) {
123
+ const flattened = /* @__PURE__ */ new Map();
124
+ errors.forEach((err) => {
125
+ if (["must have required property '$ref'", "must match exactly one schema in oneOf"].includes(err.message)) {
126
+ return;
127
+ }
128
+ if (!flattened.size) {
129
+ flattened.set(err.instancePath, err);
130
+ return;
131
+ } else if (flattened.has(err.instancePath)) {
132
+ return;
133
+ }
134
+ let shouldRecordError = true;
135
+ flattened.forEach((flat) => {
136
+ if (flat.instancePath.includes(err.instancePath)) {
137
+ shouldRecordError = false;
138
+ }
139
+ });
140
+ if (shouldRecordError) {
141
+ flattened.set(err.instancePath, err);
142
+ }
143
+ });
144
+ if (!flattened.size) {
145
+ return errors;
146
+ }
147
+ return [...flattened.values()];
148
+ }
149
+
150
+ // src/validators/schema.ts
151
+ var LARGE_SPEC_ERROR_CAP = 20;
152
+ var LARGE_SPEC_SIZE_CAP = 5e6;
153
+ function initializeAjv(draft04 = true) {
154
+ const opts = {
155
+ allErrors: true,
156
+ strict: false,
157
+ validateFormats: false
158
+ };
159
+ if (draft04) {
160
+ return new AjvDraft4(opts);
161
+ }
162
+ return new Ajv(opts);
163
+ }
164
+ function validateSchema(api, options = {}) {
165
+ if (hasInvalidPaths(api)) {
166
+ return {
167
+ valid: false,
168
+ errors: [
169
+ {
170
+ message: getSpecificationName(api) === "Swagger" ? "Entries in the Swagger `paths` object must begin with a leading slash." : "Entries in the OpenAPI `paths` object must begin with a leading slash."
171
+ }
172
+ ],
173
+ warnings: [],
174
+ additionalErrors: 0,
175
+ specification: getSpecificationName(api)
176
+ };
177
+ }
178
+ let ajv;
179
+ let schema;
180
+ const specificationName = getSpecificationName(api);
181
+ if (isSwagger(api)) {
182
+ schema = openapi.v2;
183
+ ajv = initializeAjv();
184
+ } else if (isOpenAPI32(api)) {
185
+ throw new TypeError("OpenAPI 3.2 is currently unsupported.");
186
+ } else if (isOpenAPI31(api)) {
187
+ schema = openapi.v31legacy;
188
+ const schemaDynamicRef = schema.$defs.schema;
189
+ if ("$dynamicAnchor" in schemaDynamicRef) {
190
+ delete schemaDynamicRef.$dynamicAnchor;
191
+ }
192
+ schema.$defs.components.properties.schemas.additionalProperties = schemaDynamicRef;
193
+ schema.$defs.header.dependentSchemas.schema.properties.schema = schemaDynamicRef;
194
+ schema.$defs["media-type"].properties.schema = schemaDynamicRef;
195
+ schema.$defs.parameter.properties.schema = schemaDynamicRef;
196
+ ajv = initializeAjv(false);
197
+ } else {
198
+ schema = openapi.v3;
199
+ ajv = initializeAjv();
200
+ }
201
+ const isValid = ajv.validate(schema, api);
202
+ if (isValid) {
203
+ return { valid: true, warnings: [], specification: specificationName };
204
+ }
205
+ let additionalErrors = 0;
206
+ let reducedErrors = reduceAjvErrors(ajv.errors);
207
+ if (reducedErrors.length >= LARGE_SPEC_ERROR_CAP) {
208
+ try {
209
+ if (JSON.stringify(api).length >= LARGE_SPEC_SIZE_CAP) {
210
+ additionalErrors = reducedErrors.length - 20;
211
+ reducedErrors = reducedErrors.slice(0, 20);
212
+ }
213
+ } catch {
214
+ }
215
+ }
216
+ try {
217
+ const errors = betterAjvErrors(schema, api, reducedErrors, {
218
+ format: "cli-array",
219
+ colorize: options?.validate?.errors?.colorize || false,
220
+ indent: 2
221
+ });
222
+ return {
223
+ valid: false,
224
+ errors,
225
+ warnings: [],
226
+ additionalErrors,
227
+ specification: specificationName
228
+ };
229
+ } catch (err) {
230
+ return {
231
+ valid: false,
232
+ errors: [{ message: err.message }],
233
+ warnings: [],
234
+ additionalErrors,
235
+ specification: specificationName
236
+ };
237
+ }
238
+ }
239
+
240
+ // src/validators/spec/index.ts
241
+ var SpecificationValidator = class {
242
+ errors = [];
243
+ warnings = [];
244
+ reportError(message) {
245
+ this.errors.push({ message });
246
+ }
247
+ reportWarning(message) {
248
+ this.warnings.push({ message });
249
+ }
250
+ };
251
+
252
+ // src/validators/spec/openapi.ts
253
+ var OpenAPISpecificationValidator = class extends SpecificationValidator {
254
+ api;
255
+ rules;
256
+ constructor(api, rules) {
257
+ super();
258
+ this.api = api;
259
+ this.rules = rules;
260
+ }
261
+ run() {
262
+ const operationIds = [];
263
+ Object.keys(this.api.paths || {}).forEach((pathName) => {
264
+ const path = this.api.paths[pathName];
265
+ const pathId = `/paths${pathName}`;
266
+ if (path && pathName.startsWith("/")) {
267
+ this.validatePath(path, pathId, operationIds);
268
+ }
269
+ });
270
+ if (isOpenAPI30(this.api)) {
271
+ if (this.api.components) {
272
+ Object.keys(this.api.components).forEach((componentType) => {
273
+ Object.keys(this.api.components[componentType]).forEach((componentName) => {
274
+ if (!/^[a-zA-Z0-9.\-_]+$/.test(componentName)) {
275
+ const componentId = `/components/${componentType}/${componentName}`;
276
+ this.reportError(
277
+ `\`${componentId}\` has an invalid name. Component names should match against: /^[a-zA-Z0-9.-_]+$/`
278
+ );
279
+ }
280
+ });
281
+ });
282
+ }
283
+ }
284
+ if (isOpenAPI31(this.api)) {
285
+ if (!Object.keys(this.api.paths || {}).length && !Object.keys(this.api.webhooks || {}).length && !Object.keys(this.api.components || {}).length) {
286
+ this.reportError(
287
+ "OpenAPI 3.1 definitions must contain at least one entry in either `paths`, `webhooks`, or `components`."
288
+ );
289
+ }
290
+ }
291
+ }
292
+ /**
293
+ * Validates the given path.
294
+ *
295
+ */
296
+ validatePath(path, pathId, operationIds) {
297
+ supportedHTTPMethods.forEach((operationName) => {
298
+ const operation = path[operationName];
299
+ const operationId = `${pathId}/${operationName}`;
300
+ if (operation) {
301
+ const declaredOperationId = operation.operationId;
302
+ if (declaredOperationId) {
303
+ if (!operationIds.includes(declaredOperationId)) {
304
+ operationIds.push(declaredOperationId);
305
+ } else if (this.rules["duplicate-operation-id"] === "warning") {
306
+ this.reportWarning(`The operationId \`${declaredOperationId}\` is duplicated and should be made unique.`);
307
+ } else {
308
+ this.reportError(`The operationId \`${declaredOperationId}\` is duplicated and must be made unique.`);
309
+ }
310
+ }
311
+ this.validateParameters(path, pathId, operation, operationId);
312
+ Object.keys(operation.responses || {}).forEach((responseCode) => {
313
+ const response = operation.responses[responseCode];
314
+ const responseId = `${operationId}/responses/${responseCode}`;
315
+ if (response && !("$ref" in response)) {
316
+ this.validateResponse(response, responseId);
317
+ }
318
+ });
319
+ }
320
+ });
321
+ }
322
+ /**
323
+ * Validates the parameters for the given operation.
324
+ *
325
+ */
326
+ validateParameters(path, pathId, operation, operationId) {
327
+ const pathParams = path.parameters || [];
328
+ const operationParams = operation.parameters || [];
329
+ this.checkForDuplicates(pathParams, pathId);
330
+ this.checkForDuplicates(operationParams, operationId);
331
+ const params = pathParams.reduce((combinedParams, value) => {
332
+ const duplicate = combinedParams.some((param) => {
333
+ if ("$ref" in param || "$ref" in value) {
334
+ return false;
335
+ }
336
+ return param.in === value.in && param.name === value.name;
337
+ });
338
+ if (!duplicate) {
339
+ combinedParams.push(value);
340
+ }
341
+ return combinedParams;
342
+ }, operationParams.slice());
343
+ this.validatePathParameters(params, pathId, operationId);
344
+ this.validateParameterTypes(params, operationId);
345
+ }
346
+ /**
347
+ * Validates path parameters for the given path.
348
+ *
349
+ */
350
+ validatePathParameters(params, pathId, operationId) {
351
+ const placeholders = [...new Set(pathId.match(pathParameterTemplateRegExp) || [])];
352
+ params.filter((param) => "in" in param).filter((param) => param.in === "path").forEach((param) => {
353
+ if (param.required !== true) {
354
+ if (this.rules["non-optional-path-parameters"] === "warning") {
355
+ this.reportWarning(
356
+ `Path parameters should not be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
357
+ );
358
+ } else {
359
+ this.reportError(
360
+ `Path parameters cannot be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
361
+ );
362
+ }
363
+ }
364
+ const match = placeholders.indexOf(`{${param.name}}`);
365
+ if (match === -1) {
366
+ const error = `\`${operationId}\` has a path parameter named \`${param.name}\`, but there is no corresponding \`{${param.name}}\` in the path string.`;
367
+ if (this.rules["path-parameters-not-in-path"] === "warning") {
368
+ this.reportWarning(error);
369
+ } else {
370
+ this.reportError(error);
371
+ }
372
+ }
373
+ placeholders.splice(match, 1);
374
+ });
375
+ if (placeholders.length > 0) {
376
+ const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }).format(
377
+ placeholders.map((placeholder) => `\`${placeholder}\``)
378
+ );
379
+ const error = `\`${operationId}\` is missing path parameter(s) for ${list}.`;
380
+ if (this.rules["path-parameters-not-in-parameters"] === "warning") {
381
+ this.reportWarning(error);
382
+ } else {
383
+ this.reportError(error);
384
+ }
385
+ }
386
+ }
387
+ /**
388
+ * Validates data types of parameters for the given operation.
389
+ *
390
+ */
391
+ validateParameterTypes(params, operationId) {
392
+ params.forEach((param) => {
393
+ if ("$ref" in param) {
394
+ return;
395
+ }
396
+ const parameterId = `${operationId}/parameters/${param.name}`;
397
+ if (!param.schema && param.content) {
398
+ this.validateParameterContent(param.content, parameterId);
399
+ return;
400
+ } else if ("$ref" in param.schema) {
401
+ return;
402
+ }
403
+ this.validateSchema(param.schema, parameterId);
404
+ });
405
+ }
406
+ /**
407
+ * Validates parameter content object.
408
+ * Note: The requirement for exactly one media type is already enforced by the OpenAPI JSON schema.
409
+ */
410
+ validateParameterContent(content, parameterId) {
411
+ const mediaTypes = Object.keys(content);
412
+ if (mediaTypes.length !== 1) {
413
+ this.reportError(
414
+ `\`${parameterId}\` must have exactly one media type in \`content\`, but found ${mediaTypes.length}.`
415
+ );
416
+ return;
417
+ }
418
+ const mediaType = mediaTypes[0];
419
+ const contentSchema = content[mediaType].schema;
420
+ if (contentSchema) {
421
+ if ("$ref" in contentSchema) {
422
+ return;
423
+ }
424
+ this.validateSchema(contentSchema, `${parameterId}/content/${mediaType}/schema`);
425
+ }
426
+ }
427
+ /**
428
+ * Validates the given response object.
429
+ *
430
+ */
431
+ validateResponse(response, responseId) {
432
+ Object.keys(response.headers || {}).forEach((headerName) => {
433
+ const header = response.headers[headerName];
434
+ const headerId = `${responseId}/headers/${headerName}`;
435
+ if ("$ref" in header) {
436
+ return;
437
+ }
438
+ if (header.schema) {
439
+ if (!("$ref" in header.schema)) {
440
+ this.validateSchema(header.schema, headerId);
441
+ }
442
+ } else if (header.content) {
443
+ Object.keys(header.content).forEach((mediaType) => {
444
+ if (header.content[mediaType].schema) {
445
+ if (!("$ref" in header.content[mediaType].schema)) {
446
+ this.validateSchema(header.content[mediaType].schema || {}, `${headerId}/content/${mediaType}/schema`);
447
+ }
448
+ }
449
+ });
450
+ }
451
+ });
452
+ if (response.content) {
453
+ Object.keys(response.content).forEach((mediaType) => {
454
+ if (response.content[mediaType].schema) {
455
+ if (!("$ref" in response.content[mediaType].schema)) {
456
+ this.validateSchema(response.content[mediaType].schema || {}, `${responseId}/content/${mediaType}/schema`);
457
+ }
458
+ }
459
+ });
460
+ }
461
+ }
462
+ /**
463
+ * Validates the given Swagger schema object.
464
+ *
465
+ */
466
+ validateSchema(schema, schemaId) {
467
+ if (schema.type === "array" && !schema.items) {
468
+ if (this.rules["array-without-items"] === "warning") {
469
+ this.reportWarning(`\`${schemaId}\` is an array, so it should include an \`items\` schema.`);
470
+ } else {
471
+ this.reportError(`\`${schemaId}\` is an array, so it must include an \`items\` schema.`);
472
+ }
473
+ }
474
+ }
475
+ /**
476
+ * Checks the given parameter list for duplicates.
477
+ *
478
+ */
479
+ checkForDuplicates(params, schemaId) {
480
+ for (let i = 0; i < params.length - 1; i++) {
481
+ const outer = params[i];
482
+ for (let j = i + 1; j < params.length; j++) {
483
+ const inner = params[j];
484
+ if ("$ref" in outer || "$ref" in inner) {
485
+ continue;
486
+ }
487
+ if (outer.name === inner.name && outer.in === inner.in) {
488
+ const error = `Found multiple \`${outer.in}\` parameters named \`${outer.name}\` in \`${schemaId}\`.`;
489
+ if (this.rules["duplicate-non-request-body-parameters"] === "warning") {
490
+ this.reportWarning(error);
491
+ } else {
492
+ this.reportError(error);
493
+ }
494
+ }
495
+ }
496
+ }
497
+ }
498
+ };
499
+
500
+ // src/validators/spec/swagger.ts
501
+ var SwaggerSpecificationValidator = class extends SpecificationValidator {
502
+ api;
503
+ rules;
504
+ constructor(api, rules) {
505
+ super();
506
+ this.api = api;
507
+ this.rules = rules;
508
+ }
509
+ run() {
510
+ const operationIds = [];
511
+ Object.keys(this.api.paths || {}).forEach((pathName) => {
512
+ const path = this.api.paths[pathName];
513
+ const pathId = `/paths${pathName}`;
514
+ if (path && pathName.startsWith("/")) {
515
+ this.validatePath(path, pathId, operationIds);
516
+ }
517
+ });
518
+ Object.keys(this.api.definitions || {}).forEach((definitionName) => {
519
+ const definition = this.api.definitions[definitionName];
520
+ const definitionId = `/definitions/${definitionName}`;
521
+ if (!/^[a-zA-Z0-9.\-_]+$/.test(definitionName)) {
522
+ this.reportError(
523
+ `\`${definitionId}\` has an invalid name. Definition names should match against: /^[a-zA-Z0-9.-_]+$/`
524
+ );
525
+ }
526
+ this.validateRequiredPropertiesExist(definition, definitionId);
527
+ });
528
+ }
529
+ /**
530
+ * Validates the given path.
531
+ *
532
+ */
533
+ validatePath(path, pathId, operationIds) {
534
+ swaggerHTTPMethods.forEach((operationName) => {
535
+ const operation = path[operationName];
536
+ const operationId = `${pathId}/${operationName}`;
537
+ if (operation) {
538
+ const declaredOperationId = operation.operationId;
539
+ if (declaredOperationId) {
540
+ if (!operationIds.includes(declaredOperationId)) {
541
+ operationIds.push(declaredOperationId);
542
+ } else if (this.rules["duplicate-operation-id"] === "warning") {
543
+ this.reportWarning(`The operationId \`${declaredOperationId}\` is duplicated and should be made unique.`);
544
+ } else {
545
+ this.reportError(`The operationId \`${declaredOperationId}\` is duplicated and must be made unique.`);
546
+ }
547
+ }
548
+ this.validateParameters(path, pathId, operation, operationId);
549
+ Object.keys(operation.responses || {}).forEach((responseName) => {
550
+ const response = operation.responses[responseName];
551
+ if ("$ref" in response || !response) {
552
+ return;
553
+ }
554
+ const responseId = `${operationId}/responses/${responseName}`;
555
+ this.validateResponse(responseName, response, responseId);
556
+ });
557
+ }
558
+ });
559
+ }
560
+ /**
561
+ * Validates the parameters for the given operation.
562
+ *
563
+ */
564
+ validateParameters(path, pathId, operation, operationId) {
565
+ const pathParams = (path.parameters || []).filter((param) => !("$ref" in param));
566
+ const operationParams = (operation.parameters || []).filter(
567
+ (param) => !("$ref" in param)
568
+ );
569
+ this.checkForDuplicates(pathParams, pathId);
570
+ this.checkForDuplicates(operationParams, operationId);
571
+ const params = pathParams.reduce((combinedParams, value) => {
572
+ const duplicate = combinedParams.some((param) => {
573
+ if ("$ref" in param || "$ref" in value) {
574
+ return false;
575
+ }
576
+ return param.in === value.in && param.name === value.name;
577
+ });
578
+ if (!duplicate) {
579
+ combinedParams.push(value);
580
+ }
581
+ return combinedParams;
582
+ }, operationParams.slice());
583
+ this.validateBodyParameters(params, operationId);
584
+ this.validatePathParameters(params, pathId, operationId);
585
+ this.validateParameterTypes(params, operation, operationId);
586
+ }
587
+ /**
588
+ * Validates body and formData parameters for the given operation.
589
+ *
590
+ */
591
+ validateBodyParameters(params, operationId) {
592
+ const bodyParams = params.filter((param) => param.in === "body");
593
+ const formParams = params.filter((param) => param.in === "formData");
594
+ if (bodyParams.length > 1) {
595
+ this.reportError(`\`${operationId}\` has ${bodyParams.length} body parameters. Only one is allowed.`);
596
+ } else if (bodyParams.length > 0 && formParams.length > 0) {
597
+ this.reportError(
598
+ `\`${operationId}\` has \`body\` and \`formData\` parameters. Only one or the other is allowed.`
599
+ );
600
+ }
601
+ }
602
+ /**
603
+ * Validates path parameters for the given path.
604
+ *
605
+ */
606
+ validatePathParameters(params, pathId, operationId) {
607
+ const placeholders = pathId.match(pathParameterTemplateRegExp) || [];
608
+ for (let i = 0; i < placeholders.length; i++) {
609
+ for (let j = i + 1; j < placeholders.length; j++) {
610
+ if (placeholders[i] === placeholders[j]) {
611
+ this.reportError(`\`${operationId}\` has multiple path placeholders named \`${placeholders[i]}\`.`);
612
+ }
613
+ }
614
+ }
615
+ params.filter((param) => param.in === "path").forEach((param) => {
616
+ if (param.required !== true) {
617
+ if (this.rules["non-optional-path-parameters"] === "warning") {
618
+ this.reportWarning(
619
+ `Path parameters should not be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
620
+ );
621
+ } else {
622
+ this.reportError(
623
+ `Path parameters cannot be optional. Set \`required=true\` for the \`${param.name}\` parameter at \`${operationId}\`.`
624
+ );
625
+ }
626
+ }
627
+ const match = placeholders.indexOf(`{${param.name}}`);
628
+ if (match === -1) {
629
+ const error = `\`${operationId}\` has a path parameter named \`${param.name}\`, but there is no corresponding \`{${param.name}}\` in the path string.`;
630
+ if (this.rules["path-parameters-not-in-path"] === "warning") {
631
+ this.reportWarning(error);
632
+ } else {
633
+ this.reportError(error);
634
+ }
635
+ }
636
+ placeholders.splice(match, 1);
637
+ });
638
+ if (placeholders.length > 0) {
639
+ const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }).format(
640
+ placeholders.map((placeholder) => `\`${placeholder}\``)
641
+ );
642
+ const error = `\`${operationId}\` is missing path parameter(s) for ${list}.`;
643
+ if (this.rules["path-parameters-not-in-parameters"] === "warning") {
644
+ this.reportWarning(error);
645
+ } else {
646
+ this.reportError(error);
647
+ }
648
+ }
649
+ }
650
+ /**
651
+ * Validates data types of parameters for the given operation.
652
+ *
653
+ */
654
+ validateParameterTypes(params, operation, operationId) {
655
+ params.forEach((param) => {
656
+ const parameterId = `${operationId}/parameters/${param.name}`;
657
+ let schema;
658
+ switch (param.in) {
659
+ case "body":
660
+ schema = param.schema;
661
+ break;
662
+ case "formData":
663
+ schema = param;
664
+ break;
665
+ default:
666
+ schema = param;
667
+ }
668
+ this.validateSchema(schema, parameterId);
669
+ this.validateRequiredPropertiesExist(schema, parameterId);
670
+ if (schema.type === "file") {
671
+ const formData = /multipart\/(.*\+)?form-data/;
672
+ const urlEncoded = /application\/(.*\+)?x-www-form-urlencoded/;
673
+ const consumes = operation.consumes || this.api.consumes || [];
674
+ const hasValidMimeType = consumes.some((consume) => {
675
+ return formData.test(consume) || urlEncoded.test(consume);
676
+ });
677
+ if (!hasValidMimeType) {
678
+ this.reportError(
679
+ `\`${operationId}\` has a file parameter, so it must consume \`multipart/form-data\` or \`application/x-www-form-urlencoded\`.`
680
+ );
681
+ }
682
+ }
683
+ });
684
+ }
685
+ /**
686
+ * Validates the given response object.
687
+ *
688
+ */
689
+ validateResponse(code, response, responseId) {
690
+ if (code !== "default") {
691
+ if (typeof code === "number" && (code < 100 || code > 599) || typeof code === "string" && (Number(code) < 100 || Number(code) > 599)) {
692
+ this.reportError(`\`${responseId}\` has an invalid response code: ${code}`);
693
+ }
694
+ }
695
+ Object.keys(response.headers || {}).forEach((headerName) => {
696
+ const header = response.headers[headerName];
697
+ const headerId = `${responseId}/headers/${headerName}`;
698
+ this.validateSchema(header, headerId);
699
+ });
700
+ if (response.schema) {
701
+ if ("$ref" in response.schema) {
702
+ return;
703
+ }
704
+ this.validateSchema(response.schema, `${responseId}/schema`);
705
+ }
706
+ }
707
+ /**
708
+ * Validates the given Swagger schema object.
709
+ *
710
+ */
711
+ validateSchema(schema, schemaId) {
712
+ if (schema.type === "array" && !schema.items) {
713
+ if (this.rules["array-without-items"] === "warning") {
714
+ this.reportWarning(`\`${schemaId}\` is an array, so it should include an \`items\` schema.`);
715
+ } else {
716
+ this.reportError(`\`${schemaId}\` is an array, so it must include an \`items\` schema.`);
717
+ }
718
+ }
719
+ }
720
+ /**
721
+ * Validates that the declared properties of the given Swagger schema object actually exist.
722
+ *
723
+ */
724
+ validateRequiredPropertiesExist(schema, schemaId) {
725
+ function collectProperties(schemaObj, props) {
726
+ if (schemaObj.properties) {
727
+ Object.keys(schemaObj.properties).forEach((property) => {
728
+ if (schemaObj.properties.hasOwnProperty(property)) {
729
+ props[property] = schemaObj.properties[property];
730
+ }
731
+ });
732
+ }
733
+ if (schemaObj.allOf) {
734
+ schemaObj.allOf.forEach((parent) => {
735
+ collectProperties(parent, props);
736
+ });
737
+ }
738
+ }
739
+ if (schema.required && Array.isArray(schema.required)) {
740
+ const props = {};
741
+ collectProperties(schema, props);
742
+ schema.required.forEach((requiredProperty) => {
743
+ if (!props[requiredProperty]) {
744
+ const error = `Property \`${requiredProperty}\` is listed as required but does not exist in \`${schemaId}\`.`;
745
+ if (this.rules["unknown-required-schema-property"] === "warning") {
746
+ this.reportWarning(error);
747
+ } else {
748
+ this.reportError(error);
749
+ }
750
+ }
751
+ });
752
+ }
753
+ }
754
+ /**
755
+ * Checks the given parameter list for duplicates.
756
+ *
757
+ */
758
+ checkForDuplicates(params, schemaId) {
759
+ for (let i = 0; i < params.length - 1; i++) {
760
+ const outer = params[i];
761
+ for (let j = i + 1; j < params.length; j++) {
762
+ const inner = params[j];
763
+ if (outer.name === inner.name && outer.in === inner.in) {
764
+ const error = `Found multiple \`${outer.in}\` parameters named \`${outer.name}\` in \`${schemaId}\`.`;
765
+ if (this.rules["duplicate-non-request-body-parameters"] === "warning") {
766
+ this.reportWarning(error);
767
+ } else {
768
+ this.reportError(error);
769
+ }
770
+ }
771
+ }
772
+ }
773
+ }
774
+ };
775
+
776
+ // src/validators/spec.ts
777
+ function validateSpec(api, rules) {
778
+ let validator;
779
+ const specificationName = getSpecificationName(api);
780
+ if (isOpenAPI(api)) {
781
+ validator = new OpenAPISpecificationValidator(api, rules.openapi);
782
+ } else {
783
+ validator = new SwaggerSpecificationValidator(api, rules.swagger);
784
+ }
785
+ validator.run();
786
+ if (!validator.errors.length) {
787
+ return {
788
+ valid: true,
789
+ warnings: validator.warnings,
790
+ specification: specificationName
791
+ };
792
+ }
793
+ return {
794
+ valid: false,
795
+ errors: validator.errors,
796
+ warnings: validator.warnings,
797
+ additionalErrors: 0,
798
+ specification: specificationName
799
+ };
800
+ }
801
+
802
+ // src/index.ts
803
+ async function parse(api, options) {
804
+ const args = normalizeArguments(api);
805
+ const parserOptions = convertOptionsForParser(options);
806
+ const parser = new $RefParser();
807
+ const schema = await parser.parse(args.path, args.schema, parserOptions);
808
+ repairSchema(schema, args.path);
809
+ return schema;
810
+ }
811
+ async function bundle(api, options) {
812
+ const args = normalizeArguments(api);
813
+ const parserOptions = convertOptionsForParser(options);
814
+ const parser = new $RefParser();
815
+ await parser.bundle(args.path, args.schema, parserOptions);
816
+ repairSchema(parser.schema, args.path);
817
+ return parser.schema;
818
+ }
819
+ async function dereference(api, options) {
820
+ const args = normalizeArguments(api);
821
+ const parserOptions = convertOptionsForParser(options);
822
+ const parser = new $RefParser();
823
+ await parser.dereference(args.path, args.schema, parserOptions);
824
+ repairSchema(parser.schema, args.path);
825
+ return parser.schema;
826
+ }
827
+ async function validate(api, options) {
828
+ const args = normalizeArguments(api);
829
+ const parserOptions = convertOptionsForParser(options);
830
+ let result;
831
+ const circular$RefOption = parserOptions.dereference.circular;
832
+ parserOptions.dereference.circular = "ignore";
833
+ const parser = new $RefParser();
834
+ try {
835
+ await parser.dereference(args.path, args.schema, parserOptions);
836
+ } catch (err) {
837
+ if (err instanceof MissingPointerError) {
838
+ return {
839
+ valid: false,
840
+ errors: [{ message: err.message }],
841
+ warnings: [],
842
+ additionalErrors: 0,
843
+ specification: null
844
+ };
845
+ }
846
+ throw err;
847
+ }
848
+ if (!isSwagger(parser.schema) && !isOpenAPI(parser.schema)) {
849
+ return {
850
+ valid: false,
851
+ errors: [{ message: "Supplied schema is not a valid API definition." }],
852
+ warnings: [],
853
+ additionalErrors: 0,
854
+ specification: null
855
+ };
856
+ }
857
+ parserOptions.dereference.circular = circular$RefOption;
858
+ result = validateSchema(parser.schema, options);
859
+ if (!result.valid) {
860
+ return result;
861
+ }
862
+ if (parser.$refs?.circular) {
863
+ if (circular$RefOption === true) {
864
+ dereferenceInternal(parser, parserOptions);
865
+ } else if (circular$RefOption === false) {
866
+ throw new ReferenceError(
867
+ "The API contains circular references but the validator is configured to not permit them."
868
+ );
869
+ }
870
+ }
871
+ const openapiRules = options?.validate?.rules?.openapi;
872
+ const swaggerRules = options?.validate?.rules?.swagger;
873
+ result = validateSpec(parser.schema, {
874
+ openapi: {
875
+ "array-without-items": openapiRules?.["array-without-items"] || "error",
876
+ "duplicate-non-request-body-parameters": openapiRules?.["duplicate-non-request-body-parameters"] || "error",
877
+ "duplicate-operation-id": openapiRules?.["duplicate-operation-id"] || "error",
878
+ "non-optional-path-parameters": openapiRules?.["non-optional-path-parameters"] || "error",
879
+ "path-parameters-not-in-parameters": openapiRules?.["path-parameters-not-in-parameters"] || "error",
880
+ "path-parameters-not-in-path": openapiRules?.["path-parameters-not-in-path"] || "error"
881
+ },
882
+ swagger: {
883
+ "array-without-items": swaggerRules?.["array-without-items"] || "error",
884
+ "duplicate-non-request-body-parameters": swaggerRules?.["duplicate-non-request-body-parameters"] || "error",
885
+ "duplicate-operation-id": swaggerRules?.["duplicate-operation-id"] || "error",
886
+ "non-optional-path-parameters": swaggerRules?.["non-optional-path-parameters"] || "error",
887
+ "path-parameters-not-in-parameters": swaggerRules?.["path-parameters-not-in-parameters"] || "error",
888
+ "path-parameters-not-in-path": swaggerRules?.["path-parameters-not-in-path"] || "error",
889
+ "unknown-required-schema-property": swaggerRules?.["unknown-required-schema-property"] || "error"
890
+ }
891
+ });
892
+ return result;
893
+ }
894
+ function compileErrors(result) {
895
+ const specName = result.specification || "API definition";
896
+ const status = !result.valid ? "failed" : "succeeded, but with warnings";
897
+ const message = [`${specName} schema validation ${status}.`];
898
+ if (result.valid === false) {
899
+ if (result.errors.length) {
900
+ message.push(...result.errors.map((err) => err.message));
901
+ }
902
+ }
903
+ if (result.warnings.length) {
904
+ if (result.valid === false && result.errors.length) {
905
+ message.push("We have also found some additional warnings:");
906
+ }
907
+ message.push(...result.warnings.map((warn) => warn.message));
908
+ }
909
+ if (result.valid === false && result.additionalErrors > 0) {
910
+ message.push(
911
+ `Plus an additional ${result.additionalErrors} errors. Please resolve the above and re-run validation to see more.`
912
+ );
913
+ }
914
+ return message.join("\n\n");
915
+ }
916
+ export {
917
+ bundle,
918
+ compileErrors,
919
+ dereference,
920
+ parse,
921
+ validate
922
+ };
923
+ //# sourceMappingURL=index.js.map