@skmtc/core 0.0.599 → 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 (625) hide show
  1. package/esm/context/ParseContext.d.ts +41 -2
  2. package/esm/context/ParseContext.d.ts.map +1 -1
  3. package/esm/context/ParseContext.js +54 -7
  4. package/esm/context/types.d.ts +1 -0
  5. package/esm/context/types.d.ts.map +1 -1
  6. package/esm/dsl/model/toModelConfig.d.ts +3 -3
  7. package/esm/dsl/model/toModelConfig.d.ts.map +1 -1
  8. package/esm/dsl/model/toModelInsertable.d.ts +2 -2
  9. package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
  10. package/esm/dsl/model/toModelInsertable.js +3 -3
  11. package/esm/dsl/model/types.d.ts +2 -2
  12. package/esm/dsl/model/types.d.ts.map +1 -1
  13. package/esm/dsl/operation/toOperationConfig.d.ts +3 -3
  14. package/esm/dsl/operation/toOperationConfig.d.ts.map +1 -1
  15. package/esm/dsl/operation/toOperationConfig.js +3 -3
  16. package/esm/dsl/operation/toOperationInsertable.d.ts +2 -2
  17. package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
  18. package/esm/dsl/operation/toOperationInsertable.js +3 -3
  19. package/esm/dsl/operation/types.d.ts +2 -2
  20. package/esm/dsl/operation/types.d.ts.map +1 -1
  21. package/esm/helpers/refFns.d.ts +3 -0
  22. package/esm/helpers/refFns.d.ts.map +1 -1
  23. package/esm/helpers/refFns.js +12 -4
  24. package/esm/helpers/tracer.d.ts.map +1 -1
  25. package/esm/helpers/tracer.js +9 -3
  26. package/esm/mod.d.ts +0 -3
  27. package/esm/mod.d.ts.map +1 -1
  28. package/esm/mod.js +0 -3
  29. package/esm/oas/_helpers/parseDefault.d.ts +16 -0
  30. package/esm/oas/_helpers/parseDefault.d.ts.map +1 -0
  31. package/esm/oas/_helpers/parseDefault.js +16 -0
  32. package/esm/oas/_helpers/parseEnum.d.ts +16 -0
  33. package/esm/oas/_helpers/parseEnum.d.ts.map +1 -0
  34. package/esm/oas/_helpers/parseEnum.js +16 -0
  35. package/esm/oas/_helpers/parseExample.d.ts +16 -0
  36. package/esm/oas/_helpers/parseExample.d.ts.map +1 -0
  37. package/esm/oas/_helpers/parseExample.js +16 -0
  38. package/esm/oas/_helpers/parseFormat.d.ts +15 -0
  39. package/esm/oas/_helpers/parseFormat.d.ts.map +1 -0
  40. package/esm/oas/_helpers/parseFormat.js +16 -0
  41. package/esm/oas/_helpers/parseNullable.d.ts +12 -0
  42. package/esm/oas/_helpers/parseNullable.d.ts.map +1 -0
  43. package/esm/oas/_helpers/parseNullable.js +16 -0
  44. package/esm/oas/_merge-all-of/check-array-item-type-conflicts.d.ts +3 -0
  45. package/esm/oas/_merge-all-of/check-array-item-type-conflicts.d.ts.map +1 -0
  46. package/esm/oas/_merge-all-of/check-array-item-type-conflicts.js +9 -0
  47. package/esm/oas/_merge-all-of/check-at-least-one-type-match.d.ts +5 -0
  48. package/esm/oas/_merge-all-of/check-at-least-one-type-match.d.ts.map +1 -0
  49. package/esm/oas/_merge-all-of/check-at-least-one-type-match.js +5 -0
  50. package/esm/oas/_merge-all-of/check-enum-conflicts.d.ts +3 -0
  51. package/esm/oas/_merge-all-of/check-enum-conflicts.d.ts.map +1 -0
  52. package/esm/oas/_merge-all-of/check-enum-conflicts.js +11 -0
  53. package/esm/oas/_merge-all-of/check-format-conflicts.d.ts +3 -0
  54. package/esm/oas/_merge-all-of/check-format-conflicts.d.ts.map +1 -0
  55. package/esm/oas/_merge-all-of/check-format-conflicts.js +5 -0
  56. package/esm/oas/_merge-all-of/check-number-constraints-conflicts.d.ts +3 -0
  57. package/esm/oas/_merge-all-of/check-number-constraints-conflicts.d.ts.map +1 -0
  58. package/esm/oas/_merge-all-of/check-number-constraints-conflicts.js +11 -0
  59. package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts +3 -0
  60. package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts.map +1 -0
  61. package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.js +5 -0
  62. package/esm/oas/_merge-all-of/check-type-conflicts.d.ts +3 -0
  63. package/esm/oas/_merge-all-of/check-type-conflicts.d.ts.map +1 -0
  64. package/esm/oas/_merge-all-of/check-type-conflicts.js +5 -0
  65. package/esm/oas/_merge-all-of/cross-product.d.ts +3 -0
  66. package/esm/oas/_merge-all-of/cross-product.d.ts.map +1 -0
  67. package/esm/oas/_merge-all-of/cross-product.js +3 -0
  68. package/esm/oas/_merge-all-of/decompose-intersection.d.ts +7 -0
  69. package/esm/oas/_merge-all-of/decompose-intersection.d.ts.map +1 -0
  70. package/esm/oas/_merge-all-of/decompose-intersection.js +27 -0
  71. package/esm/oas/_merge-all-of/decompose-union.d.ts +13 -0
  72. package/esm/oas/_merge-all-of/decompose-union.d.ts.map +1 -0
  73. package/esm/oas/_merge-all-of/decompose-union.js +52 -0
  74. package/esm/oas/_merge-all-of/generic-merge.d.ts +4 -0
  75. package/esm/oas/_merge-all-of/generic-merge.d.ts.map +1 -0
  76. package/esm/oas/_merge-all-of/generic-merge.js +12 -0
  77. package/esm/oas/_merge-all-of/is-equal.d.ts +2 -0
  78. package/esm/oas/_merge-all-of/is-equal.d.ts.map +1 -0
  79. package/esm/oas/_merge-all-of/is-equal.js +19 -0
  80. package/esm/oas/_merge-all-of/merge-array-constraints.d.ts +3 -0
  81. package/esm/oas/_merge-all-of/merge-array-constraints.d.ts.map +1 -0
  82. package/esm/oas/_merge-all-of/merge-array-constraints.js +44 -0
  83. package/esm/oas/_merge-all-of/merge-boolean-constraints.d.ts +4 -0
  84. package/esm/oas/_merge-all-of/merge-boolean-constraints.d.ts.map +1 -0
  85. package/esm/oas/_merge-all-of/merge-boolean-constraints.js +7 -0
  86. package/esm/oas/_merge-all-of/merge-enum-values.d.ts +4 -0
  87. package/esm/oas/_merge-all-of/merge-enum-values.d.ts.map +1 -0
  88. package/esm/oas/_merge-all-of/merge-enum-values.js +32 -0
  89. package/esm/oas/_merge-all-of/merge-integer-constraints.d.ts +4 -0
  90. package/esm/oas/_merge-all-of/merge-integer-constraints.d.ts.map +1 -0
  91. package/esm/oas/_merge-all-of/merge-integer-constraints.js +41 -0
  92. package/esm/oas/_merge-all-of/merge-intersection.d.ts +9 -0
  93. package/esm/oas/_merge-all-of/merge-intersection.d.ts.map +1 -0
  94. package/esm/oas/_merge-all-of/merge-intersection.js +16 -0
  95. package/esm/oas/_merge-all-of/merge-number-constraints.d.ts +4 -0
  96. package/esm/oas/_merge-all-of/merge-number-constraints.d.ts.map +1 -0
  97. package/esm/oas/_merge-all-of/merge-number-constraints.js +41 -0
  98. package/esm/oas/_merge-all-of/merge-object-constraints.d.ts +6 -0
  99. package/esm/oas/_merge-all-of/merge-object-constraints.d.ts.map +1 -0
  100. package/esm/oas/_merge-all-of/merge-object-constraints.js +28 -0
  101. package/esm/oas/_merge-all-of/merge-properties.d.ts +3 -0
  102. package/esm/oas/_merge-all-of/merge-properties.d.ts.map +1 -0
  103. package/esm/oas/_merge-all-of/merge-properties.js +25 -0
  104. package/esm/oas/_merge-all-of/merge-required.d.ts +4 -0
  105. package/esm/oas/_merge-all-of/merge-required.d.ts.map +1 -0
  106. package/esm/oas/_merge-all-of/merge-required.js +10 -0
  107. package/esm/oas/_merge-all-of/merge-string-constraints.d.ts +4 -0
  108. package/esm/oas/_merge-all-of/merge-string-constraints.d.ts.map +1 -0
  109. package/esm/oas/_merge-all-of/merge-string-constraints.js +55 -0
  110. package/esm/oas/_merge-all-of/merge-union.d.ts +16 -0
  111. package/esm/oas/_merge-all-of/merge-union.d.ts.map +1 -0
  112. package/esm/oas/_merge-all-of/merge-union.js +53 -0
  113. package/esm/oas/_merge-all-of/merge.d.ts +3 -0
  114. package/esm/oas/_merge-all-of/merge.d.ts.map +1 -0
  115. package/esm/oas/_merge-all-of/merge.js +148 -0
  116. package/esm/oas/_merge-all-of/types.d.ts +15 -0
  117. package/esm/oas/_merge-all-of/types.d.ts.map +1 -0
  118. package/esm/oas/_merge-all-of/types.js +2 -0
  119. package/esm/oas/array/Array.d.ts +29 -9
  120. package/esm/oas/array/Array.d.ts.map +1 -1
  121. package/esm/oas/array/Array.js +46 -1
  122. package/esm/oas/array/array-types.d.ts +16 -3
  123. package/esm/oas/array/array-types.d.ts.map +1 -1
  124. package/esm/oas/array/array-types.js +11 -14
  125. package/esm/oas/array/toArray.d.ts +9 -0
  126. package/esm/oas/array/toArray.d.ts.map +1 -1
  127. package/esm/oas/array/toArray.js +58 -4
  128. package/esm/oas/boolean/Boolean.d.ts +19 -9
  129. package/esm/oas/boolean/Boolean.d.ts.map +1 -1
  130. package/esm/oas/boolean/Boolean.js +23 -1
  131. package/esm/oas/boolean/boolean-types.d.ts +4 -4
  132. package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
  133. package/esm/oas/boolean/boolean-types.js +7 -7
  134. package/esm/oas/boolean/toBoolean.d.ts +10 -1
  135. package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
  136. package/esm/oas/boolean/toBoolean.js +47 -2
  137. package/esm/oas/components/Components.d.ts +4 -0
  138. package/esm/oas/components/Components.d.ts.map +1 -1
  139. package/esm/oas/components/Components.js +4 -0
  140. package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
  141. package/esm/oas/components/toComponentsV3.js +9 -2
  142. package/esm/oas/contact/toContactV3.d.ts.map +1 -1
  143. package/esm/oas/contact/toContactV3.js +3 -1
  144. package/esm/oas/discriminator/Discriminator.d.ts +2 -0
  145. package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
  146. package/esm/oas/discriminator/Discriminator.js +7 -0
  147. package/esm/oas/discriminator/discriminator-types.d.ts +6 -2
  148. package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
  149. package/esm/oas/discriminator/discriminator-types.js +5 -5
  150. package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
  151. package/esm/oas/discriminator/toDiscriminatorV3.js +6 -6
  152. package/esm/oas/document/Document.d.ts +4 -0
  153. package/esm/oas/document/Document.d.ts.map +1 -1
  154. package/esm/oas/document/Document.js +7 -0
  155. package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  156. package/esm/oas/document/toDocumentFieldsV3.js +6 -2
  157. package/esm/oas/example/example-types.d.ts +7 -2
  158. package/esm/oas/example/example-types.d.ts.map +1 -1
  159. package/esm/oas/example/example-types.js +6 -6
  160. package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
  161. package/esm/oas/example/toExamplesV3.js +6 -1
  162. package/esm/oas/header/toHeadersV3.js +6 -1
  163. package/esm/oas/info/toInfoV3.d.ts.map +1 -1
  164. package/esm/oas/info/toInfoV3.js +3 -1
  165. package/esm/oas/integer/Integer.d.ts +41 -11
  166. package/esm/oas/integer/Integer.d.ts.map +1 -1
  167. package/esm/oas/integer/Integer.js +67 -1
  168. package/esm/oas/integer/integer-types.d.ts +24 -3
  169. package/esm/oas/integer/integer-types.d.ts.map +1 -1
  170. package/esm/oas/integer/integer-types.js +18 -19
  171. package/esm/oas/integer/toInteger.d.ts +9 -1
  172. package/esm/oas/integer/toInteger.d.ts.map +1 -1
  173. package/esm/oas/integer/toInteger.js +45 -5
  174. package/esm/oas/license/toLicenseV3.d.ts.map +1 -1
  175. package/esm/oas/license/toLicenseV3.js +3 -1
  176. package/esm/oas/markdown/markdown-types.d.ts +2 -2
  177. package/esm/oas/markdown/markdown-types.d.ts.map +1 -1
  178. package/esm/oas/markdown/markdown-types.js +2 -2
  179. package/esm/oas/mediaType/mediaType-types.d.ts +12 -2
  180. package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
  181. package/esm/oas/mediaType/mediaType-types.js +6 -6
  182. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  183. package/esm/oas/mediaType/toMediaTypeItemV3.js +3 -1
  184. package/esm/oas/number/Number.d.ts +49 -9
  185. package/esm/oas/number/Number.d.ts.map +1 -1
  186. package/esm/oas/number/Number.js +88 -1
  187. package/esm/oas/number/number-types.d.ts +27 -4
  188. package/esm/oas/number/number-types.d.ts.map +1 -1
  189. package/esm/oas/number/number-types.js +16 -13
  190. package/esm/oas/number/toNumber.d.ts +2 -2
  191. package/esm/oas/number/toNumber.d.ts.map +1 -1
  192. package/esm/oas/number/toNumber.js +50 -4
  193. package/esm/oas/object/Object.d.ts +25 -9
  194. package/esm/oas/object/Object.d.ts.map +1 -1
  195. package/esm/oas/object/Object.js +51 -1
  196. package/esm/oas/object/object-types.d.ts +7 -3
  197. package/esm/oas/object/object-types.d.ts.map +1 -1
  198. package/esm/oas/object/object-types.js +14 -18
  199. package/esm/oas/object/toObject.d.ts +1 -1
  200. package/esm/oas/object/toObject.d.ts.map +1 -1
  201. package/esm/oas/object/toObject.js +44 -7
  202. package/esm/oas/operation/Operation.d.ts +4 -1
  203. package/esm/oas/operation/Operation.d.ts.map +1 -1
  204. package/esm/oas/operation/Operation.js +7 -0
  205. package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
  206. package/esm/oas/operation/toOperationsV3.js +29 -11
  207. package/esm/oas/parameter/parameter-types.d.ts +59 -4
  208. package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
  209. package/esm/oas/parameter/parameter-types.js +28 -30
  210. package/esm/oas/parameter/toParameterV3.js +6 -3
  211. package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
  212. package/esm/oas/pathItem/toPathItemV3.js +6 -1
  213. package/esm/oas/ref/Ref.d.ts +2 -1
  214. package/esm/oas/ref/Ref.d.ts.map +1 -1
  215. package/esm/oas/ref/Ref.js +2 -0
  216. package/esm/oas/ref/ref-types.d.ts +15 -9
  217. package/esm/oas/ref/ref-types.d.ts.map +1 -1
  218. package/esm/oas/ref/ref-types.js +45 -39
  219. package/esm/oas/ref/toRefV31.js +1 -1
  220. package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  221. package/esm/oas/requestBody/toRequestBodiesV3.js +3 -1
  222. package/esm/oas/response/toResponseV3.d.ts.map +1 -1
  223. package/esm/oas/response/toResponseV3.js +19 -4
  224. package/esm/oas/schema/Schema.d.ts +1 -2
  225. package/esm/oas/schema/Schema.d.ts.map +1 -1
  226. package/esm/oas/schema/schema-types.d.ts +3 -5
  227. package/esm/oas/schema/schema-types.d.ts.map +1 -1
  228. package/esm/oas/schema/schema-types.js +3 -7
  229. package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
  230. package/esm/oas/schema/toSchemasV3.js +151 -25
  231. package/esm/oas/securityRequirement/SecurityRequirement.d.ts +11 -0
  232. package/esm/oas/securityRequirement/SecurityRequirement.d.ts.map +1 -0
  233. package/esm/oas/securityRequirement/SecurityRequirement.js +22 -0
  234. package/esm/oas/securityRequirement/toSecurityRequirement.d.ts +9 -0
  235. package/esm/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -0
  236. package/esm/oas/securityRequirement/toSecurityRequirement.js +9 -0
  237. package/esm/oas/securitySchemes/SecurityScheme.d.ts +113 -0
  238. package/esm/oas/securitySchemes/SecurityScheme.d.ts.map +1 -0
  239. package/esm/oas/securitySchemes/SecurityScheme.js +204 -0
  240. package/esm/oas/securitySchemes/security-scheme-types.d.ts +181 -0
  241. package/esm/oas/securitySchemes/security-scheme-types.d.ts.map +1 -0
  242. package/esm/oas/securitySchemes/security-scheme-types.js +56 -0
  243. package/esm/oas/securitySchemes/toSecuritySchemes.d.ts +11 -0
  244. package/esm/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -0
  245. package/esm/oas/securitySchemes/toSecuritySchemes.js +62 -0
  246. package/esm/oas/server/toServerV3.d.ts.map +1 -1
  247. package/esm/oas/server/toServerV3.js +3 -1
  248. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
  249. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  250. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
  251. package/esm/oas/string/String.d.ts +21 -11
  252. package/esm/oas/string/String.d.ts.map +1 -1
  253. package/esm/oas/string/String.js +23 -4
  254. package/esm/oas/string/string-types.d.ts +30 -3
  255. package/esm/oas/string/string-types.d.ts.map +1 -1
  256. package/esm/oas/string/string-types.js +30 -32
  257. package/esm/oas/string/toString.d.ts +11 -2
  258. package/esm/oas/string/toString.d.ts.map +1 -1
  259. package/esm/oas/string/toString.js +51 -5
  260. package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
  261. package/esm/oas/tag/toTagsV3.js +3 -1
  262. package/esm/oas/union/Union.d.ts +5 -0
  263. package/esm/oas/union/Union.d.ts.map +1 -1
  264. package/esm/oas/union/Union.js +11 -0
  265. package/esm/oas/union/toUnion.d.ts +2 -1
  266. package/esm/oas/union/toUnion.d.ts.map +1 -1
  267. package/esm/oas/union/toUnion.js +12 -4
  268. package/esm/oas/union/union-types.d.ts +13 -2
  269. package/esm/oas/union/union-types.d.ts.map +1 -1
  270. package/esm/oas/union/union-types.js +8 -8
  271. package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
  272. package/esm/oas/unknown/toUnknown.js +3 -1
  273. package/esm/oas/unknown/unknown-types.d.ts +8 -2
  274. package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
  275. package/esm/oas/unknown/unknown-types.js +7 -7
  276. package/esm/types/EnrichmentRequest.d.ts +2 -2
  277. package/esm/types/EnrichmentRequest.d.ts.map +1 -1
  278. package/esm/types/Manifest.d.ts +58 -276
  279. package/esm/types/Manifest.d.ts.map +1 -1
  280. package/esm/types/Manifest.js +23 -29
  281. package/esm/types/Method.d.ts +3 -5
  282. package/esm/types/Method.d.ts.map +1 -1
  283. package/esm/types/Method.js +12 -6
  284. package/esm/types/Preview.d.ts +46 -158
  285. package/esm/types/Preview.d.ts.map +1 -1
  286. package/esm/types/Preview.js +25 -27
  287. package/esm/types/Results.d.ts +3 -9
  288. package/esm/types/Results.d.ts.map +1 -1
  289. package/esm/types/Results.js +9 -9
  290. package/esm/types/SchemaOptions.d.ts +20 -64
  291. package/esm/types/SchemaOptions.d.ts.map +1 -1
  292. package/esm/types/SchemaOptions.js +31 -31
  293. package/esm/types/Settings.d.ts +97 -437
  294. package/esm/types/Settings.d.ts.map +1 -1
  295. package/esm/types/Settings.js +38 -51
  296. package/esm/types/TypeSystem.d.ts +1 -11
  297. package/esm/types/TypeSystem.d.ts.map +1 -1
  298. package/esm/types/prettierConfig.d.ts +25 -2
  299. package/esm/types/prettierConfig.d.ts.map +1 -1
  300. package/esm/types/prettierConfig.js +24 -30
  301. package/package.json +4 -6
  302. package/script/context/ParseContext.d.ts +41 -2
  303. package/script/context/ParseContext.d.ts.map +1 -1
  304. package/script/context/ParseContext.js +77 -7
  305. package/script/context/types.d.ts +1 -0
  306. package/script/context/types.d.ts.map +1 -1
  307. package/script/dsl/model/toModelConfig.d.ts +3 -3
  308. package/script/dsl/model/toModelConfig.d.ts.map +1 -1
  309. package/script/dsl/model/toModelInsertable.d.ts +2 -2
  310. package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
  311. package/script/dsl/model/toModelInsertable.js +26 -3
  312. package/script/dsl/model/types.d.ts +2 -2
  313. package/script/dsl/model/types.d.ts.map +1 -1
  314. package/script/dsl/operation/toOperationConfig.d.ts +3 -3
  315. package/script/dsl/operation/toOperationConfig.d.ts.map +1 -1
  316. package/script/dsl/operation/toOperationConfig.js +26 -3
  317. package/script/dsl/operation/toOperationInsertable.d.ts +2 -2
  318. package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
  319. package/script/dsl/operation/toOperationInsertable.js +26 -3
  320. package/script/dsl/operation/types.d.ts +2 -2
  321. package/script/dsl/operation/types.d.ts.map +1 -1
  322. package/script/helpers/refFns.d.ts +3 -0
  323. package/script/helpers/refFns.d.ts.map +1 -1
  324. package/script/helpers/refFns.js +14 -5
  325. package/script/helpers/tracer.d.ts.map +1 -1
  326. package/script/helpers/tracer.js +9 -3
  327. package/script/mod.d.ts +0 -3
  328. package/script/mod.d.ts.map +1 -1
  329. package/script/mod.js +0 -3
  330. package/script/oas/_helpers/parseDefault.d.ts +16 -0
  331. package/script/oas/_helpers/parseDefault.d.ts.map +1 -0
  332. package/script/oas/_helpers/parseDefault.js +43 -0
  333. package/script/oas/_helpers/parseEnum.d.ts +16 -0
  334. package/script/oas/_helpers/parseEnum.d.ts.map +1 -0
  335. package/script/oas/_helpers/parseEnum.js +43 -0
  336. package/script/oas/_helpers/parseExample.d.ts +16 -0
  337. package/script/oas/_helpers/parseExample.d.ts.map +1 -0
  338. package/script/oas/_helpers/parseExample.js +43 -0
  339. package/script/oas/_helpers/parseFormat.d.ts +15 -0
  340. package/script/oas/_helpers/parseFormat.d.ts.map +1 -0
  341. package/script/oas/_helpers/parseFormat.js +43 -0
  342. package/script/oas/_helpers/parseNullable.d.ts +12 -0
  343. package/script/oas/_helpers/parseNullable.d.ts.map +1 -0
  344. package/script/oas/_helpers/parseNullable.js +43 -0
  345. package/script/oas/_merge-all-of/check-array-item-type-conflicts.d.ts +3 -0
  346. package/script/oas/_merge-all-of/check-array-item-type-conflicts.d.ts.map +1 -0
  347. package/script/oas/_merge-all-of/check-array-item-type-conflicts.js +13 -0
  348. package/script/oas/_merge-all-of/check-at-least-one-type-match.d.ts +5 -0
  349. package/script/oas/_merge-all-of/check-at-least-one-type-match.d.ts.map +1 -0
  350. package/script/oas/_merge-all-of/check-at-least-one-type-match.js +9 -0
  351. package/script/oas/_merge-all-of/check-enum-conflicts.d.ts +3 -0
  352. package/script/oas/_merge-all-of/check-enum-conflicts.d.ts.map +1 -0
  353. package/script/oas/_merge-all-of/check-enum-conflicts.js +15 -0
  354. package/script/oas/_merge-all-of/check-format-conflicts.d.ts +3 -0
  355. package/script/oas/_merge-all-of/check-format-conflicts.d.ts.map +1 -0
  356. package/script/oas/_merge-all-of/check-format-conflicts.js +9 -0
  357. package/script/oas/_merge-all-of/check-number-constraints-conflicts.d.ts +3 -0
  358. package/script/oas/_merge-all-of/check-number-constraints-conflicts.d.ts.map +1 -0
  359. package/script/oas/_merge-all-of/check-number-constraints-conflicts.js +15 -0
  360. package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts +3 -0
  361. package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts.map +1 -0
  362. package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.js +9 -0
  363. package/script/oas/_merge-all-of/check-type-conflicts.d.ts +3 -0
  364. package/script/oas/_merge-all-of/check-type-conflicts.d.ts.map +1 -0
  365. package/script/oas/_merge-all-of/check-type-conflicts.js +9 -0
  366. package/script/oas/_merge-all-of/cross-product.d.ts +3 -0
  367. package/script/oas/_merge-all-of/cross-product.d.ts.map +1 -0
  368. package/script/oas/_merge-all-of/cross-product.js +7 -0
  369. package/script/oas/_merge-all-of/decompose-intersection.d.ts +7 -0
  370. package/script/oas/_merge-all-of/decompose-intersection.d.ts.map +1 -0
  371. package/script/oas/_merge-all-of/decompose-intersection.js +31 -0
  372. package/script/oas/_merge-all-of/decompose-union.d.ts +13 -0
  373. package/script/oas/_merge-all-of/decompose-union.d.ts.map +1 -0
  374. package/script/oas/_merge-all-of/decompose-union.js +56 -0
  375. package/script/oas/_merge-all-of/generic-merge.d.ts +4 -0
  376. package/script/oas/_merge-all-of/generic-merge.d.ts.map +1 -0
  377. package/script/oas/_merge-all-of/generic-merge.js +16 -0
  378. package/script/oas/_merge-all-of/is-equal.d.ts +2 -0
  379. package/script/oas/_merge-all-of/is-equal.d.ts.map +1 -0
  380. package/script/oas/_merge-all-of/is-equal.js +23 -0
  381. package/script/oas/_merge-all-of/merge-array-constraints.d.ts +3 -0
  382. package/script/oas/_merge-all-of/merge-array-constraints.d.ts.map +1 -0
  383. package/script/oas/_merge-all-of/merge-array-constraints.js +70 -0
  384. package/script/oas/_merge-all-of/merge-boolean-constraints.d.ts +4 -0
  385. package/script/oas/_merge-all-of/merge-boolean-constraints.d.ts.map +1 -0
  386. package/script/oas/_merge-all-of/merge-boolean-constraints.js +33 -0
  387. package/script/oas/_merge-all-of/merge-enum-values.d.ts +4 -0
  388. package/script/oas/_merge-all-of/merge-enum-values.d.ts.map +1 -0
  389. package/script/oas/_merge-all-of/merge-enum-values.js +58 -0
  390. package/script/oas/_merge-all-of/merge-integer-constraints.d.ts +4 -0
  391. package/script/oas/_merge-all-of/merge-integer-constraints.d.ts.map +1 -0
  392. package/script/oas/_merge-all-of/merge-integer-constraints.js +67 -0
  393. package/script/oas/_merge-all-of/merge-intersection.d.ts +9 -0
  394. package/script/oas/_merge-all-of/merge-intersection.d.ts.map +1 -0
  395. package/script/oas/_merge-all-of/merge-intersection.js +20 -0
  396. package/script/oas/_merge-all-of/merge-number-constraints.d.ts +4 -0
  397. package/script/oas/_merge-all-of/merge-number-constraints.d.ts.map +1 -0
  398. package/script/oas/_merge-all-of/merge-number-constraints.js +67 -0
  399. package/script/oas/_merge-all-of/merge-object-constraints.d.ts +6 -0
  400. package/script/oas/_merge-all-of/merge-object-constraints.d.ts.map +1 -0
  401. package/script/oas/_merge-all-of/merge-object-constraints.js +55 -0
  402. package/script/oas/_merge-all-of/merge-properties.d.ts +3 -0
  403. package/script/oas/_merge-all-of/merge-properties.d.ts.map +1 -0
  404. package/script/oas/_merge-all-of/merge-properties.js +29 -0
  405. package/script/oas/_merge-all-of/merge-required.d.ts +4 -0
  406. package/script/oas/_merge-all-of/merge-required.d.ts.map +1 -0
  407. package/script/oas/_merge-all-of/merge-required.js +15 -0
  408. package/script/oas/_merge-all-of/merge-string-constraints.d.ts +4 -0
  409. package/script/oas/_merge-all-of/merge-string-constraints.d.ts.map +1 -0
  410. package/script/oas/_merge-all-of/merge-string-constraints.js +81 -0
  411. package/script/oas/_merge-all-of/merge-union.d.ts +16 -0
  412. package/script/oas/_merge-all-of/merge-union.d.ts.map +1 -0
  413. package/script/oas/_merge-all-of/merge-union.js +58 -0
  414. package/script/oas/_merge-all-of/merge.d.ts +3 -0
  415. package/script/oas/_merge-all-of/merge.d.ts.map +1 -0
  416. package/script/oas/_merge-all-of/merge.js +152 -0
  417. package/script/oas/_merge-all-of/types.d.ts +15 -0
  418. package/script/oas/_merge-all-of/types.d.ts.map +1 -0
  419. package/script/oas/_merge-all-of/types.js +28 -0
  420. package/script/oas/array/Array.d.ts +29 -9
  421. package/script/oas/array/Array.d.ts.map +1 -1
  422. package/script/oas/array/Array.js +46 -1
  423. package/script/oas/array/array-types.d.ts +16 -3
  424. package/script/oas/array/array-types.d.ts.map +1 -1
  425. package/script/oas/array/array-types.js +34 -14
  426. package/script/oas/array/toArray.d.ts +9 -0
  427. package/script/oas/array/toArray.d.ts.map +1 -1
  428. package/script/oas/array/toArray.js +84 -6
  429. package/script/oas/boolean/Boolean.d.ts +19 -9
  430. package/script/oas/boolean/Boolean.d.ts.map +1 -1
  431. package/script/oas/boolean/Boolean.js +23 -1
  432. package/script/oas/boolean/boolean-types.d.ts +4 -4
  433. package/script/oas/boolean/boolean-types.d.ts.map +1 -1
  434. package/script/oas/boolean/boolean-types.js +30 -7
  435. package/script/oas/boolean/toBoolean.d.ts +10 -1
  436. package/script/oas/boolean/toBoolean.d.ts.map +1 -1
  437. package/script/oas/boolean/toBoolean.js +73 -4
  438. package/script/oas/components/Components.d.ts +4 -0
  439. package/script/oas/components/Components.d.ts.map +1 -1
  440. package/script/oas/components/Components.js +4 -0
  441. package/script/oas/components/toComponentsV3.d.ts.map +1 -1
  442. package/script/oas/components/toComponentsV3.js +9 -2
  443. package/script/oas/contact/toContactV3.d.ts.map +1 -1
  444. package/script/oas/contact/toContactV3.js +3 -1
  445. package/script/oas/discriminator/Discriminator.d.ts +2 -0
  446. package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
  447. package/script/oas/discriminator/Discriminator.js +7 -0
  448. package/script/oas/discriminator/discriminator-types.d.ts +6 -2
  449. package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
  450. package/script/oas/discriminator/discriminator-types.js +28 -5
  451. package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
  452. package/script/oas/discriminator/toDiscriminatorV3.js +6 -6
  453. package/script/oas/document/Document.d.ts +4 -0
  454. package/script/oas/document/Document.d.ts.map +1 -1
  455. package/script/oas/document/Document.js +7 -0
  456. package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  457. package/script/oas/document/toDocumentFieldsV3.js +6 -2
  458. package/script/oas/example/example-types.d.ts +7 -2
  459. package/script/oas/example/example-types.d.ts.map +1 -1
  460. package/script/oas/example/example-types.js +29 -6
  461. package/script/oas/example/toExamplesV3.d.ts.map +1 -1
  462. package/script/oas/example/toExamplesV3.js +6 -1
  463. package/script/oas/header/toHeadersV3.js +6 -1
  464. package/script/oas/info/toInfoV3.d.ts.map +1 -1
  465. package/script/oas/info/toInfoV3.js +3 -1
  466. package/script/oas/integer/Integer.d.ts +41 -11
  467. package/script/oas/integer/Integer.d.ts.map +1 -1
  468. package/script/oas/integer/Integer.js +67 -1
  469. package/script/oas/integer/integer-types.d.ts +24 -3
  470. package/script/oas/integer/integer-types.d.ts.map +1 -1
  471. package/script/oas/integer/integer-types.js +42 -20
  472. package/script/oas/integer/toInteger.d.ts +9 -1
  473. package/script/oas/integer/toInteger.d.ts.map +1 -1
  474. package/script/oas/integer/toInteger.js +70 -6
  475. package/script/oas/license/toLicenseV3.d.ts.map +1 -1
  476. package/script/oas/license/toLicenseV3.js +3 -1
  477. package/script/oas/markdown/markdown-types.d.ts +2 -2
  478. package/script/oas/markdown/markdown-types.d.ts.map +1 -1
  479. package/script/oas/markdown/markdown-types.js +25 -2
  480. package/script/oas/mediaType/mediaType-types.d.ts +12 -2
  481. package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
  482. package/script/oas/mediaType/mediaType-types.js +29 -6
  483. package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  484. package/script/oas/mediaType/toMediaTypeItemV3.js +3 -1
  485. package/script/oas/number/Number.d.ts +49 -9
  486. package/script/oas/number/Number.d.ts.map +1 -1
  487. package/script/oas/number/Number.js +88 -1
  488. package/script/oas/number/number-types.d.ts +27 -4
  489. package/script/oas/number/number-types.d.ts.map +1 -1
  490. package/script/oas/number/number-types.js +40 -14
  491. package/script/oas/number/toNumber.d.ts +2 -2
  492. package/script/oas/number/toNumber.d.ts.map +1 -1
  493. package/script/oas/number/toNumber.js +74 -5
  494. package/script/oas/object/Object.d.ts +25 -9
  495. package/script/oas/object/Object.d.ts.map +1 -1
  496. package/script/oas/object/Object.js +51 -1
  497. package/script/oas/object/object-types.d.ts +7 -3
  498. package/script/oas/object/object-types.d.ts.map +1 -1
  499. package/script/oas/object/object-types.js +37 -18
  500. package/script/oas/object/toObject.d.ts +1 -1
  501. package/script/oas/object/toObject.d.ts.map +1 -1
  502. package/script/oas/object/toObject.js +68 -8
  503. package/script/oas/operation/Operation.d.ts +4 -1
  504. package/script/oas/operation/Operation.d.ts.map +1 -1
  505. package/script/oas/operation/Operation.js +7 -0
  506. package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
  507. package/script/oas/operation/toOperationsV3.js +29 -11
  508. package/script/oas/parameter/parameter-types.d.ts +59 -4
  509. package/script/oas/parameter/parameter-types.d.ts.map +1 -1
  510. package/script/oas/parameter/parameter-types.js +51 -30
  511. package/script/oas/parameter/toParameterV3.js +29 -3
  512. package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
  513. package/script/oas/pathItem/toPathItemV3.js +6 -1
  514. package/script/oas/ref/Ref.d.ts +2 -1
  515. package/script/oas/ref/Ref.d.ts.map +1 -1
  516. package/script/oas/ref/Ref.js +2 -0
  517. package/script/oas/ref/ref-types.d.ts +15 -9
  518. package/script/oas/ref/ref-types.d.ts.map +1 -1
  519. package/script/oas/ref/ref-types.js +74 -45
  520. package/script/oas/ref/toRefV31.js +1 -1
  521. package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  522. package/script/oas/requestBody/toRequestBodiesV3.js +3 -1
  523. package/script/oas/response/toResponseV3.d.ts.map +1 -1
  524. package/script/oas/response/toResponseV3.js +19 -4
  525. package/script/oas/schema/Schema.d.ts +1 -2
  526. package/script/oas/schema/Schema.d.ts.map +1 -1
  527. package/script/oas/schema/schema-types.d.ts +3 -5
  528. package/script/oas/schema/schema-types.d.ts.map +1 -1
  529. package/script/oas/schema/schema-types.js +26 -7
  530. package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
  531. package/script/oas/schema/toSchemasV3.js +151 -25
  532. package/script/oas/securityRequirement/SecurityRequirement.d.ts +11 -0
  533. package/script/oas/securityRequirement/SecurityRequirement.d.ts.map +1 -0
  534. package/script/oas/securityRequirement/SecurityRequirement.js +26 -0
  535. package/script/oas/securityRequirement/toSecurityRequirement.d.ts +9 -0
  536. package/script/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -0
  537. package/script/oas/securityRequirement/toSecurityRequirement.js +13 -0
  538. package/script/oas/securitySchemes/SecurityScheme.d.ts +113 -0
  539. package/script/oas/securitySchemes/SecurityScheme.d.ts.map +1 -0
  540. package/script/oas/securitySchemes/SecurityScheme.js +211 -0
  541. package/script/oas/securitySchemes/security-scheme-types.d.ts +181 -0
  542. package/script/oas/securitySchemes/security-scheme-types.d.ts.map +1 -0
  543. package/script/oas/securitySchemes/security-scheme-types.js +82 -0
  544. package/script/oas/securitySchemes/toSecuritySchemes.d.ts +11 -0
  545. package/script/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -0
  546. package/script/oas/securitySchemes/toSecuritySchemes.js +89 -0
  547. package/script/oas/server/toServerV3.d.ts.map +1 -1
  548. package/script/oas/server/toServerV3.js +3 -1
  549. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
  550. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  551. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
  552. package/script/oas/string/String.d.ts +21 -11
  553. package/script/oas/string/String.d.ts.map +1 -1
  554. package/script/oas/string/String.js +23 -4
  555. package/script/oas/string/string-types.d.ts +30 -3
  556. package/script/oas/string/string-types.d.ts.map +1 -1
  557. package/script/oas/string/string-types.js +53 -32
  558. package/script/oas/string/toString.d.ts +11 -2
  559. package/script/oas/string/toString.d.ts.map +1 -1
  560. package/script/oas/string/toString.js +77 -7
  561. package/script/oas/tag/toTagsV3.d.ts.map +1 -1
  562. package/script/oas/tag/toTagsV3.js +3 -1
  563. package/script/oas/union/Union.d.ts +5 -0
  564. package/script/oas/union/Union.d.ts.map +1 -1
  565. package/script/oas/union/Union.js +11 -0
  566. package/script/oas/union/toUnion.d.ts +2 -1
  567. package/script/oas/union/toUnion.d.ts.map +1 -1
  568. package/script/oas/union/toUnion.js +12 -4
  569. package/script/oas/union/union-types.d.ts +13 -2
  570. package/script/oas/union/union-types.d.ts.map +1 -1
  571. package/script/oas/union/union-types.js +31 -8
  572. package/script/oas/unknown/toUnknown.d.ts.map +1 -1
  573. package/script/oas/unknown/toUnknown.js +3 -1
  574. package/script/oas/unknown/unknown-types.d.ts +8 -2
  575. package/script/oas/unknown/unknown-types.d.ts.map +1 -1
  576. package/script/oas/unknown/unknown-types.js +30 -7
  577. package/script/types/EnrichmentRequest.d.ts +2 -2
  578. package/script/types/EnrichmentRequest.d.ts.map +1 -1
  579. package/script/types/Manifest.d.ts +58 -276
  580. package/script/types/Manifest.d.ts.map +1 -1
  581. package/script/types/Manifest.js +45 -28
  582. package/script/types/Method.d.ts +3 -5
  583. package/script/types/Method.d.ts.map +1 -1
  584. package/script/types/Method.js +35 -6
  585. package/script/types/Preview.d.ts +46 -158
  586. package/script/types/Preview.d.ts.map +1 -1
  587. package/script/types/Preview.js +48 -27
  588. package/script/types/Results.d.ts +3 -9
  589. package/script/types/Results.d.ts.map +1 -1
  590. package/script/types/Results.js +33 -10
  591. package/script/types/SchemaOptions.d.ts +20 -64
  592. package/script/types/SchemaOptions.d.ts.map +1 -1
  593. package/script/types/SchemaOptions.js +54 -31
  594. package/script/types/Settings.d.ts +97 -437
  595. package/script/types/Settings.d.ts.map +1 -1
  596. package/script/types/Settings.js +61 -51
  597. package/script/types/TypeSystem.d.ts +1 -11
  598. package/script/types/TypeSystem.d.ts.map +1 -1
  599. package/script/types/prettierConfig.d.ts +25 -2
  600. package/script/types/prettierConfig.d.ts.map +1 -1
  601. package/script/types/prettierConfig.js +47 -30
  602. package/esm/oas/intersection/Intersection.d.ts +0 -30
  603. package/esm/oas/intersection/Intersection.d.ts.map +0 -1
  604. package/esm/oas/intersection/Intersection.js +0 -83
  605. package/esm/oas/intersection/intersection-types.d.ts +0 -14
  606. package/esm/oas/intersection/intersection-types.d.ts.map +0 -1
  607. package/esm/oas/intersection/intersection-types.js +0 -12
  608. package/esm/oas/intersection/toIntersection.d.ts +0 -11
  609. package/esm/oas/intersection/toIntersection.d.ts.map +0 -1
  610. package/esm/oas/intersection/toIntersection.js +0 -16
  611. package/esm/oas/null/null-types.d.ts +0 -10
  612. package/esm/oas/null/null-types.d.ts.map +0 -1
  613. package/esm/oas/null/null-types.js +0 -8
  614. package/script/oas/intersection/Intersection.d.ts +0 -30
  615. package/script/oas/intersection/Intersection.d.ts.map +0 -1
  616. package/script/oas/intersection/Intersection.js +0 -87
  617. package/script/oas/intersection/intersection-types.d.ts +0 -14
  618. package/script/oas/intersection/intersection-types.d.ts.map +0 -1
  619. package/script/oas/intersection/intersection-types.js +0 -15
  620. package/script/oas/intersection/toIntersection.d.ts +0 -11
  621. package/script/oas/intersection/toIntersection.d.ts.map +0 -1
  622. package/script/oas/intersection/toIntersection.js +0 -20
  623. package/script/oas/null/null-types.d.ts +0 -10
  624. package/script/oas/null/null-types.d.ts.map +0 -1
  625. package/script/oas/null/null-types.js +0 -11
