@skmtc/core 0.0.598 → 0.0.600

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 (663) hide show
  1. package/esm/context/CoreContext.d.ts.map +1 -1
  2. package/esm/context/CoreContext.js +1 -0
  3. package/esm/context/GenerateContext.d.ts +2 -2
  4. package/esm/context/GenerateContext.d.ts.map +1 -1
  5. package/esm/context/GenerateContext.js +2 -2
  6. package/esm/context/ParseContext.d.ts +43 -4
  7. package/esm/context/ParseContext.d.ts.map +1 -1
  8. package/esm/context/ParseContext.js +56 -9
  9. package/esm/context/StackTrail.d.ts +1 -6
  10. package/esm/context/StackTrail.d.ts.map +1 -1
  11. package/esm/context/StackTrail.js +1 -23
  12. package/esm/context/types.d.ts +1 -0
  13. package/esm/context/types.d.ts.map +1 -1
  14. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  15. package/esm/dsl/model/ModelDriver.js +12 -16
  16. package/esm/dsl/model/toModelConfig.d.ts +3 -3
  17. package/esm/dsl/model/toModelConfig.d.ts.map +1 -1
  18. package/esm/dsl/model/toModelInsertable.d.ts +2 -2
  19. package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
  20. package/esm/dsl/model/toModelInsertable.js +3 -3
  21. package/esm/dsl/model/types.d.ts +2 -2
  22. package/esm/dsl/model/types.d.ts.map +1 -1
  23. package/esm/dsl/operation/toOperationConfig.d.ts +3 -3
  24. package/esm/dsl/operation/toOperationConfig.d.ts.map +1 -1
  25. package/esm/dsl/operation/toOperationConfig.js +3 -3
  26. package/esm/dsl/operation/toOperationInsertable.d.ts +2 -2
  27. package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
  28. package/esm/dsl/operation/toOperationInsertable.js +3 -3
  29. package/esm/dsl/operation/types.d.ts +2 -2
  30. package/esm/dsl/operation/types.d.ts.map +1 -1
  31. package/esm/helpers/refFns.d.ts +3 -0
  32. package/esm/helpers/refFns.d.ts.map +1 -1
  33. package/esm/helpers/refFns.js +12 -4
  34. package/esm/helpers/tracer.d.ts +2 -2
  35. package/esm/helpers/tracer.d.ts.map +1 -1
  36. package/esm/helpers/tracer.js +11 -5
  37. package/esm/mod.d.ts +0 -3
  38. package/esm/mod.d.ts.map +1 -1
  39. package/esm/mod.js +0 -3
  40. package/esm/oas/_helpers/parseDefault.d.ts +16 -0
  41. package/esm/oas/_helpers/parseDefault.d.ts.map +1 -0
  42. package/esm/oas/_helpers/parseDefault.js +16 -0
  43. package/esm/oas/_helpers/parseEnum.d.ts +16 -0
  44. package/esm/oas/_helpers/parseEnum.d.ts.map +1 -0
  45. package/esm/oas/_helpers/parseEnum.js +16 -0
  46. package/esm/oas/_helpers/parseExample.d.ts +16 -0
  47. package/esm/oas/_helpers/parseExample.d.ts.map +1 -0
  48. package/esm/oas/_helpers/parseExample.js +16 -0
  49. package/esm/oas/_helpers/parseFormat.d.ts +15 -0
  50. package/esm/oas/_helpers/parseFormat.d.ts.map +1 -0
  51. package/esm/oas/_helpers/parseFormat.js +16 -0
  52. package/esm/oas/_helpers/parseNullable.d.ts +12 -0
  53. package/esm/oas/_helpers/parseNullable.d.ts.map +1 -0
  54. package/esm/oas/_helpers/parseNullable.js +16 -0
  55. package/esm/oas/_merge-all-of/check-array-item-type-conflicts.d.ts +3 -0
  56. package/esm/oas/_merge-all-of/check-array-item-type-conflicts.d.ts.map +1 -0
  57. package/esm/oas/_merge-all-of/check-array-item-type-conflicts.js +9 -0
  58. package/esm/oas/_merge-all-of/check-at-least-one-type-match.d.ts +5 -0
  59. package/esm/oas/_merge-all-of/check-at-least-one-type-match.d.ts.map +1 -0
  60. package/esm/oas/_merge-all-of/check-at-least-one-type-match.js +5 -0
  61. package/esm/oas/_merge-all-of/check-enum-conflicts.d.ts +3 -0
  62. package/esm/oas/_merge-all-of/check-enum-conflicts.d.ts.map +1 -0
  63. package/esm/oas/_merge-all-of/check-enum-conflicts.js +11 -0
  64. package/esm/oas/_merge-all-of/check-format-conflicts.d.ts +3 -0
  65. package/esm/oas/_merge-all-of/check-format-conflicts.d.ts.map +1 -0
  66. package/esm/oas/_merge-all-of/check-format-conflicts.js +5 -0
  67. package/esm/oas/_merge-all-of/check-number-constraints-conflicts.d.ts +3 -0
  68. package/esm/oas/_merge-all-of/check-number-constraints-conflicts.d.ts.map +1 -0
  69. package/esm/oas/_merge-all-of/check-number-constraints-conflicts.js +11 -0
  70. package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts +3 -0
  71. package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts.map +1 -0
  72. package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.js +5 -0
  73. package/esm/oas/_merge-all-of/check-type-conflicts.d.ts +3 -0
  74. package/esm/oas/_merge-all-of/check-type-conflicts.d.ts.map +1 -0
  75. package/esm/oas/_merge-all-of/check-type-conflicts.js +5 -0
  76. package/esm/oas/_merge-all-of/cross-product.d.ts +3 -0
  77. package/esm/oas/_merge-all-of/cross-product.d.ts.map +1 -0
  78. package/esm/oas/_merge-all-of/cross-product.js +3 -0
  79. package/esm/oas/_merge-all-of/decompose-intersection.d.ts +7 -0
  80. package/esm/oas/_merge-all-of/decompose-intersection.d.ts.map +1 -0
  81. package/esm/oas/_merge-all-of/decompose-intersection.js +27 -0
  82. package/esm/oas/_merge-all-of/decompose-union.d.ts +13 -0
  83. package/esm/oas/_merge-all-of/decompose-union.d.ts.map +1 -0
  84. package/esm/oas/_merge-all-of/decompose-union.js +52 -0
  85. package/esm/oas/_merge-all-of/generic-merge.d.ts +4 -0
  86. package/esm/oas/_merge-all-of/generic-merge.d.ts.map +1 -0
  87. package/esm/oas/_merge-all-of/generic-merge.js +12 -0
  88. package/esm/oas/_merge-all-of/is-equal.d.ts +2 -0
  89. package/esm/oas/_merge-all-of/is-equal.d.ts.map +1 -0
  90. package/esm/oas/_merge-all-of/is-equal.js +19 -0
  91. package/esm/oas/_merge-all-of/merge-array-constraints.d.ts +3 -0
  92. package/esm/oas/_merge-all-of/merge-array-constraints.d.ts.map +1 -0
  93. package/esm/oas/_merge-all-of/merge-array-constraints.js +44 -0
  94. package/esm/oas/_merge-all-of/merge-boolean-constraints.d.ts +4 -0
  95. package/esm/oas/_merge-all-of/merge-boolean-constraints.d.ts.map +1 -0
  96. package/esm/oas/_merge-all-of/merge-boolean-constraints.js +7 -0
  97. package/esm/oas/_merge-all-of/merge-enum-values.d.ts +4 -0
  98. package/esm/oas/_merge-all-of/merge-enum-values.d.ts.map +1 -0
  99. package/esm/oas/_merge-all-of/merge-enum-values.js +32 -0
  100. package/esm/oas/_merge-all-of/merge-integer-constraints.d.ts +4 -0
  101. package/esm/oas/_merge-all-of/merge-integer-constraints.d.ts.map +1 -0
  102. package/esm/oas/_merge-all-of/merge-integer-constraints.js +41 -0
  103. package/esm/oas/_merge-all-of/merge-intersection.d.ts +9 -0
  104. package/esm/oas/_merge-all-of/merge-intersection.d.ts.map +1 -0
  105. package/esm/oas/_merge-all-of/merge-intersection.js +16 -0
  106. package/esm/oas/_merge-all-of/merge-number-constraints.d.ts +4 -0
  107. package/esm/oas/_merge-all-of/merge-number-constraints.d.ts.map +1 -0
  108. package/esm/oas/_merge-all-of/merge-number-constraints.js +41 -0
  109. package/esm/oas/_merge-all-of/merge-object-constraints.d.ts +6 -0
  110. package/esm/oas/_merge-all-of/merge-object-constraints.d.ts.map +1 -0
  111. package/esm/oas/_merge-all-of/merge-object-constraints.js +28 -0
  112. package/esm/oas/_merge-all-of/merge-properties.d.ts +3 -0
  113. package/esm/oas/_merge-all-of/merge-properties.d.ts.map +1 -0
  114. package/esm/oas/_merge-all-of/merge-properties.js +25 -0
  115. package/esm/oas/_merge-all-of/merge-required.d.ts +4 -0
  116. package/esm/oas/_merge-all-of/merge-required.d.ts.map +1 -0
  117. package/esm/oas/_merge-all-of/merge-required.js +10 -0
  118. package/esm/oas/_merge-all-of/merge-string-constraints.d.ts +4 -0
  119. package/esm/oas/_merge-all-of/merge-string-constraints.d.ts.map +1 -0
  120. package/esm/oas/_merge-all-of/merge-string-constraints.js +55 -0
  121. package/esm/oas/_merge-all-of/merge-union.d.ts +16 -0
  122. package/esm/oas/_merge-all-of/merge-union.d.ts.map +1 -0
  123. package/esm/oas/_merge-all-of/merge-union.js +53 -0
  124. package/esm/oas/_merge-all-of/merge.d.ts +3 -0
  125. package/esm/oas/_merge-all-of/merge.d.ts.map +1 -0
  126. package/esm/oas/_merge-all-of/merge.js +148 -0
  127. package/esm/oas/_merge-all-of/types.d.ts +15 -0
  128. package/esm/oas/_merge-all-of/types.d.ts.map +1 -0
  129. package/esm/oas/_merge-all-of/types.js +2 -0
  130. package/esm/oas/array/Array.d.ts +29 -9
  131. package/esm/oas/array/Array.d.ts.map +1 -1
  132. package/esm/oas/array/Array.js +46 -1
  133. package/esm/oas/array/array-types.d.ts +16 -3
  134. package/esm/oas/array/array-types.d.ts.map +1 -1
  135. package/esm/oas/array/array-types.js +11 -14
  136. package/esm/oas/array/toArray.d.ts +9 -0
  137. package/esm/oas/array/toArray.d.ts.map +1 -1
  138. package/esm/oas/array/toArray.js +58 -4
  139. package/esm/oas/boolean/Boolean.d.ts +19 -9
  140. package/esm/oas/boolean/Boolean.d.ts.map +1 -1
  141. package/esm/oas/boolean/Boolean.js +23 -1
  142. package/esm/oas/boolean/boolean-types.d.ts +4 -4
  143. package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
  144. package/esm/oas/boolean/boolean-types.js +7 -7
  145. package/esm/oas/boolean/toBoolean.d.ts +10 -1
  146. package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
  147. package/esm/oas/boolean/toBoolean.js +47 -2
  148. package/esm/oas/components/Components.d.ts +4 -0
  149. package/esm/oas/components/Components.d.ts.map +1 -1
  150. package/esm/oas/components/Components.js +4 -0
  151. package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
  152. package/esm/oas/components/toComponentsV3.js +13 -16
  153. package/esm/oas/contact/toContactV3.d.ts.map +1 -1
  154. package/esm/oas/contact/toContactV3.js +3 -1
  155. package/esm/oas/discriminator/Discriminator.d.ts +2 -0
  156. package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
  157. package/esm/oas/discriminator/Discriminator.js +7 -0
  158. package/esm/oas/discriminator/discriminator-types.d.ts +6 -2
  159. package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
  160. package/esm/oas/discriminator/discriminator-types.js +5 -5
  161. package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
  162. package/esm/oas/discriminator/toDiscriminatorV3.js +6 -6
  163. package/esm/oas/document/Document.d.ts +4 -0
  164. package/esm/oas/document/Document.d.ts.map +1 -1
  165. package/esm/oas/document/Document.js +7 -0
  166. package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  167. package/esm/oas/document/toDocumentFieldsV3.js +6 -2
  168. package/esm/oas/example/example-types.d.ts +7 -2
  169. package/esm/oas/example/example-types.d.ts.map +1 -1
  170. package/esm/oas/example/example-types.js +6 -6
  171. package/esm/oas/example/toExamplesV3.d.ts +1 -2
  172. package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
  173. package/esm/oas/example/toExamplesV3.js +10 -9
  174. package/esm/oas/header/toHeadersV3.d.ts +1 -2
  175. package/esm/oas/header/toHeadersV3.d.ts.map +1 -1
  176. package/esm/oas/header/toHeadersV3.js +8 -3
  177. package/esm/oas/info/toInfoV3.d.ts.map +1 -1
  178. package/esm/oas/info/toInfoV3.js +3 -1
  179. package/esm/oas/integer/Integer.d.ts +41 -11
  180. package/esm/oas/integer/Integer.d.ts.map +1 -1
  181. package/esm/oas/integer/Integer.js +67 -1
  182. package/esm/oas/integer/integer-types.d.ts +24 -3
  183. package/esm/oas/integer/integer-types.d.ts.map +1 -1
  184. package/esm/oas/integer/integer-types.js +18 -19
  185. package/esm/oas/integer/toInteger.d.ts +9 -1
  186. package/esm/oas/integer/toInteger.d.ts.map +1 -1
  187. package/esm/oas/integer/toInteger.js +45 -5
  188. package/esm/oas/license/toLicenseV3.d.ts.map +1 -1
  189. package/esm/oas/license/toLicenseV3.js +3 -1
  190. package/esm/oas/markdown/markdown-types.d.ts +2 -2
  191. package/esm/oas/markdown/markdown-types.d.ts.map +1 -1
  192. package/esm/oas/markdown/markdown-types.js +2 -2
  193. package/esm/oas/mediaType/mediaType-types.d.ts +12 -2
  194. package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
  195. package/esm/oas/mediaType/mediaType-types.js +6 -6
  196. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  197. package/esm/oas/mediaType/toMediaTypeItemV3.js +3 -1
  198. package/esm/oas/number/Number.d.ts +49 -9
  199. package/esm/oas/number/Number.d.ts.map +1 -1
  200. package/esm/oas/number/Number.js +88 -1
  201. package/esm/oas/number/number-types.d.ts +27 -4
  202. package/esm/oas/number/number-types.d.ts.map +1 -1
  203. package/esm/oas/number/number-types.js +16 -13
  204. package/esm/oas/number/toNumber.d.ts +2 -2
  205. package/esm/oas/number/toNumber.d.ts.map +1 -1
  206. package/esm/oas/number/toNumber.js +50 -4
  207. package/esm/oas/object/Object.d.ts +25 -9
  208. package/esm/oas/object/Object.d.ts.map +1 -1
  209. package/esm/oas/object/Object.js +51 -1
  210. package/esm/oas/object/object-types.d.ts +7 -3
  211. package/esm/oas/object/object-types.d.ts.map +1 -1
  212. package/esm/oas/object/object-types.js +14 -18
  213. package/esm/oas/object/toObject.d.ts +1 -1
  214. package/esm/oas/object/toObject.d.ts.map +1 -1
  215. package/esm/oas/object/toObject.js +44 -7
  216. package/esm/oas/operation/Operation.d.ts +4 -1
  217. package/esm/oas/operation/Operation.d.ts.map +1 -1
  218. package/esm/oas/operation/Operation.js +7 -0
  219. package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
  220. package/esm/oas/operation/toOperationsV3.js +29 -11
  221. package/esm/oas/parameter/parameter-types.d.ts +59 -4
  222. package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
  223. package/esm/oas/parameter/parameter-types.js +28 -30
  224. package/esm/oas/parameter/toParameterV3.d.ts +2 -3
  225. package/esm/oas/parameter/toParameterV3.d.ts.map +1 -1
  226. package/esm/oas/parameter/toParameterV3.js +10 -7
  227. package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
  228. package/esm/oas/pathItem/toPathItemV3.js +6 -1
  229. package/esm/oas/ref/Ref.d.ts +2 -1
  230. package/esm/oas/ref/Ref.d.ts.map +1 -1
  231. package/esm/oas/ref/Ref.js +2 -0
  232. package/esm/oas/ref/ref-types.d.ts +15 -9
  233. package/esm/oas/ref/ref-types.d.ts.map +1 -1
  234. package/esm/oas/ref/ref-types.js +45 -39
  235. package/esm/oas/ref/toRefV31.js +1 -1
  236. package/esm/oas/requestBody/toRequestBodiesV3.d.ts +1 -2
  237. package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  238. package/esm/oas/requestBody/toRequestBodiesV3.js +5 -7
  239. package/esm/oas/response/toResponseV3.d.ts +2 -3
  240. package/esm/oas/response/toResponseV3.d.ts.map +1 -1
  241. package/esm/oas/response/toResponseV3.js +22 -7
  242. package/esm/oas/schema/Schema.d.ts +1 -2
  243. package/esm/oas/schema/Schema.d.ts.map +1 -1
  244. package/esm/oas/schema/schema-types.d.ts +3 -5
  245. package/esm/oas/schema/schema-types.d.ts.map +1 -1
  246. package/esm/oas/schema/schema-types.js +3 -7
  247. package/esm/oas/schema/toSchemasV3.d.ts +2 -3
  248. package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
  249. package/esm/oas/schema/toSchemasV3.js +154 -23
  250. package/esm/oas/securityRequirement/SecurityRequirement.d.ts +11 -0
  251. package/esm/oas/securityRequirement/SecurityRequirement.d.ts.map +1 -0
  252. package/esm/oas/securityRequirement/SecurityRequirement.js +22 -0
  253. package/esm/oas/securityRequirement/toSecurityRequirement.d.ts +9 -0
  254. package/esm/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -0
  255. package/esm/oas/securityRequirement/toSecurityRequirement.js +9 -0
  256. package/esm/oas/securitySchemes/SecurityScheme.d.ts +113 -0
  257. package/esm/oas/securitySchemes/SecurityScheme.d.ts.map +1 -0
  258. package/esm/oas/securitySchemes/SecurityScheme.js +204 -0
  259. package/esm/oas/securitySchemes/security-scheme-types.d.ts +181 -0
  260. package/esm/oas/securitySchemes/security-scheme-types.d.ts.map +1 -0
  261. package/esm/oas/securitySchemes/security-scheme-types.js +56 -0
  262. package/esm/oas/securitySchemes/toSecuritySchemes.d.ts +11 -0
  263. package/esm/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -0
  264. package/esm/oas/securitySchemes/toSecuritySchemes.js +62 -0
  265. package/esm/oas/server/toServerV3.d.ts.map +1 -1
  266. package/esm/oas/server/toServerV3.js +3 -1
  267. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
  268. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  269. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
  270. package/esm/oas/string/String.d.ts +21 -11
  271. package/esm/oas/string/String.d.ts.map +1 -1
  272. package/esm/oas/string/String.js +23 -4
  273. package/esm/oas/string/string-types.d.ts +31 -16
  274. package/esm/oas/string/string-types.d.ts.map +1 -1
  275. package/esm/oas/string/string-types.js +30 -49
  276. package/esm/oas/string/toString.d.ts +11 -2
  277. package/esm/oas/string/toString.d.ts.map +1 -1
  278. package/esm/oas/string/toString.js +51 -5
  279. package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
  280. package/esm/oas/tag/toTagsV3.js +3 -1
  281. package/esm/oas/union/Union.d.ts +5 -0
  282. package/esm/oas/union/Union.d.ts.map +1 -1
  283. package/esm/oas/union/Union.js +11 -0
  284. package/esm/oas/union/toUnion.d.ts +2 -1
  285. package/esm/oas/union/toUnion.d.ts.map +1 -1
  286. package/esm/oas/union/toUnion.js +12 -4
  287. package/esm/oas/union/union-types.d.ts +13 -2
  288. package/esm/oas/union/union-types.d.ts.map +1 -1
  289. package/esm/oas/union/union-types.js +8 -8
  290. package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
  291. package/esm/oas/unknown/toUnknown.js +3 -1
  292. package/esm/oas/unknown/unknown-types.d.ts +8 -2
  293. package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
  294. package/esm/oas/unknown/unknown-types.js +7 -7
  295. package/esm/types/EnrichmentRequest.d.ts +2 -2
  296. package/esm/types/EnrichmentRequest.d.ts.map +1 -1
  297. package/esm/types/Manifest.d.ts +58 -276
  298. package/esm/types/Manifest.d.ts.map +1 -1
  299. package/esm/types/Manifest.js +23 -29
  300. package/esm/types/Method.d.ts +3 -5
  301. package/esm/types/Method.d.ts.map +1 -1
  302. package/esm/types/Method.js +12 -6
  303. package/esm/types/Preview.d.ts +46 -158
  304. package/esm/types/Preview.d.ts.map +1 -1
  305. package/esm/types/Preview.js +25 -27
  306. package/esm/types/Results.d.ts +3 -9
  307. package/esm/types/Results.d.ts.map +1 -1
  308. package/esm/types/Results.js +9 -9
  309. package/esm/types/SchemaOptions.d.ts +20 -64
  310. package/esm/types/SchemaOptions.d.ts.map +1 -1
  311. package/esm/types/SchemaOptions.js +31 -31
  312. package/esm/types/Settings.d.ts +97 -437
  313. package/esm/types/Settings.d.ts.map +1 -1
  314. package/esm/types/Settings.js +38 -51
  315. package/esm/types/TypeSystem.d.ts +1 -11
  316. package/esm/types/TypeSystem.d.ts.map +1 -1
  317. package/esm/types/prettierConfig.d.ts +25 -2
  318. package/esm/types/prettierConfig.d.ts.map +1 -1
  319. package/esm/types/prettierConfig.js +24 -30
  320. package/package.json +4 -6
  321. package/script/context/CoreContext.d.ts.map +1 -1
  322. package/script/context/CoreContext.js +1 -0
  323. package/script/context/GenerateContext.d.ts +2 -2
  324. package/script/context/GenerateContext.d.ts.map +1 -1
  325. package/script/context/GenerateContext.js +2 -2
  326. package/script/context/ParseContext.d.ts +43 -4
  327. package/script/context/ParseContext.d.ts.map +1 -1
  328. package/script/context/ParseContext.js +79 -9
  329. package/script/context/StackTrail.d.ts +1 -6
  330. package/script/context/StackTrail.d.ts.map +1 -1
  331. package/script/context/StackTrail.js +1 -23
  332. package/script/context/types.d.ts +1 -0
  333. package/script/context/types.d.ts.map +1 -1
  334. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  335. package/script/dsl/model/ModelDriver.js +12 -16
  336. package/script/dsl/model/toModelConfig.d.ts +3 -3
  337. package/script/dsl/model/toModelConfig.d.ts.map +1 -1
  338. package/script/dsl/model/toModelInsertable.d.ts +2 -2
  339. package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
  340. package/script/dsl/model/toModelInsertable.js +26 -3
  341. package/script/dsl/model/types.d.ts +2 -2
  342. package/script/dsl/model/types.d.ts.map +1 -1
  343. package/script/dsl/operation/toOperationConfig.d.ts +3 -3
  344. package/script/dsl/operation/toOperationConfig.d.ts.map +1 -1
  345. package/script/dsl/operation/toOperationConfig.js +26 -3
  346. package/script/dsl/operation/toOperationInsertable.d.ts +2 -2
  347. package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
  348. package/script/dsl/operation/toOperationInsertable.js +26 -3
  349. package/script/dsl/operation/types.d.ts +2 -2
  350. package/script/dsl/operation/types.d.ts.map +1 -1
  351. package/script/helpers/refFns.d.ts +3 -0
  352. package/script/helpers/refFns.d.ts.map +1 -1
  353. package/script/helpers/refFns.js +14 -5
  354. package/script/helpers/tracer.d.ts +2 -2
  355. package/script/helpers/tracer.d.ts.map +1 -1
  356. package/script/helpers/tracer.js +11 -5
  357. package/script/mod.d.ts +0 -3
  358. package/script/mod.d.ts.map +1 -1
  359. package/script/mod.js +0 -3
  360. package/script/oas/_helpers/parseDefault.d.ts +16 -0
  361. package/script/oas/_helpers/parseDefault.d.ts.map +1 -0
  362. package/script/oas/_helpers/parseDefault.js +43 -0
  363. package/script/oas/_helpers/parseEnum.d.ts +16 -0
  364. package/script/oas/_helpers/parseEnum.d.ts.map +1 -0
  365. package/script/oas/_helpers/parseEnum.js +43 -0
  366. package/script/oas/_helpers/parseExample.d.ts +16 -0
  367. package/script/oas/_helpers/parseExample.d.ts.map +1 -0
  368. package/script/oas/_helpers/parseExample.js +43 -0
  369. package/script/oas/_helpers/parseFormat.d.ts +15 -0
  370. package/script/oas/_helpers/parseFormat.d.ts.map +1 -0
  371. package/script/oas/_helpers/parseFormat.js +43 -0
  372. package/script/oas/_helpers/parseNullable.d.ts +12 -0
  373. package/script/oas/_helpers/parseNullable.d.ts.map +1 -0
  374. package/script/oas/_helpers/parseNullable.js +43 -0
  375. package/script/oas/_merge-all-of/check-array-item-type-conflicts.d.ts +3 -0
  376. package/script/oas/_merge-all-of/check-array-item-type-conflicts.d.ts.map +1 -0
  377. package/script/oas/_merge-all-of/check-array-item-type-conflicts.js +13 -0
  378. package/script/oas/_merge-all-of/check-at-least-one-type-match.d.ts +5 -0
  379. package/script/oas/_merge-all-of/check-at-least-one-type-match.d.ts.map +1 -0
  380. package/script/oas/_merge-all-of/check-at-least-one-type-match.js +9 -0
  381. package/script/oas/_merge-all-of/check-enum-conflicts.d.ts +3 -0
  382. package/script/oas/_merge-all-of/check-enum-conflicts.d.ts.map +1 -0
  383. package/script/oas/_merge-all-of/check-enum-conflicts.js +15 -0
  384. package/script/oas/_merge-all-of/check-format-conflicts.d.ts +3 -0
  385. package/script/oas/_merge-all-of/check-format-conflicts.d.ts.map +1 -0
  386. package/script/oas/_merge-all-of/check-format-conflicts.js +9 -0
  387. package/script/oas/_merge-all-of/check-number-constraints-conflicts.d.ts +3 -0
  388. package/script/oas/_merge-all-of/check-number-constraints-conflicts.d.ts.map +1 -0
  389. package/script/oas/_merge-all-of/check-number-constraints-conflicts.js +15 -0
  390. package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts +3 -0
  391. package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts.map +1 -0
  392. package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.js +9 -0
  393. package/script/oas/_merge-all-of/check-type-conflicts.d.ts +3 -0
  394. package/script/oas/_merge-all-of/check-type-conflicts.d.ts.map +1 -0
  395. package/script/oas/_merge-all-of/check-type-conflicts.js +9 -0
  396. package/script/oas/_merge-all-of/cross-product.d.ts +3 -0
  397. package/script/oas/_merge-all-of/cross-product.d.ts.map +1 -0
  398. package/script/oas/_merge-all-of/cross-product.js +7 -0
  399. package/script/oas/_merge-all-of/decompose-intersection.d.ts +7 -0
  400. package/script/oas/_merge-all-of/decompose-intersection.d.ts.map +1 -0
  401. package/script/oas/_merge-all-of/decompose-intersection.js +31 -0
  402. package/script/oas/_merge-all-of/decompose-union.d.ts +13 -0
  403. package/script/oas/_merge-all-of/decompose-union.d.ts.map +1 -0
  404. package/script/oas/_merge-all-of/decompose-union.js +56 -0
  405. package/script/oas/_merge-all-of/generic-merge.d.ts +4 -0
  406. package/script/oas/_merge-all-of/generic-merge.d.ts.map +1 -0
  407. package/script/oas/_merge-all-of/generic-merge.js +16 -0
  408. package/script/oas/_merge-all-of/is-equal.d.ts +2 -0
  409. package/script/oas/_merge-all-of/is-equal.d.ts.map +1 -0
  410. package/script/oas/_merge-all-of/is-equal.js +23 -0
  411. package/script/oas/_merge-all-of/merge-array-constraints.d.ts +3 -0
  412. package/script/oas/_merge-all-of/merge-array-constraints.d.ts.map +1 -0
  413. package/script/oas/_merge-all-of/merge-array-constraints.js +70 -0
  414. package/script/oas/_merge-all-of/merge-boolean-constraints.d.ts +4 -0
  415. package/script/oas/_merge-all-of/merge-boolean-constraints.d.ts.map +1 -0
  416. package/script/oas/_merge-all-of/merge-boolean-constraints.js +33 -0
  417. package/script/oas/_merge-all-of/merge-enum-values.d.ts +4 -0
  418. package/script/oas/_merge-all-of/merge-enum-values.d.ts.map +1 -0
  419. package/script/oas/_merge-all-of/merge-enum-values.js +58 -0
  420. package/script/oas/_merge-all-of/merge-integer-constraints.d.ts +4 -0
  421. package/script/oas/_merge-all-of/merge-integer-constraints.d.ts.map +1 -0
  422. package/script/oas/_merge-all-of/merge-integer-constraints.js +67 -0
  423. package/script/oas/_merge-all-of/merge-intersection.d.ts +9 -0
  424. package/script/oas/_merge-all-of/merge-intersection.d.ts.map +1 -0
  425. package/script/oas/_merge-all-of/merge-intersection.js +20 -0
  426. package/script/oas/_merge-all-of/merge-number-constraints.d.ts +4 -0
  427. package/script/oas/_merge-all-of/merge-number-constraints.d.ts.map +1 -0
  428. package/script/oas/_merge-all-of/merge-number-constraints.js +67 -0
  429. package/script/oas/_merge-all-of/merge-object-constraints.d.ts +6 -0
  430. package/script/oas/_merge-all-of/merge-object-constraints.d.ts.map +1 -0
  431. package/script/oas/_merge-all-of/merge-object-constraints.js +55 -0
  432. package/script/oas/_merge-all-of/merge-properties.d.ts +3 -0
  433. package/script/oas/_merge-all-of/merge-properties.d.ts.map +1 -0
  434. package/script/oas/_merge-all-of/merge-properties.js +29 -0
  435. package/script/oas/_merge-all-of/merge-required.d.ts +4 -0
  436. package/script/oas/_merge-all-of/merge-required.d.ts.map +1 -0
  437. package/script/oas/_merge-all-of/merge-required.js +15 -0
  438. package/script/oas/_merge-all-of/merge-string-constraints.d.ts +4 -0
  439. package/script/oas/_merge-all-of/merge-string-constraints.d.ts.map +1 -0
  440. package/script/oas/_merge-all-of/merge-string-constraints.js +81 -0
  441. package/script/oas/_merge-all-of/merge-union.d.ts +16 -0
  442. package/script/oas/_merge-all-of/merge-union.d.ts.map +1 -0
  443. package/script/oas/_merge-all-of/merge-union.js +58 -0
  444. package/script/oas/_merge-all-of/merge.d.ts +3 -0
  445. package/script/oas/_merge-all-of/merge.d.ts.map +1 -0
  446. package/script/oas/_merge-all-of/merge.js +152 -0
  447. package/script/oas/_merge-all-of/types.d.ts +15 -0
  448. package/script/oas/_merge-all-of/types.d.ts.map +1 -0
  449. package/script/oas/_merge-all-of/types.js +28 -0
  450. package/script/oas/array/Array.d.ts +29 -9
  451. package/script/oas/array/Array.d.ts.map +1 -1
  452. package/script/oas/array/Array.js +46 -1
  453. package/script/oas/array/array-types.d.ts +16 -3
  454. package/script/oas/array/array-types.d.ts.map +1 -1
  455. package/script/oas/array/array-types.js +34 -14
  456. package/script/oas/array/toArray.d.ts +9 -0
  457. package/script/oas/array/toArray.d.ts.map +1 -1
  458. package/script/oas/array/toArray.js +84 -6
  459. package/script/oas/boolean/Boolean.d.ts +19 -9
  460. package/script/oas/boolean/Boolean.d.ts.map +1 -1
  461. package/script/oas/boolean/Boolean.js +23 -1
  462. package/script/oas/boolean/boolean-types.d.ts +4 -4
  463. package/script/oas/boolean/boolean-types.d.ts.map +1 -1
  464. package/script/oas/boolean/boolean-types.js +30 -7
  465. package/script/oas/boolean/toBoolean.d.ts +10 -1
  466. package/script/oas/boolean/toBoolean.d.ts.map +1 -1
  467. package/script/oas/boolean/toBoolean.js +73 -4
  468. package/script/oas/components/Components.d.ts +4 -0
  469. package/script/oas/components/Components.d.ts.map +1 -1
  470. package/script/oas/components/Components.js +4 -0
  471. package/script/oas/components/toComponentsV3.d.ts.map +1 -1
  472. package/script/oas/components/toComponentsV3.js +13 -16
  473. package/script/oas/contact/toContactV3.d.ts.map +1 -1
  474. package/script/oas/contact/toContactV3.js +3 -1
  475. package/script/oas/discriminator/Discriminator.d.ts +2 -0
  476. package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
  477. package/script/oas/discriminator/Discriminator.js +7 -0
  478. package/script/oas/discriminator/discriminator-types.d.ts +6 -2
  479. package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
  480. package/script/oas/discriminator/discriminator-types.js +28 -5
  481. package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
  482. package/script/oas/discriminator/toDiscriminatorV3.js +6 -6
  483. package/script/oas/document/Document.d.ts +4 -0
  484. package/script/oas/document/Document.d.ts.map +1 -1
  485. package/script/oas/document/Document.js +7 -0
  486. package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  487. package/script/oas/document/toDocumentFieldsV3.js +6 -2
  488. package/script/oas/example/example-types.d.ts +7 -2
  489. package/script/oas/example/example-types.d.ts.map +1 -1
  490. package/script/oas/example/example-types.js +29 -6
  491. package/script/oas/example/toExamplesV3.d.ts +1 -2
  492. package/script/oas/example/toExamplesV3.d.ts.map +1 -1
  493. package/script/oas/example/toExamplesV3.js +10 -9
  494. package/script/oas/header/toHeadersV3.d.ts +1 -2
  495. package/script/oas/header/toHeadersV3.d.ts.map +1 -1
  496. package/script/oas/header/toHeadersV3.js +8 -3
  497. package/script/oas/info/toInfoV3.d.ts.map +1 -1
  498. package/script/oas/info/toInfoV3.js +3 -1
  499. package/script/oas/integer/Integer.d.ts +41 -11
  500. package/script/oas/integer/Integer.d.ts.map +1 -1
  501. package/script/oas/integer/Integer.js +67 -1
  502. package/script/oas/integer/integer-types.d.ts +24 -3
  503. package/script/oas/integer/integer-types.d.ts.map +1 -1
  504. package/script/oas/integer/integer-types.js +42 -20
  505. package/script/oas/integer/toInteger.d.ts +9 -1
  506. package/script/oas/integer/toInteger.d.ts.map +1 -1
  507. package/script/oas/integer/toInteger.js +70 -6
  508. package/script/oas/license/toLicenseV3.d.ts.map +1 -1
  509. package/script/oas/license/toLicenseV3.js +3 -1
  510. package/script/oas/markdown/markdown-types.d.ts +2 -2
  511. package/script/oas/markdown/markdown-types.d.ts.map +1 -1
  512. package/script/oas/markdown/markdown-types.js +25 -2
  513. package/script/oas/mediaType/mediaType-types.d.ts +12 -2
  514. package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
  515. package/script/oas/mediaType/mediaType-types.js +29 -6
  516. package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  517. package/script/oas/mediaType/toMediaTypeItemV3.js +3 -1
  518. package/script/oas/number/Number.d.ts +49 -9
  519. package/script/oas/number/Number.d.ts.map +1 -1
  520. package/script/oas/number/Number.js +88 -1
  521. package/script/oas/number/number-types.d.ts +27 -4
  522. package/script/oas/number/number-types.d.ts.map +1 -1
  523. package/script/oas/number/number-types.js +40 -14
  524. package/script/oas/number/toNumber.d.ts +2 -2
  525. package/script/oas/number/toNumber.d.ts.map +1 -1
  526. package/script/oas/number/toNumber.js +74 -5
  527. package/script/oas/object/Object.d.ts +25 -9
  528. package/script/oas/object/Object.d.ts.map +1 -1
  529. package/script/oas/object/Object.js +51 -1
  530. package/script/oas/object/object-types.d.ts +7 -3
  531. package/script/oas/object/object-types.d.ts.map +1 -1
  532. package/script/oas/object/object-types.js +37 -18
  533. package/script/oas/object/toObject.d.ts +1 -1
  534. package/script/oas/object/toObject.d.ts.map +1 -1
  535. package/script/oas/object/toObject.js +68 -8
  536. package/script/oas/operation/Operation.d.ts +4 -1
  537. package/script/oas/operation/Operation.d.ts.map +1 -1
  538. package/script/oas/operation/Operation.js +7 -0
  539. package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
  540. package/script/oas/operation/toOperationsV3.js +29 -11
  541. package/script/oas/parameter/parameter-types.d.ts +59 -4
  542. package/script/oas/parameter/parameter-types.d.ts.map +1 -1
  543. package/script/oas/parameter/parameter-types.js +51 -30
  544. package/script/oas/parameter/toParameterV3.d.ts +2 -3
  545. package/script/oas/parameter/toParameterV3.d.ts.map +1 -1
  546. package/script/oas/parameter/toParameterV3.js +33 -7
  547. package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
  548. package/script/oas/pathItem/toPathItemV3.js +6 -1
  549. package/script/oas/ref/Ref.d.ts +2 -1
  550. package/script/oas/ref/Ref.d.ts.map +1 -1
  551. package/script/oas/ref/Ref.js +2 -0
  552. package/script/oas/ref/ref-types.d.ts +15 -9
  553. package/script/oas/ref/ref-types.d.ts.map +1 -1
  554. package/script/oas/ref/ref-types.js +74 -45
  555. package/script/oas/ref/toRefV31.js +1 -1
  556. package/script/oas/requestBody/toRequestBodiesV3.d.ts +1 -2
  557. package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  558. package/script/oas/requestBody/toRequestBodiesV3.js +5 -7
  559. package/script/oas/response/toResponseV3.d.ts +2 -3
  560. package/script/oas/response/toResponseV3.d.ts.map +1 -1
  561. package/script/oas/response/toResponseV3.js +22 -7
  562. package/script/oas/schema/Schema.d.ts +1 -2
  563. package/script/oas/schema/Schema.d.ts.map +1 -1
  564. package/script/oas/schema/schema-types.d.ts +3 -5
  565. package/script/oas/schema/schema-types.d.ts.map +1 -1
  566. package/script/oas/schema/schema-types.js +26 -7
  567. package/script/oas/schema/toSchemasV3.d.ts +2 -3
  568. package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
  569. package/script/oas/schema/toSchemasV3.js +154 -23
  570. package/script/oas/securityRequirement/SecurityRequirement.d.ts +11 -0
  571. package/script/oas/securityRequirement/SecurityRequirement.d.ts.map +1 -0
  572. package/script/oas/securityRequirement/SecurityRequirement.js +26 -0
  573. package/script/oas/securityRequirement/toSecurityRequirement.d.ts +9 -0
  574. package/script/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -0
  575. package/script/oas/securityRequirement/toSecurityRequirement.js +13 -0
  576. package/script/oas/securitySchemes/SecurityScheme.d.ts +113 -0
  577. package/script/oas/securitySchemes/SecurityScheme.d.ts.map +1 -0
  578. package/script/oas/securitySchemes/SecurityScheme.js +211 -0
  579. package/script/oas/securitySchemes/security-scheme-types.d.ts +181 -0
  580. package/script/oas/securitySchemes/security-scheme-types.d.ts.map +1 -0
  581. package/script/oas/securitySchemes/security-scheme-types.js +82 -0
  582. package/script/oas/securitySchemes/toSecuritySchemes.d.ts +11 -0
  583. package/script/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -0
  584. package/script/oas/securitySchemes/toSecuritySchemes.js +89 -0
  585. package/script/oas/server/toServerV3.d.ts.map +1 -1
  586. package/script/oas/server/toServerV3.js +3 -1
  587. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
  588. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  589. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
  590. package/script/oas/string/String.d.ts +21 -11
  591. package/script/oas/string/String.d.ts.map +1 -1
  592. package/script/oas/string/String.js +23 -4
  593. package/script/oas/string/string-types.d.ts +31 -16
  594. package/script/oas/string/string-types.d.ts.map +1 -1
  595. package/script/oas/string/string-types.js +53 -49
  596. package/script/oas/string/toString.d.ts +11 -2
  597. package/script/oas/string/toString.d.ts.map +1 -1
  598. package/script/oas/string/toString.js +77 -7
  599. package/script/oas/tag/toTagsV3.d.ts.map +1 -1
  600. package/script/oas/tag/toTagsV3.js +3 -1
  601. package/script/oas/union/Union.d.ts +5 -0
  602. package/script/oas/union/Union.d.ts.map +1 -1
  603. package/script/oas/union/Union.js +11 -0
  604. package/script/oas/union/toUnion.d.ts +2 -1
  605. package/script/oas/union/toUnion.d.ts.map +1 -1
  606. package/script/oas/union/toUnion.js +12 -4
  607. package/script/oas/union/union-types.d.ts +13 -2
  608. package/script/oas/union/union-types.d.ts.map +1 -1
  609. package/script/oas/union/union-types.js +31 -8
  610. package/script/oas/unknown/toUnknown.d.ts.map +1 -1
  611. package/script/oas/unknown/toUnknown.js +3 -1
  612. package/script/oas/unknown/unknown-types.d.ts +8 -2
  613. package/script/oas/unknown/unknown-types.d.ts.map +1 -1
  614. package/script/oas/unknown/unknown-types.js +30 -7
  615. package/script/types/EnrichmentRequest.d.ts +2 -2
  616. package/script/types/EnrichmentRequest.d.ts.map +1 -1
  617. package/script/types/Manifest.d.ts +58 -276
  618. package/script/types/Manifest.d.ts.map +1 -1
  619. package/script/types/Manifest.js +45 -28
  620. package/script/types/Method.d.ts +3 -5
  621. package/script/types/Method.d.ts.map +1 -1
  622. package/script/types/Method.js +35 -6
  623. package/script/types/Preview.d.ts +46 -158
  624. package/script/types/Preview.d.ts.map +1 -1
  625. package/script/types/Preview.js +48 -27
  626. package/script/types/Results.d.ts +3 -9
  627. package/script/types/Results.d.ts.map +1 -1
  628. package/script/types/Results.js +33 -10
  629. package/script/types/SchemaOptions.d.ts +20 -64
  630. package/script/types/SchemaOptions.d.ts.map +1 -1
  631. package/script/types/SchemaOptions.js +54 -31
  632. package/script/types/Settings.d.ts +97 -437
  633. package/script/types/Settings.d.ts.map +1 -1
  634. package/script/types/Settings.js +61 -51
  635. package/script/types/TypeSystem.d.ts +1 -11
  636. package/script/types/TypeSystem.d.ts.map +1 -1
  637. package/script/types/prettierConfig.d.ts +25 -2
  638. package/script/types/prettierConfig.d.ts.map +1 -1
  639. package/script/types/prettierConfig.js +47 -30
  640. package/esm/oas/intersection/Intersection.d.ts +0 -30
  641. package/esm/oas/intersection/Intersection.d.ts.map +0 -1
  642. package/esm/oas/intersection/Intersection.js +0 -83
  643. package/esm/oas/intersection/intersection-types.d.ts +0 -14
  644. package/esm/oas/intersection/intersection-types.d.ts.map +0 -1
  645. package/esm/oas/intersection/intersection-types.js +0 -12
  646. package/esm/oas/intersection/toIntersection.d.ts +0 -11
  647. package/esm/oas/intersection/toIntersection.d.ts.map +0 -1
  648. package/esm/oas/intersection/toIntersection.js +0 -16
  649. package/esm/oas/null/null-types.d.ts +0 -10
  650. package/esm/oas/null/null-types.d.ts.map +0 -1
  651. package/esm/oas/null/null-types.js +0 -8
  652. package/script/oas/intersection/Intersection.d.ts +0 -30
  653. package/script/oas/intersection/Intersection.d.ts.map +0 -1
  654. package/script/oas/intersection/Intersection.js +0 -87
  655. package/script/oas/intersection/intersection-types.d.ts +0 -14
  656. package/script/oas/intersection/intersection-types.d.ts.map +0 -1
  657. package/script/oas/intersection/intersection-types.js +0 -15
  658. package/script/oas/intersection/toIntersection.d.ts +0 -11
  659. package/script/oas/intersection/toIntersection.d.ts.map +0 -1
  660. package/script/oas/intersection/toIntersection.js +0 -20
  661. package/script/oas/null/null-types.d.ts +0 -10
  662. package/script/oas/null/null-types.d.ts.map +0 -1
  663. package/script/oas/null/null-types.js +0 -11
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeCrossProduct = exports.mergeUnion = void 0;
4
+ const decompose_union_js_1 = require("./decompose-union.js");
5
+ const merge_js_1 = require("./merge.js");
6
+ const cross_product_js_1 = require("./cross-product.js");
7
+ const refFns_js_1 = require("../../helpers/refFns.js");
8
+ const mergeUnion = ({ schema, getRef, groupType }) => {
9
+ const { beforeExcluded, decomposed, afterExcluded } = (0, decompose_union_js_1.decomposeUnion)({ schema, groupType });
10
+ // if (decomposed.length === 1) {
11
+ // console.log('DECOMPOSED', JSON.stringify(decomposed[0], null, 2))
12
+ // const result = {
13
+ // ...beforeExcluded,
14
+ // ...decomposed[0],
15
+ // ...afterExcluded
16
+ // }
17
+ // console.log('MERGED UNION - SHORT', JSON.stringify(result, null, 2))
18
+ // return result
19
+ // }
20
+ const dereffed = decomposed.map(decomposed => {
21
+ return '$ref' in decomposed ? getRef(decomposed) : decomposed;
22
+ });
23
+ const result = dereffed.reduce((acc, decomposed) => {
24
+ const merged = (0, exports.mergeCrossProduct)({ first: acc, second: decomposed, getRef, groupType });
25
+ return merged;
26
+ }, {});
27
+ const output = {
28
+ ...beforeExcluded,
29
+ ...result,
30
+ ...afterExcluded
31
+ };
32
+ return output;
33
+ };
34
+ exports.mergeUnion = mergeUnion;
35
+ const mergeCrossProduct = ({ first, second, getRef, groupType }) => {
36
+ const firstGroup = Array.isArray(first[groupType]) ? first[groupType] : [first];
37
+ const secondGroup = Array.isArray(second[groupType]) ? second[groupType] : [second];
38
+ const mergedGroup = (0, cross_product_js_1.crossProduct)(firstGroup, secondGroup)
39
+ .map(([firstItem, secondItem]) => {
40
+ try {
41
+ const result = (0, merge_js_1.mergeSchemasOrRefs)(firstItem, secondItem, getRef);
42
+ return result;
43
+ }
44
+ catch (_error) {
45
+ return undefined;
46
+ }
47
+ })
48
+ .filter(item => item !== undefined);
49
+ return {
50
+ [groupType]: mergedGroup.flatMap(item => {
51
+ if (!(0, refFns_js_1.isRef)(item) && Array.isArray(item[groupType])) {
52
+ return item[groupType];
53
+ }
54
+ return [item];
55
+ })
56
+ };
57
+ };
58
+ exports.mergeCrossProduct = mergeCrossProduct;
@@ -0,0 +1,3 @@
1
+ import type { SchemaOrReference, GetRefFn } from './types.js';
2
+ export declare const mergeSchemasOrRefs: (first: SchemaOrReference, second: SchemaOrReference, getRef: GetRefFn) => SchemaOrReference;
3
+ //# sourceMappingURL=merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/merge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAiC,QAAQ,EAAE,MAAM,YAAY,CAAA;AAiB5F,eAAO,MAAM,kBAAkB,UACtB,iBAAiB,UAChB,iBAAiB,UACjB,QAAQ,KACf,iBAgCF,CAAA"}
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeSchemasOrRefs = void 0;
4
+ const refFns_js_1 = require("../../helpers/refFns.js");
5
+ const lodash_es_1 = require("lodash-es");
6
+ const check_type_conflicts_js_1 = require("./check-type-conflicts.js");
7
+ const check_read_only_write_only_conflicts_js_1 = require("./check-read-only-write-only-conflicts.js");
8
+ const check_format_conflicts_js_1 = require("./check-format-conflicts.js");
9
+ const check_enum_conflicts_js_1 = require("./check-enum-conflicts.js");
10
+ const check_number_constraints_conflicts_js_1 = require("./check-number-constraints-conflicts.js");
11
+ const check_array_item_type_conflicts_js_1 = require("./check-array-item-type-conflicts.js");
12
+ const merge_object_constraints_js_1 = require("./merge-object-constraints.js");
13
+ const merge_array_constraints_js_1 = require("./merge-array-constraints.js");
14
+ const merge_string_constraints_js_1 = require("./merge-string-constraints.js");
15
+ const merge_number_constraints_js_1 = require("./merge-number-constraints.js");
16
+ const merge_integer_constraints_js_1 = require("./merge-integer-constraints.js");
17
+ const merge_boolean_constraints_js_1 = require("./merge-boolean-constraints.js");
18
+ const generic_merge_js_1 = require("./generic-merge.js");
19
+ const check_at_least_one_type_match_js_1 = require("./check-at-least-one-type-match.js");
20
+ const merge_intersection_js_1 = require("./merge-intersection.js");
21
+ const merge_union_js_1 = require("./merge-union.js");
22
+ const mergeSchemasOrRefs = (first, second, getRef) => {
23
+ if (containsRef(first, second)) {
24
+ return mergeWithRef(first, second, getRef);
25
+ }
26
+ if ((0, refFns_js_1.isRef)(first)) {
27
+ throw new Error('Ref in first');
28
+ }
29
+ if ((0, refFns_js_1.isRef)(second)) {
30
+ throw new Error('Ref in second');
31
+ }
32
+ if (containsAllOf(first) || containsAllOf(second)) {
33
+ const mergedFirst = containsAllOf(first) ? (0, merge_intersection_js_1.mergeIntersection)({ schema: first, getRef }) : first;
34
+ const mergedSecond = containsAllOf(second)
35
+ ? (0, merge_intersection_js_1.mergeIntersection)({ schema: second, getRef })
36
+ : second;
37
+ return (0, exports.mergeSchemasOrRefs)(mergedFirst, mergedSecond, getRef);
38
+ }
39
+ if (containsOneOf(first, second)) {
40
+ return (0, merge_union_js_1.mergeCrossProduct)({ first, second, getRef, groupType: 'oneOf' });
41
+ }
42
+ if (containsAnyOf(first, second)) {
43
+ return (0, merge_union_js_1.mergeCrossProduct)({ first, second, getRef, groupType: 'anyOf' });
44
+ }
45
+ return mergeSchemas(first, second, getRef);
46
+ };
47
+ exports.mergeSchemasOrRefs = mergeSchemasOrRefs;
48
+ const containsAllOf = (schema) => {
49
+ if (schema.allOf) {
50
+ if (schema.allOf?.length) {
51
+ return true;
52
+ }
53
+ throw new Error('Empty allOf');
54
+ }
55
+ return false;
56
+ };
57
+ const containsAnyOf = (first, second) => {
58
+ if (first.anyOf) {
59
+ if (first.anyOf?.length) {
60
+ return true;
61
+ }
62
+ throw new Error('Empty anyOf');
63
+ }
64
+ if (second.anyOf) {
65
+ if (second.anyOf?.length) {
66
+ return true;
67
+ }
68
+ throw new Error('Empty anyOf');
69
+ }
70
+ return false;
71
+ };
72
+ const containsOneOf = (first, second) => {
73
+ if (first.oneOf) {
74
+ if (first.oneOf?.length) {
75
+ return true;
76
+ }
77
+ throw new Error('Empty oneOf');
78
+ }
79
+ if (second.oneOf) {
80
+ if (second.oneOf?.length) {
81
+ return true;
82
+ }
83
+ throw new Error('Empty oneOf');
84
+ }
85
+ return false;
86
+ };
87
+ const containsRef = (first, second) => {
88
+ return (0, refFns_js_1.isRef)(first) || (0, refFns_js_1.isRef)(second);
89
+ };
90
+ const mergeSchemas = (first, second, getRef) => {
91
+ try {
92
+ (0, check_type_conflicts_js_1.checkTypeConflicts)(first, second);
93
+ }
94
+ catch (e) {
95
+ throw e;
96
+ }
97
+ (0, check_read_only_write_only_conflicts_js_1.checkReadOnlyWriteOnlyConflicts)(first, second);
98
+ (0, check_format_conflicts_js_1.checkFormatConflicts)(first, second);
99
+ (0, check_enum_conflicts_js_1.checkEnumConflicts)(first, second);
100
+ (0, check_number_constraints_conflicts_js_1.checkNumberConstraintsConflicts)(first, second);
101
+ (0, check_array_item_type_conflicts_js_1.checkArrayItemTypeConflicts)(first, second);
102
+ if (first.not || second.not) {
103
+ throw new Error('Merging schemas with "not" keyword is not supported');
104
+ }
105
+ return typedMerge(first, second, getRef);
106
+ };
107
+ const typedMerge = (first, second, getRef) => {
108
+ if (!first.type && !second.type) {
109
+ return (0, generic_merge_js_1.genericMerge)(first, second, getRef);
110
+ }
111
+ if ((0, check_at_least_one_type_match_js_1.checkAtLeastOneTypeMatch)(first, second, 'object')) {
112
+ return (0, merge_object_constraints_js_1.mergeObjectConstraints)(first, second, getRef);
113
+ }
114
+ if ((0, check_at_least_one_type_match_js_1.checkAtLeastOneTypeMatch)(first, second, 'array')) {
115
+ return (0, merge_array_constraints_js_1.mergeArrayConstraints)(first, second, getRef);
116
+ }
117
+ if ((0, check_at_least_one_type_match_js_1.checkAtLeastOneTypeMatch)(first, second, 'string')) {
118
+ return (0, merge_string_constraints_js_1.mergeStringConstraints)(first, second, getRef);
119
+ }
120
+ if ((0, check_at_least_one_type_match_js_1.checkAtLeastOneTypeMatch)(first, second, 'number')) {
121
+ return (0, merge_number_constraints_js_1.mergeNumberConstraints)(first, second, getRef);
122
+ }
123
+ if ((0, check_at_least_one_type_match_js_1.checkAtLeastOneTypeMatch)(first, second, 'integer')) {
124
+ return (0, merge_integer_constraints_js_1.mergeIntegerConstraints)(first, second, getRef);
125
+ }
126
+ if ((0, check_at_least_one_type_match_js_1.checkAtLeastOneTypeMatch)(first, second, 'boolean')) {
127
+ return (0, merge_boolean_constraints_js_1.mergeBooleanConstraints)(first, second, getRef);
128
+ }
129
+ throw new Error(`Cannot merge schemas with type "${first.type}" with type "${second.type}"`);
130
+ };
131
+ const mergeWithRef = (first, second, getRef) => {
132
+ if ((0, refFns_js_1.isRef)(first) && (0, refFns_js_1.isRef)(second)) {
133
+ if (first.$ref === second.$ref) {
134
+ return {
135
+ ...first,
136
+ ...second
137
+ };
138
+ }
139
+ else {
140
+ return mergeSchemas(getRef(first), getRef(second), getRef);
141
+ }
142
+ }
143
+ if ((0, refFns_js_1.isRef)(first) && !(0, refFns_js_1.isRef)(second)) {
144
+ const merged = (0, lodash_es_1.isEmpty)(second) ? first : mergeSchemas(getRef(first), second, getRef);
145
+ return merged;
146
+ }
147
+ if (!(0, refFns_js_1.isRef)(first) && (0, refFns_js_1.isRef)(second)) {
148
+ const merged = (0, lodash_es_1.isEmpty)(first) ? second : mergeSchemas(first, getRef(second), getRef);
149
+ return merged;
150
+ }
151
+ throw new Error('Invalid input');
152
+ };
@@ -0,0 +1,15 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ import * as v from 'valibot';
3
+ export type GetRefFn = (ref: OpenAPIV3.ReferenceObject) => OpenAPIV3.SchemaObject;
4
+ export type OneOfObject = {
5
+ oneOf?: (OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject)[];
6
+ } & OpenAPIV3.SchemaObject;
7
+ export type AnyOfObject = {
8
+ anyOf?: (OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject)[];
9
+ } & OpenAPIV3.SchemaObject;
10
+ export type SchemaObject = OpenAPIV3.SchemaObject;
11
+ export type ReferenceObject = OpenAPIV3.ReferenceObject;
12
+ export type SchemaOrReference = SchemaObject | ReferenceObject;
13
+ export type ArraySchemaObject = OpenAPIV3.ArraySchemaObject;
14
+ export declare const IntegerSchema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, "The number must be an integer.">]>;
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,eAAe,KAAK,SAAS,CAAC,YAAY,CAAA;AAEjF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;CAC/D,GAAG,SAAS,CAAC,YAAY,CAAA;AAE1B,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;CAC/D,GAAG,SAAS,CAAC,YAAY,CAAA;AAE1B,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,CAAA;AACjD,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAA;AACvD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,eAAe,CAAA;AAE9D,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAA;AAE3D,eAAO,MAAM,aAAa,mHAAkE,CAAA"}
@@ -0,0 +1,28 @@
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.IntegerSchema = void 0;
27
+ const v = __importStar(require("valibot"));
28
+ exports.IntegerSchema = v.pipe(v.number(), v.integer('The number must be an integer.'));
@@ -2,19 +2,23 @@ import "../../_dnt.polyfills.js";
2
2
  import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js';