@@ -0,0 +1,43 @@
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.parseNullable = void 0;
27
+ const v = __importStar(require("valibot"));
28
+ const parseNullable = ({ value, context }) => {
29
+ const { nullable, ...rest } = value;
30
+ const parsedNullable = context.provisionalParse({
31
+ key: 'nullable',
32
+ value: nullable,
33
+ parent: value,
34
+ schema: v.optional(v.boolean()),
35
+ toMessage: (input) => `Invalid nullable: ${input}`,
36
+ type: 'INVALID_NULLABLE'
37
+ });
38
+ return {
39
+ nullable: parsedNullable,
40
+ value: rest
41
+ };
42
+ };
43
+ exports.parseNullable = parseNullable;
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ export declare const checkArrayItemTypeConflicts: (a: OpenAPIV3.SchemaObject, b: OpenAPIV3.SchemaObject) => void;
3
+ //# sourceMappingURL=check-array-item-type-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-array-item-type-conflicts.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-array-item-type-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,2BAA2B,MACnC,SAAS,CAAC,YAAY,KACtB,SAAS,CAAC,YAAY,KACxB,IAUF,CAAA"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkArrayItemTypeConflicts = void 0;
4
+ const checkArrayItemTypeConflicts = (a, b) => {
5
+ if (a.type === 'array' && b.type === 'array' && 'items' in a && 'items' in b) {
6
+ const aItems = a.items;
7
+ const bItems = b.items;
8
+ if (aItems.type && bItems.type && aItems.type !== bItems.type) {
9
+ throw new Error(`Cannot merge schemas: array items have conflicting types '${aItems.type}' and '${bItems.type}'`);
10
+ }
11
+ }
12
+ };
13
+ exports.checkArrayItemTypeConflicts = checkArrayItemTypeConflicts;
@@ -0,0 +1,5 @@
1
+ import type { SchemaObject } from './types.js';
2
+ type SchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array';
3
+ export declare const checkAtLeastOneTypeMatch: (first: SchemaObject, second: SchemaObject, type: SchemaType) => boolean;
4
+ export {};
5
+ //# sourceMappingURL=check-at-least-one-type-match.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-at-least-one-type-match.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-at-least-one-type-match.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAElF,eAAO,MAAM,wBAAwB,UAC5B,YAAY,UACX,YAAY,QACd,UAAU,KACf,OAMF,CAAA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkAtLeastOneTypeMatch = void 0;
4
+ const checkAtLeastOneTypeMatch = (first, second, type) => {
5
+ return ((first.type === type && second.type === type) ||
6
+ (first.type === type && !second.type) ||
7
+ (!first.type && second.type === type));
8
+ };
9
+ exports.checkAtLeastOneTypeMatch = checkAtLeastOneTypeMatch;
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ export declare const checkEnumConflicts: (first: OpenAPIV3.SchemaObject, second: OpenAPIV3.SchemaObject) => void;
3
+ //# sourceMappingURL=check-enum-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-enum-conflicts.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-enum-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,kBAAkB,UACtB,SAAS,CAAC,YAAY,UACrB,SAAS,CAAC,YAAY,KAC7B,IAUF,CAAA"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkEnumConflicts = void 0;
4
+ const is_equal_js_1 = require("./is-equal.js");
5
+ const checkEnumConflicts = (first, second) => {
6
+ if (first.enum && second.enum) {
7
+ const intersection = first.enum.filter(value => {
8
+ return second.enum.some(bValue => (0, is_equal_js_1.isEqual)(value, bValue));
9
+ });
10
+ if (intersection.length === 0) {
11
+ throw new Error('Cannot merge schemas: enum values have no intersection');
12
+ }
13
+ }
14
+ };
15
+ exports.checkEnumConflicts = checkEnumConflicts;
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ export declare const checkFormatConflicts: (a: OpenAPIV3.SchemaObject, b: OpenAPIV3.SchemaObject) => void;
3
+ //# sourceMappingURL=check-format-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-format-conflicts.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-format-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,oBAAoB,MAC5B,SAAS,CAAC,YAAY,KACtB,SAAS,CAAC,YAAY,KACxB,IAIF,CAAA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkFormatConflicts = void 0;
4
+ const checkFormatConflicts = (a, b) => {
5
+ if (a.format && b.format && a.format !== b.format) {
6
+ throw new Error(`Cannot merge schemas: conflicting formats '${a.format}' and '${b.format}'`);
7
+ }
8
+ };
9
+ exports.checkFormatConflicts = checkFormatConflicts;
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ export declare const checkNumberConstraintsConflicts: (a: OpenAPIV3.SchemaObject, b: OpenAPIV3.SchemaObject) => void;
3
+ //# sourceMappingURL=check-number-constraints-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-number-constraints-conflicts.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-number-constraints-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,+BAA+B,MACvC,SAAS,CAAC,YAAY,KACtB,SAAS,CAAC,YAAY,KACxB,IAYF,CAAA"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkNumberConstraintsConflicts = void 0;
4
+ const checkNumberConstraintsConflicts = (a, b) => {
5
+ if (a.type === 'number' && b.type === 'number') {
6
+ const aMin = a.minimum ?? -Infinity;
7
+ const aMax = a.maximum ?? Infinity;
8
+ const bMin = b.minimum ?? -Infinity;
9
+ const bMax = b.maximum ?? Infinity;
10
+ if (aMin > bMax || bMin > aMax) {
11
+ throw new Error(`Cannot merge schemas: incompatible number ranges [${aMin},${aMax}] and [${bMin},${bMax}]`);
12
+ }
13
+ }
14
+ };
15
+ exports.checkNumberConstraintsConflicts = checkNumberConstraintsConflicts;
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ export declare const checkReadOnlyWriteOnlyConflicts: (a: OpenAPIV3.SchemaObject, b: OpenAPIV3.SchemaObject) => void;
3
+ //# sourceMappingURL=check-read-only-write-only-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-read-only-write-only-conflicts.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-read-only-write-only-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,+BAA+B,MACvC,SAAS,CAAC,YAAY,KACtB,SAAS,CAAC,YAAY,KACxB,IAIF,CAAA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkReadOnlyWriteOnlyConflicts = void 0;
4
+ const checkReadOnlyWriteOnlyConflicts = (a, b) => {
5
+ if ((a.readOnly && b.writeOnly) || (a.writeOnly && b.readOnly)) {
6
+ throw new Error('Cannot merge schemas: property cannot be both readOnly and writeOnly');
7
+ }
8
+ };
9
+ exports.checkReadOnlyWriteOnlyConflicts = checkReadOnlyWriteOnlyConflicts;
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ export declare const checkTypeConflicts: (first: OpenAPIV3.SchemaObject, second: OpenAPIV3.SchemaObject) => void;
3
+ //# sourceMappingURL=check-type-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-type-conflicts.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/check-type-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,kBAAkB,UACtB,SAAS,CAAC,YAAY,UACrB,SAAS,CAAC,YAAY,KAC7B,IAQF,CAAA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkTypeConflicts = void 0;
4
+ const checkTypeConflicts = (first, second) => {
5
+ if (first.type && second.type && first.type !== second.type) {
6
+ throw new Error(`Cannot merge schemas: conflicting types '${first.type}' and '${second.type}', ${JSON.stringify(first)} and ${JSON.stringify(second)}`);
7
+ }
8
+ };
9
+ exports.checkTypeConflicts = checkTypeConflicts;
@@ -0,0 +1,3 @@
1
+ import type { SchemaOrReference } from './types.js';
2
+ export declare const crossProduct: (a: SchemaOrReference[], b: SchemaOrReference[]) => [SchemaOrReference, SchemaOrReference][];
3
+ //# sourceMappingURL=cross-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cross-product.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/cross-product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,eAAO,MAAM,YAAY,MAAO,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,6CAK1E,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.crossProduct = void 0;
4
+ const crossProduct = (a, b) => {
5
+ return a.reduce((acc, x) => [...acc, ...b.map((y) => [x, y])], []);
6
+ };
7
+ exports.crossProduct = crossProduct;
@@ -0,0 +1,7 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ type DecomposeIntersectionArgs = {
3
+ schema: OpenAPIV3.SchemaObject;
4
+ };
5
+ export declare const decomposeIntersection: ({ schema }: DecomposeIntersectionArgs) => (OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject)[];
6
+ export {};
7
+ //# sourceMappingURL=decompose-intersection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decompose-intersection.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/decompose-intersection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAQ9C,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,SAAS,CAAC,YAAY,CAAA;CAC/B,CAAA;AAGD,eAAO,MAAM,qBAAqB,eAE/B,yBAAyB,KAAG,CAAC,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,EA4BlF,CAAA"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decomposeIntersection = void 0;
4
+ // Convert a schema object into an array of schemas that can be merged iteratively into a new schema
5
+ const decomposeIntersection = ({ schema }) => {
6
+ if (!schema.allOf) {
7
+ return [schema];
8
+ }
9
+ let location = 'before';
10
+ const output = {
11
+ before: [],
12
+ inside: [],
13
+ after: []
14
+ };
15
+ for (const [key, value] of Object.entries(schema)) {
16
+ if (key === 'allOf') {
17
+ // do not decompose wrapper for unions (oneOf, anyOf)
18
+ output.inside = value;
19
+ location = 'after';
20
+ }
21
+ else {
22
+ output[location].push([key, value]);
23
+ }
24
+ }
25
+ return [
26
+ output.before.length > 0 ? Object.fromEntries(output.before) : undefined,
27
+ ...output.inside,
28
+ output.after.length > 0 ? Object.fromEntries(output.after) : undefined
29
+ ].filter(item => item !== undefined);
30
+ };
31
+ exports.decomposeIntersection = decomposeIntersection;
@@ -0,0 +1,13 @@
1
+ import type { SchemaObject, ReferenceObject } from './types.js';
2
+ type DecomposeUnionArgs = {
3
+ schema: SchemaObject;
4
+ groupType: 'oneOf' | 'anyOf';
5
+ };
6
+ type DecomposeUnionReturn = {
7
+ beforeExcluded: SchemaObject;
8
+ decomposed: (SchemaObject | ReferenceObject)[];
9
+ afterExcluded: SchemaObject;
10
+ };
11
+ export declare const decomposeUnion: ({ schema, groupType }: DecomposeUnionArgs) => DecomposeUnionReturn;
12
+ export {};
13
+ //# sourceMappingURL=decompose-union.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decompose-union.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/decompose-union.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQ/D,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAA;CAC7B,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,YAAY,CAAA;IAC5B,UAAU,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,EAAE,CAAA;IAC9C,aAAa,EAAE,YAAY,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,cAAc,0BAA2B,kBAAkB,KAAG,oBA6C1E,CAAA"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decomposeUnion = void 0;
4
+ // Convert a schema object into an array of schemas that can be merged iteratively into a new schema
5
+ const decomposeUnion = ({ schema, groupType }) => {
6
+ if (!schema[groupType]) {
7
+ console.log('NO GROUP TYPE', JSON.stringify(schema, null, 2));
8
+ return {
9
+ beforeExcluded: {},
10
+ decomposed: [schema],
11
+ afterExcluded: {}
12
+ };
13
+ }
14
+ let location = 'before';
15
+ const output = {
16
+ before: [],
17
+ inside: [],
18
+ after: []
19
+ };
20
+ for (const [key, value] of Object.entries(schema)) {
21
+ if (key === groupType) {
22
+ // do not decompose wrapper for unions (oneOf, anyOf)
23
+ output.inside = [{ [groupType]: value }];
24
+ location = 'after';
25
+ }
26
+ else {
27
+ output[location].push([key, value]);
28
+ }
29
+ }
30
+ const { retained: before, excluded: beforeExcluded } = exclude(output.before);
31
+ const { retained: after, excluded: afterExcluded } = exclude(output.after);
32
+ const decomposed = [
33
+ before.length > 0 ? Object.fromEntries(before) : undefined,
34
+ ...output.inside,
35
+ after.length > 0 ? Object.fromEntries(after) : undefined
36
+ ].filter(item => item !== undefined);
37
+ const result = {
38
+ beforeExcluded: Object.fromEntries(beforeExcluded),
39
+ decomposed,
40
+ afterExcluded: Object.fromEntries(afterExcluded)
41
+ };
42
+ return result;
43
+ };
44
+ exports.decomposeUnion = decomposeUnion;
45
+ const excludedProperties = ['discriminator', 'default'];
46
+ const exclude = (entries) => {
47
+ return entries.reduce((acc, [key, value]) => {
48
+ if (excludedProperties.includes(key)) {
49
+ acc.excluded.push([key, value]);
50
+ }
51
+ else {
52
+ acc.retained.push([key, value]);
53
+ }
54
+ return acc;
55
+ }, { retained: [], excluded: [] });
56
+ };
@@ -0,0 +1,4 @@
1
+ import type { SchemaObject, GetRefFn } from './types.js';
2
+ import type * as v from 'valibot';
3
+ export declare const genericMerge: <T>(first: SchemaObject, second: SchemaObject, getRef: GetRefFn, typeCheck?: v.GenericSchema<T>) => SchemaObject;
4
+ //# sourceMappingURL=generic-merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generic-merge.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/generic-merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIxD,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AACjC,eAAO,MAAM,YAAY,GAAI,CAAC,SACrB,YAAY,UACX,YAAY,UACZ,QAAQ,cACJ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAC7B,YAQF,CAAA"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.genericMerge = void 0;
4
+ const merge_enum_values_js_1 = require("./merge-enum-values.js");
5
+ const merge_properties_js_1 = require("./merge-properties.js");
6
+ const merge_required_js_1 = require("./merge-required.js");
7
+ const genericMerge = (first, second, getRef, typeCheck) => {
8
+ return {
9
+ ...first,
10
+ ...second,
11
+ ...(0, merge_properties_js_1.mergeProperties)(first, second, getRef),
12
+ ...(0, merge_required_js_1.mergeRequired)(first, second),
13
+ ...(0, merge_enum_values_js_1.mergeEnumValues)(first, second, typeCheck)
14
+ };
15
+ };
16
+ exports.genericMerge = genericMerge;
@@ -0,0 +1,2 @@
1
+ export declare const isEqual: (first: unknown, second: unknown) => boolean;
2
+ //# sourceMappingURL=is-equal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-equal.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/is-equal.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAW,OAAO,UAAU,OAAO,KAAG,OAuBzD,CAAA"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isEqual = void 0;
4
+ const isEqual = (first, second) => {
5
+ if (Array.isArray(first) && Array.isArray(second)) {
6
+ if (first.length !== second.length)
7
+ return false;
8
+ return first.every((value, index) => (0, exports.isEqual)(value, second[index]));
9
+ }
10
+ if (typeof first === 'object' &&
11
+ typeof second === 'object' &&
12
+ first !== null &&
13
+ second !== null) {
14
+ const aKeys = Object.keys(first);
15
+ const bKeys = Object.keys(second);
16
+ if (aKeys.length !== bKeys.length)
17
+ return false;
18
+ return aKeys.every(key => bKeys.includes(key) &&
19
+ (0, exports.isEqual)(first[key], second[key]));
20
+ }
21
+ return first === second;
22
+ };
23
+ exports.isEqual = isEqual;
@@ -0,0 +1,3 @@
1
+ import type { ArraySchemaObject, GetRefFn, SchemaObject } from './types.js';
2
+ export declare function mergeArrayConstraints(first: ArraySchemaObject | SchemaObject, second: ArraySchemaObject | SchemaObject, getRef: GetRefFn): ArraySchemaObject;
3
+ //# sourceMappingURL=merge-array-constraints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-array-constraints.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/merge-array-constraints.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAqB,MAAM,YAAY,CAAA;AAI9F,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,GAAG,YAAY,EACvC,MAAM,EAAE,iBAAiB,GAAG,YAAY,EACxC,MAAM,EAAE,QAAQ,GACf,iBAAiB,CAiCnB"}
@@ -0,0 +1,70 @@
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.mergeArrayConstraints = mergeArrayConstraints;
27
+ const merge_js_1 = require("./merge.js");
28
+ const generic_merge_js_1 = require("./generic-merge.js");
29
+ const v = __importStar(require("valibot"));
30
+ const check_type_conflicts_js_1 = require("./check-type-conflicts.js");
31
+ function mergeArrayConstraints(first, second, getRef) {
32
+ (0, check_type_conflicts_js_1.checkTypeConflicts)(first, second);
33
+ if (!('items' in first) && !('items' in second)) {
34
+ throw new Error('Cannot merge array constraints: no items found');
35
+ }
36
+ const result = {
37
+ ...(0, generic_merge_js_1.genericMerge)(first, second, getRef, v.array(v.any())),
38
+ type: 'array',
39
+ items: mergeItems(first, second, getRef)
40
+ };
41
+ // Merge minItems
42
+ if (first.minItems !== undefined || second.minItems !== undefined) {
43
+ const minA = first.minItems ?? 0;
44
+ const minB = second.minItems ?? 0;
45
+ result.minItems = Math.max(minA, minB);
46
+ }
47
+ // Merge maxItems
48
+ if (first.maxItems !== undefined || second.maxItems !== undefined) {
49
+ const maxA = first.maxItems ?? Infinity;
50
+ const maxB = second.maxItems ?? Infinity;
51
+ result.maxItems = Math.min(maxA, maxB);
52
+ }
53
+ // Merge uniqueItems
54
+ if (first.uniqueItems || second.uniqueItems) {
55
+ result.uniqueItems = true;
56
+ }
57
+ return result;
58
+ }
59
+ const mergeItems = (first, second, getRef) => {
60
+ if ('items' in first && 'items' in second && first.items && second.items) {
61
+ return (0, merge_js_1.mergeSchemasOrRefs)(first.items, second.items, getRef);
62
+ }
63
+ if ('items' in first && first.items) {
64
+ return first.items;
65
+ }
66
+ if ('items' in second && second.items) {
67
+ return second.items;
68
+ }
69
+ throw new Error('Cannot merge array constraints: no items found');
70
+ };
@@ -0,0 +1,4 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ import type { GetRefFn } from './types.js';
3
+ export declare function mergeBooleanConstraints(first: OpenAPIV3.SchemaObject, second: OpenAPIV3.SchemaObject, getRef: GetRefFn): OpenAPIV3.SchemaObject;
4
+ //# sourceMappingURL=merge-boolean-constraints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-boolean-constraints.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/merge-boolean-constraints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAG1C,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,CAAC,YAAY,EAC7B,MAAM,EAAE,SAAS,CAAC,YAAY,EAC9B,MAAM,EAAE,QAAQ,GACf,SAAS,CAAC,YAAY,CAIxB"}
@@ -0,0 +1,33 @@
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.mergeBooleanConstraints = mergeBooleanConstraints;
27
+ const generic_merge_js_1 = require("./generic-merge.js");
28
+ const v = __importStar(require("valibot"));
29
+ const check_type_conflicts_js_1 = require("./check-type-conflicts.js");
30
+ function mergeBooleanConstraints(first, second, getRef) {
31
+ (0, check_type_conflicts_js_1.checkTypeConflicts)(first, second);
32
+ return (0, generic_merge_js_1.genericMerge)(first, second, getRef, v.boolean());
33
+ }
@@ -0,0 +1,4 @@
1
+ import type { SchemaObject } from './types.js';
2
+ import * as v from 'valibot';
3
+ export declare function mergeEnumValues<T>(first: SchemaObject, second: SchemaObject, typeCheck?: v.GenericSchema<T>): Pick<SchemaObject, 'enum'>;
4
+ //# sourceMappingURL=merge-enum-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-enum-values.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/merge-enum-values.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,YAAY,EACpB,SAAS,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,GAC7B,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CA+B5B"}
@@ -0,0 +1,58 @@
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.mergeEnumValues = mergeEnumValues;
27
+ const is_equal_js_1 = require("./is-equal.js");
28
+ const v = __importStar(require("valibot"));
29
+ const containsEnum = (schema) => {
30
+ return Array.isArray(schema.enum);
31
+ };
32
+ function mergeEnumValues(first, second, typeCheck) {
33
+ if (!containsEnum(first) && !containsEnum(second)) {
34
+ return {};
35
+ }
36
+ if (!containsEnum(first) && containsEnum(second)) {
37
+ return {
38
+ enum: second.enum
39
+ };
40
+ }
41
+ if (containsEnum(first) && !containsEnum(second)) {
42
+ return {
43
+ enum: first.enum
44
+ };
45
+ }
46
+ // Find intersection of enum values
47
+ const intersection = first
48
+ .enum.filter(value => second.enum.some(bValue => (0, is_equal_js_1.isEqual)(value, bValue)))
49
+ .map(value => (typeCheck ? v.parse(typeCheck, value) : value));
50
+ // If intersection is empty, throw error
51
+ if (intersection.length === 0) {
52
+ throw new Error('Merged schema has empty enum array');
53
+ }
54
+ // Return merged schema with intersection of enum values
55
+ return {
56
+ enum: intersection
57
+ };
58
+ }
@@ -0,0 +1,4 @@
1
+ import type { OpenAPIV3 } from 'openapi-types';
2
+ import type { GetRefFn } from './types.js';
3
+ export declare function mergeIntegerConstraints(first: OpenAPIV3.SchemaObject, second: OpenAPIV3.SchemaObject, getRef: GetRefFn): OpenAPIV3.SchemaObject;
4
+ //# sourceMappingURL=merge-integer-constraints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-integer-constraints.d.ts","sourceRoot":"","sources":["../../../src/oas/_merge-all-of/merge-integer-constraints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAG1C,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,CAAC,YAAY,EAC7B,MAAM,EAAE,SAAS,CAAC,YAAY,EAC9B,MAAM,EAAE,QAAQ,GACf,SAAS,CAAC,YAAY,CA2CxB"}