3
3
  import type { OasRef } from '../ref/Ref.js';
4
4
  import type { OpenAPIV3 } from 'openapi-types';
5
- export type ArrayFields = {
5
+ export type ArrayFields<Nullable extends boolean | undefined> = {
6
6
  items: OasSchema | OasRef<'schema'>;
7
7
  title?: string;
8
8
  description?: string;
9
- nullable?: boolean;
9
+ nullable: Nullable;
10
10
  uniqueItems?: boolean;
11
11
  extensionFields?: Record<string, unknown>;
12
- example?: Array<any>;
12
+ example?: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
13
+ maxItems?: number;
14
+ minItems?: number;
15
+ enums?: Nullable extends true ? (unknown | null)[] | undefined : unknown[] | undefined;
16
+ defaultValue?: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
13
17
  };
14
18
  /**
15
19
  * Object representing an array in the OpenAPI Specification.
16
20
  */
17
- export declare class OasArray {
21
+ export declare class OasArray<Nullable extends boolean | undefined = boolean | undefined> {
18
22
  /**
19
23
  * Object is part the 'schema' set which is used
20
24
  * to define data types in an OpenAPI document.
@@ -39,7 +43,7 @@ export declare class OasArray {
39
43
  /**
40
44
  * Indicates whether value can be null.
41
45
  */
42
- nullable: boolean | undefined;
46
+ nullable: Nullable;
43
47
  /**
44
48
  * Indicates whether the array items must be unique.
45
49
  */
@@ -49,11 +53,27 @@ export declare class OasArray {
49
53
  /**
50
54
  * An example of the array.
51
55
  */
52
- example: Array<unknown> | undefined;
53
- constructor(fields: ArrayFields);
56
+ example: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
57
+ /**
58
+ * The maximum number of items in the array.
59
+ */
60
+ maxItems: number | undefined;
61
+ /**
62
+ * The minimum number of items in the array.
63
+ */
64
+ minItems: number | undefined;
65
+ /**
66
+ * The enum values for the array.
67
+ */
68
+ enums: Nullable extends true ? (unknown | null)[] | undefined : unknown[] | undefined;
69
+ /**
70
+ * The default value for the array.
71
+ */
72
+ defaultValue: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
73
+ constructor(fields: ArrayFields<Nullable>);
54
74
  isRef(): this is OasRef<'schema'>;
55
- resolve(): OasArray;
56
- resolveOnce(): OasArray;
75
+ resolve(): OasArray<Nullable>;
76
+ resolveOnce(): OasArray<Nullable>;
57
77
  toJsonSchema(options: ToJsonSchemaOptions): OpenAPIV3.ArraySchemaObject;
58
78
  }
59
79
  //# sourceMappingURL=Array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEzC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,qBAAa,QAAQ;IACnB;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,UAAmB;IACvB;;OAEG;IACH,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B;;OAEG;IACH,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;IAEhC,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IAEpD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;gBAEvB,MAAM,EAAE,WAAW;IAU/B,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,QAAQ;IAInB,WAAW,IAAI,QAAQ;IAIvB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,iBAAiB;CAUxE"}
1
+ {"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,WAAW,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAC9D,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,QAAQ,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACtF,YAAY,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;CAC5F,CAAA;AAED;;GAEG;AACH,qBAAa,QAAQ,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;IAC9E;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,UAAmB;IACvB;;OAEG;IACH,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAA;IAClB;;OAEG;IACH,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;IAEhC,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IAEpD;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACrF;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAE5B;;OAEG;IACH,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IAErF;;OAEG;IACH,YAAY,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;gBAE9E,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC;IAczC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAI7B,WAAW,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAIjC,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,iBAAiB;CAexE"}
@@ -87,6 +87,42 @@ class OasArray {
87
87
  writable: true,
88
88
  value: void 0
89
89
  });
90
+ /**
91
+ * The maximum number of items in the array.
92
+ */
93
+ Object.defineProperty(this, "maxItems", {
94
+ enumerable: true,
95
+ configurable: true,
96
+ writable: true,
97
+ value: void 0
98
+ });
99
+ /**
100
+ * The minimum number of items in the array.
101
+ */
102
+ Object.defineProperty(this, "minItems", {
103
+ enumerable: true,
104
+ configurable: true,
105
+ writable: true,
106
+ value: void 0
107
+ });
108
+ /**
109
+ * The enum values for the array.
110
+ */
111
+ Object.defineProperty(this, "enums", {
112
+ enumerable: true,
113
+ configurable: true,
114
+ writable: true,
115
+ value: void 0
116
+ });
117
+ /**
118
+ * The default value for the array.
119
+ */
120
+ Object.defineProperty(this, "defaultValue", {
121
+ enumerable: true,
122
+ configurable: true,
123
+ writable: true,
124
+ value: void 0
125
+ });
90
126
  this.items = fields.items;
91
127
  this.title = fields.title;
92
128
  this.description = fields.description;
@@ -94,6 +130,10 @@ class OasArray {
94
130
  this.uniqueItems = fields.uniqueItems;
95
131
  this.extensionFields = fields.extensionFields;
96
132
  this.example = fields.example;
133
+ this.maxItems = fields.maxItems;
134
+ this.minItems = fields.minItems;
135
+ this.enums = fields.enums;
136
+ this.defaultValue = fields.defaultValue;
97
137
  }
98
138
  isRef() {
99
139
  return false;
@@ -109,9 +149,14 @@ class OasArray {
109
149
  type: 'array',
110
150
  items: this.items.toJsonSchema(options),
111
151
  title: this.title,
152
+ enum: this.enums,
112
153
  description: this.description,
113
154
  nullable: this.nullable,
114
- example: this.example
155
+ example: this.example,
156
+ maxItems: this.maxItems,
157
+ minItems: this.minItems,
158
+ uniqueItems: this.uniqueItems,
159
+ default: this.defaultValue
115
160
  };
116
161
  }
117
162
  }
@@ -1,13 +1,26 @@
1
- import { z } from '@hono/zod-openapi';
1
+ import * as v from 'valibot';
2
2
  import { type OasSchemaData } from '../schema/schema-types.js';
3
3
  import { type OasSchemaRefData } from '../ref/ref-types.js';
4
- export declare const oasArrayData: z.ZodType<OasArrayData>;
4
+ export declare const oasArrayData: v.ObjectSchema<{
5
+ readonly type: v.LiteralSchema<"array", undefined>;
6
+ readonly items: v.LazySchema<v.UnionSchema<[v.LazySchema<v.GenericSchema<OasSchemaData>>, v.GenericSchema<OasSchemaRefData>], undefined>>;
7
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
8
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
9
+ readonly default: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
10
+ readonly maxItems: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
11
+ readonly minItems: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
12
+ readonly uniqueItems: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
13
+ readonly enums: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
14
+ }, undefined>;
5
15
  export type OasArrayData = {
6
- oasType: 'schema';
7
16
  type: 'array';
8
17
  items: OasSchemaData | OasSchemaRefData;
9
18
  title?: string;
10
19
  description?: string;
11
20
  default?: unknown[];
21
+ maxItems?: number;
22
+ minItems?: number;
23
+ uniqueItems?: boolean;
24
+ enums?: unknown[];
12
25
  };
13
26
  //# sourceMappingURL=array-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"array-types.d.ts","sourceRoot":"","sources":["../../../src/oas/array/array-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AACrC,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,qBAAqB,CAAA;AAE7E,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAc/C,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,QAAQ,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,aAAa,GAAG,gBAAgB,CAAA;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;CACpB,CAAA"}
1
+ {"version":3,"file":"array-types.d.ts","sourceRoot":"","sources":["../../../src/oas/array/array-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,qBAAqB,CAAA;AAE7E,eAAO,MAAM,YAAY;;;;;;;;;;aAUvB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,aAAa,GAAG,gBAAgB,CAAA;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;CAClB,CAAA"}
@@ -1,20 +1,40 @@
1
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
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.oasArrayData = void 0;
4
- const zod_openapi_1 = require("@hono/zod-openapi");
27
+ const v = __importStar(require("valibot"));
5
28
  const schema_types_js_1 = require("../schema/schema-types.js");
6
29
  const ref_types_js_1 = require("../ref/ref-types.js");
7
- exports.oasArrayData = zod_openapi_1.z.object({
8
- oasType: zod_openapi_1.z.literal('schema'),
9
- // Add soon
10
- type: zod_openapi_1.z.literal('array'),
11
- // additionalItems: z.lazy(() => z.union([z.boolean(), jsonSchema4]).optional()),
12
- items: zod_openapi_1.z.lazy(() => zod_openapi_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData])),
13
- title: zod_openapi_1.z.string().optional(),
14
- description: zod_openapi_1.z.string().optional(),
15
- default: zod_openapi_1.z.array(zod_openapi_1.z.unknown()).optional()
16
- // Add soon
17
- // maxItems: z.number().optional(),
18
- // minItems: z.number().optional(),
19
- // uniqueItems: z.boolean().optional()
30
+ exports.oasArrayData = v.object({
31
+ type: v.literal('array'),
32
+ items: v.lazy(() => v.union([v.lazy(() => schema_types_js_1.oasSchemaData), ref_types_js_1.oasSchemaRefData])),
33
+ title: v.optional(v.string()),
34
+ description: v.optional(v.string()),
35
+ default: v.optional(v.array(v.unknown())),
36
+ maxItems: v.optional(v.number()),
37
+ minItems: v.optional(v.number()),
38
+ uniqueItems: v.optional(v.boolean()),
39
+ enums: v.optional(v.array(v.unknown()))
20
40
  });
@@ -6,5 +6,14 @@ type ToArrayArgs = {
6
6
  context: ParseContext;
7
7
  };
8
8
  export declare const toArray: ({ value, context }: ToArrayArgs) => OasArray;
9
+ type ToParsedArrayArgs<Nullable extends boolean | undefined> = {
10
+ value: Omit<OpenAPIV3.ArraySchemaObject, 'nullable' | 'example' | 'enums' | 'default'>;
11
+ context: ParseContext;
12
+ nullable: Nullable;
13
+ example: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
14
+ enums: Nullable extends true ? (unknown[] | null)[] | undefined : unknown[] | undefined;
15
+ defaultValue: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
16
+ };
17
+ export declare const toParsedArray: <Nullable extends boolean | undefined>({ context, nullable, example, enums, defaultValue, value }: ToParsedArrayArgs<Nullable>) => OasArray<Nullable>;
9
18
  export {};
10
19
  //# sourceMappingURL=toArray.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../src/oas/array/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,uBAAwB,WAAW,KAAG,QAuBzD,CAAA"}
1
+ {"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../src/oas/array/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAQjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,uBAAwB,WAAW,KAAG,QAmCzD,CAAA;AAED,KAAK,iBAAiB,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAC7D,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IACtF,OAAO,EAAE,YAAY,CAAA;IACrB,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACrF,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACvF,YAAY,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;CAC3F,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,QAAQ,SAAS,OAAO,GAAG,SAAS,8DAO/D,iBAAiB,CAAC,QAAQ,CAAC,KAAG,QAAQ,CAAC,QAAQ,CAyCjD,CAAA"}
@@ -1,20 +1,98 @@
1
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
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toArray = void 0;
26
+ exports.toParsedArray = exports.toArray = void 0;
4
27
  const Array_js_1 = require("./Array.js");
5
28
  const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
6
29
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
30
+ const parseNullable_js_1 = require("../_helpers/parseNullable.js");
31
+ const parseExample_js_1 = require("../_helpers/parseExample.js");
32
+ const parseEnum_js_1 = require("../_helpers/parseEnum.js");
33
+ const v = __importStar(require("valibot"));
34
+ const array_types_js_1 = require("./array-types.js");
35
+ const parseDefault_js_1 = require("../_helpers/parseDefault.js");
7
36
  const toArray = ({ value, context }) => {
8
- const { type: _type, items, title, description, nullable, uniqueItems, example, ...skipped } = value;
9
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
37
+ const { nullable, value: valueWithoutNullable } = (0, parseNullable_js_1.parseNullable)({
38
+ value,
39
+ context
40
+ });
41
+ const { example, value: valueWithoutExample } = (0, parseExample_js_1.parseExample)({
42
+ value: valueWithoutNullable,
43
+ nullable,
44
+ valibotSchema: v.array(v.any()),
45
+ context
46
+ });
47
+ const { enum: enums, value: valueWithoutEnums } = (0, parseEnum_js_1.parseEnum)({
48
+ value: valueWithoutExample,
49
+ nullable,
50
+ valibotSchema: v.array(v.any()),
51
+ context
52
+ });
53
+ const { default: defaultValue, value: valueWithoutDefault } = (0, parseDefault_js_1.parseDefault)({
54
+ value: valueWithoutEnums,
55
+ nullable,
56
+ valibotSchema: v.array(v.any()),
57
+ context
58
+ });
59
+ return (0, exports.toParsedArray)({
60
+ context,
61
+ nullable,
62
+ example,
63
+ enums,
64
+ defaultValue,
65
+ value: valueWithoutDefault
66
+ });
67
+ };
68
+ exports.toArray = toArray;
69
+ const toParsedArray = ({ context, nullable, example, enums, defaultValue, value }) => {
70
+ // We only want parse non-items fields here since items is handled below
71
+ const { items, ...rest } = value;
72
+ const oasArrayDataSchemaWithItems = v.omit(array_types_js_1.oasArrayData, ['items']);
73
+ const { type: _type, title, description, uniqueItems, maxItems, minItems, ...skipped } = v.parse(oasArrayDataSchemaWithItems, rest);
74
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
75
+ skipped,
76
+ parent: value,
77
+ context,
78
+ parentType: 'schema:array'
79
+ });
80
+ // if (!items) {
81
+ // console.log(JSON.stringify(value, null, 2))
82
+ // throw new Error('No items')
83
+ // }
10
84
  return new Array_js_1.OasArray({
11
85
  title,
12
86
  description,
13
87
  nullable,
14
- uniqueItems,
88
+ defaultValue,
15
89
  items: context.trace('items', () => (0, toSchemasV3_js_1.toSchemaV3)({ schema: items, context })),
16
90
  extensionFields,
17
- example
91
+ example,
92
+ uniqueItems,
93
+ maxItems,
94
+ minItems,
95
+ enums
18
96
  });
19
97
  };
20
- exports.toArray = toArray;
98
+ exports.toParsedArray = toParsedArray;