@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,148 @@
1
+ import { isRef } from '../../helpers/refFns.js';
2
+ import { isEmpty } from 'lodash-es';
3
+ import { checkTypeConflicts } from './check-type-conflicts.js';
4
+ import { checkReadOnlyWriteOnlyConflicts } from './check-read-only-write-only-conflicts.js';
5
+ import { checkFormatConflicts } from './check-format-conflicts.js';
6
+ import { checkEnumConflicts } from './check-enum-conflicts.js';
7
+ import { checkNumberConstraintsConflicts } from './check-number-constraints-conflicts.js';
8
+ import { checkArrayItemTypeConflicts } from './check-array-item-type-conflicts.js';
9
+ import { mergeObjectConstraints } from './merge-object-constraints.js';
10
+ import { mergeArrayConstraints } from './merge-array-constraints.js';
11
+ import { mergeStringConstraints } from './merge-string-constraints.js';
12
+ import { mergeNumberConstraints } from './merge-number-constraints.js';
13
+ import { mergeIntegerConstraints } from './merge-integer-constraints.js';
14
+ import { mergeBooleanConstraints } from './merge-boolean-constraints.js';
15
+ import { genericMerge } from './generic-merge.js';
16
+ import { checkAtLeastOneTypeMatch } from './check-at-least-one-type-match.js';
17
+ import { mergeIntersection } from './merge-intersection.js';
18
+ import { mergeCrossProduct } from './merge-union.js';
19
+ export const mergeSchemasOrRefs = (first, second, getRef) => {
20
+ if (containsRef(first, second)) {
21
+ return mergeWithRef(first, second, getRef);
22
+ }
23
+ if (isRef(first)) {
24
+ throw new Error('Ref in first');
25
+ }
26
+ if (isRef(second)) {
27
+ throw new Error('Ref in second');
28
+ }
29
+ if (containsAllOf(first) || containsAllOf(second)) {
30
+ const mergedFirst = containsAllOf(first) ? mergeIntersection({ schema: first, getRef }) : first;
31
+ const mergedSecond = containsAllOf(second)
32
+ ? mergeIntersection({ schema: second, getRef })
33
+ : second;
34
+ return mergeSchemasOrRefs(mergedFirst, mergedSecond, getRef);
35
+ }
36
+ if (containsOneOf(first, second)) {
37
+ return mergeCrossProduct({ first, second, getRef, groupType: 'oneOf' });
38
+ }
39
+ if (containsAnyOf(first, second)) {
40
+ return mergeCrossProduct({ first, second, getRef, groupType: 'anyOf' });
41
+ }
42
+ return mergeSchemas(first, second, getRef);
43
+ };
44
+ const containsAllOf = (schema) => {
45
+ if (schema.allOf) {
46
+ if (schema.allOf?.length) {
47
+ return true;
48
+ }
49
+ throw new Error('Empty allOf');
50
+ }
51
+ return false;
52
+ };
53
+ const containsAnyOf = (first, second) => {
54
+ if (first.anyOf) {
55
+ if (first.anyOf?.length) {
56
+ return true;
57
+ }
58
+ throw new Error('Empty anyOf');
59
+ }
60
+ if (second.anyOf) {
61
+ if (second.anyOf?.length) {
62
+ return true;
63
+ }
64
+ throw new Error('Empty anyOf');
65
+ }
66
+ return false;
67
+ };
68
+ const containsOneOf = (first, second) => {
69
+ if (first.oneOf) {
70
+ if (first.oneOf?.length) {
71
+ return true;
72
+ }
73
+ throw new Error('Empty oneOf');
74
+ }
75
+ if (second.oneOf) {
76
+ if (second.oneOf?.length) {
77
+ return true;
78
+ }
79
+ throw new Error('Empty oneOf');
80
+ }
81
+ return false;
82
+ };
83
+ const containsRef = (first, second) => {
84
+ return isRef(first) || isRef(second);
85
+ };
86
+ const mergeSchemas = (first, second, getRef) => {
87
+ try {
88
+ checkTypeConflicts(first, second);
89
+ }
90
+ catch (e) {
91
+ throw e;
92
+ }
93
+ checkReadOnlyWriteOnlyConflicts(first, second);
94
+ checkFormatConflicts(first, second);
95
+ checkEnumConflicts(first, second);
96
+ checkNumberConstraintsConflicts(first, second);
97
+ checkArrayItemTypeConflicts(first, second);
98
+ if (first.not || second.not) {
99
+ throw new Error('Merging schemas with "not" keyword is not supported');
100
+ }
101
+ return typedMerge(first, second, getRef);
102
+ };
103
+ const typedMerge = (first, second, getRef) => {
104
+ if (!first.type && !second.type) {
105
+ return genericMerge(first, second, getRef);
106
+ }
107
+ if (checkAtLeastOneTypeMatch(first, second, 'object')) {
108
+ return mergeObjectConstraints(first, second, getRef);
109
+ }
110
+ if (checkAtLeastOneTypeMatch(first, second, 'array')) {
111
+ return mergeArrayConstraints(first, second, getRef);
112
+ }
113
+ if (checkAtLeastOneTypeMatch(first, second, 'string')) {
114
+ return mergeStringConstraints(first, second, getRef);
115
+ }
116
+ if (checkAtLeastOneTypeMatch(first, second, 'number')) {
117
+ return mergeNumberConstraints(first, second, getRef);
118
+ }
119
+ if (checkAtLeastOneTypeMatch(first, second, 'integer')) {
120
+ return mergeIntegerConstraints(first, second, getRef);
121
+ }
122
+ if (checkAtLeastOneTypeMatch(first, second, 'boolean')) {
123
+ return mergeBooleanConstraints(first, second, getRef);
124
+ }
125
+ throw new Error(`Cannot merge schemas with type "${first.type}" with type "${second.type}"`);
126
+ };
127
+ const mergeWithRef = (first, second, getRef) => {
128
+ if (isRef(first) && isRef(second)) {
129
+ if (first.$ref === second.$ref) {
130
+ return {
131
+ ...first,
132
+ ...second
133
+ };
134
+ }
135
+ else {
136
+ return mergeSchemas(getRef(first), getRef(second), getRef);
137
+ }
138
+ }
139
+ if (isRef(first) && !isRef(second)) {
140
+ const merged = isEmpty(second) ? first : mergeSchemas(getRef(first), second, getRef);
141
+ return merged;
142
+ }
143
+ if (!isRef(first) && isRef(second)) {
144
+ const merged = isEmpty(first) ? second : mergeSchemas(first, getRef(second), getRef);
145
+ return merged;
146
+ }
147
+ throw new Error('Invalid input');
148
+ };
@@ -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,2 @@
1
+ import * as v from 'valibot';
2
+ export const 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":["../../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,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,iBAAiB;CAexE"}
@@ -84,6 +84,42 @@ export class OasArray {
84
84
  writable: true,
85
85
  value: void 0
86
86
  });
87
+ /**
88
+ * The maximum number of items in the array.
89
+ */
90
+ Object.defineProperty(this, "maxItems", {
91
+ enumerable: true,
92
+ configurable: true,
93
+ writable: true,
94
+ value: void 0
95
+ });
96
+ /**
97
+ * The minimum number of items in the array.
98
+ */
99
+ Object.defineProperty(this, "minItems", {
100
+ enumerable: true,
101
+ configurable: true,
102
+ writable: true,
103
+ value: void 0
104
+ });
105
+ /**
106
+ * The enum values for the array.
107
+ */
108
+ Object.defineProperty(this, "enums", {
109
+ enumerable: true,
110
+ configurable: true,
111
+ writable: true,
112
+ value: void 0
113
+ });
114
+ /**
115
+ * The default value for the array.
116
+ */
117
+ Object.defineProperty(this, "defaultValue", {
118
+ enumerable: true,
119
+ configurable: true,
120
+ writable: true,
121
+ value: void 0
122
+ });
87
123
  this.items = fields.items;
88
124
  this.title = fields.title;
89
125
  this.description = fields.description;
@@ -91,6 +127,10 @@ export class OasArray {
91
127
  this.uniqueItems = fields.uniqueItems;
92
128
  this.extensionFields = fields.extensionFields;
93
129
  this.example = fields.example;
130
+ this.maxItems = fields.maxItems;
131
+ this.minItems = fields.minItems;
132
+ this.enums = fields.enums;
133
+ this.defaultValue = fields.defaultValue;
94
134
  }
95
135
  isRef() {
96
136
  return false;
@@ -106,9 +146,14 @@ export class OasArray {
106
146
  type: 'array',
107
147
  items: this.items.toJsonSchema(options),
108
148
  title: this.title,
149
+ enum: this.enums,
109
150
  description: this.description,
110
151
  nullable: this.nullable,
111
- example: this.example
152
+ example: this.example,
153
+ maxItems: this.maxItems,
154
+ minItems: this.minItems,
155
+ uniqueItems: this.uniqueItems,
156
+ default: this.defaultValue
112
157
  };
113
158
  }
114
159
  }
@@ -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,17 +1,14 @@
1
- import { z } from '@hono/zod-openapi';
1
+ import * as v from 'valibot';
2
2
  import { oasSchemaData } from '../schema/schema-types.js';
3
3
  import { oasSchemaRefData } from '../ref/ref-types.js';
4
- export const oasArrayData = z.object({
5
- oasType: z.literal('schema'),
6
- // Add soon
7
- type: z.literal('array'),
8
- // additionalItems: z.lazy(() => z.union([z.boolean(), jsonSchema4]).optional()),
9
- items: z.lazy(() => z.union([oasSchemaData, oasSchemaRefData])),
10
- title: z.string().optional(),
11
- description: z.string().optional(),
12
- default: z.array(z.unknown()).optional()
13
- // Add soon
14
- // maxItems: z.number().optional(),
15
- // minItems: z.number().optional(),
16
- // uniqueItems: z.boolean().optional()
4
+ export const oasArrayData = v.object({
5
+ type: v.literal('array'),
6
+ items: v.lazy(() => v.union([v.lazy(() => oasSchemaData), oasSchemaRefData])),
7
+ title: v.optional(v.string()),
8
+ description: v.optional(v.string()),
9
+ default: v.optional(v.array(v.unknown())),
10
+ maxItems: v.optional(v.number()),
11
+ minItems: v.optional(v.number()),
12
+ uniqueItems: v.optional(v.boolean()),
13
+ enums: v.optional(v.array(v.unknown()))
17
14
  });
@@ -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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AAQ,CAAC,KAAG,QAAQ,CAAC,QAAQ,CAyCjD,CAAA"}
@@ -1,16 +1,70 @@
1
1
  import { OasArray } from './Array.js';
2
2
  import { toSchemaV3 } from '../schema/toSchemasV3.js';
3
3
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
4
+ import { parseNullable } from '../_helpers/parseNullable.js';
5
+ import { parseExample } from '../_helpers/parseExample.js';
6
+ import { parseEnum } from '../_helpers/parseEnum.js';
7
+ import * as v from 'valibot';
8
+ import { oasArrayData } from './array-types.js';
9
+ import { parseDefault } from '../_helpers/parseDefault.js';
4
10
  export const toArray = ({ value, context }) => {
5
- const { type: _type, items, title, description, nullable, uniqueItems, example, ...skipped } = value;
6
- const extensionFields = toSpecificationExtensionsV3({ skipped, context });
11
+ const { nullable, value: valueWithoutNullable } = parseNullable({
12
+ value,
13
+ context
14
+ });
15
+ const { example, value: valueWithoutExample } = parseExample({
16
+ value: valueWithoutNullable,
17
+ nullable,
18
+ valibotSchema: v.array(v.any()),
19
+ context
20
+ });
21
+ const { enum: enums, value: valueWithoutEnums } = parseEnum({
22
+ value: valueWithoutExample,
23
+ nullable,
24
+ valibotSchema: v.array(v.any()),
25
+ context
26
+ });
27
+ const { default: defaultValue, value: valueWithoutDefault } = parseDefault({
28
+ value: valueWithoutEnums,
29
+ nullable,
30
+ valibotSchema: v.array(v.any()),
31
+ context
32
+ });
33
+ return toParsedArray({
34
+ context,
35
+ nullable,
36
+ example,
37
+ enums,
38
+ defaultValue,
39
+ value: valueWithoutDefault
40
+ });
41
+ };
42
+ export const toParsedArray = ({ context, nullable, example, enums, defaultValue, value }) => {
43
+ // We only want parse non-items fields here since items is handled below
44
+ const { items, ...rest } = value;
45
+ const oasArrayDataSchemaWithItems = v.omit(oasArrayData, ['items']);
46
+ const { type: _type, title, description, uniqueItems, maxItems, minItems, ...skipped } = v.parse(oasArrayDataSchemaWithItems, rest);
47
+ const extensionFields = toSpecificationExtensionsV3({
48
+ skipped,
49
+ parent: value,
50
+ context,
51
+ parentType: 'schema:array'
52
+ });
53
+ // if (!items) {
54
+ // console.log(JSON.stringify(value, null, 2))
55
+ // throw new Error('No items')
56
+ // }
7
57
  return new OasArray({
8
58
  title,
9
59
  description,
10
60
  nullable,
11
- uniqueItems,
61
+ defaultValue,
12
62
  items: context.trace('items', () => toSchemaV3({ schema: items, context })),
13
63
  extensionFields,
14
- example
64
+ example,
65
+ uniqueItems,
66
+ maxItems,
67
+ minItems,
68
+ enums
15
69
  });
16
70
  };
@@ -2,17 +2,19 @@ import "../../_dnt.polyfills.js";
2
2
  import type { OpenAPIV3 } from 'openapi-types';
3
3
  import type { OasRef } from '../ref/Ref.js';
4
4
  import type { ToJsonSchemaOptions } from '../schema/Schema.js';
5
- export type BooleanFields = {
5
+ export type BooleanFields<Nullable extends boolean | undefined> = {
6
6
  title?: string;
7
7
  description?: string;
8
- nullable?: boolean;
8
+ nullable: Nullable;
9
9
  extensionFields?: Record<string, unknown>;
10
- example?: boolean;
10
+ example?: Nullable extends true ? boolean | null | undefined : boolean | undefined;
11
+ enum?: Nullable extends true ? (boolean | null)[] | undefined : boolean[] | undefined;
12
+ default?: Nullable extends true ? boolean | null | undefined : boolean | undefined;
11
13
  };
12
14
  /**
13
15
  * Object representing a boolean in the OpenAPI Specification.
14
16
  */
15
- export declare class OasBoolean {
17
+ export declare class OasBoolean<Nullable extends boolean | undefined = boolean | undefined> {
16
18
  /**
17
19
  * Object is part the 'schema' set which is used
18
20
  * to define data types in an OpenAPI document.
@@ -33,17 +35,25 @@ export declare class OasBoolean {
33
35
  /**
34
36
  * Indicates whether value can be null.
35
37
  */
36
- nullable: boolean | undefined;
38
+ nullable: Nullable;
37
39
  /** Specification Extension fields */
38
40
  extensionFields: Record<string, unknown> | undefined;
39
41
  /**
40
42
  * An example of the boolean.
41
43
  */
42
- example: boolean | undefined;
43
- constructor(fields: BooleanFields);
44
+ example: Nullable extends true ? boolean | null | undefined : boolean | undefined;
45
+ /**
46
+ * Possible values the boolean can have
47
+ */
48
+ enum: Nullable extends true ? (boolean | null)[] | undefined : boolean[] | undefined;
49
+ /**
50
+ * The default value of the boolean.
51
+ */
52
+ default: Nullable extends true ? boolean | null | undefined : boolean | undefined;
53
+ constructor(fields: BooleanFields<Nullable>);
44
54
  isRef(): this is OasRef<'schema'>;
45
- resolve(): OasBoolean;
46
- resolveOnce(): OasBoolean;
55
+ resolve(): OasBoolean<Nullable>;
56
+ resolveOnce(): OasBoolean<Nullable>;
47
57
  toJsonSchema(options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject;
48
58
  }
49
59
  //# sourceMappingURL=Boolean.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/Boolean.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,YAAqB;IACzB;;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;IAE7B,qCAAqC;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EG;AACH,qBAAa,UAAU,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;IAChF;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,YAAqB;IACzB;;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;IAElB,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACpD;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAEjF;;OAEG;IACH,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACpF;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;gBAErE,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC;IAU3C,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC;IAI/B,WAAW,IAAI,UAAU,CAAC,QAAQ,CAAC;IAKnC,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CAW5E"}
@@ -66,11 +66,31 @@ export class OasBoolean {
66
66
  writable: true,
67
67
  value: void 0
68
68
  });
69
+ /**
70
+ * Possible values the boolean can have
71
+ */
72
+ Object.defineProperty(this, "enum", {
73
+ enumerable: true,
74
+ configurable: true,
75
+ writable: true,
76
+ value: void 0
77
+ });
78
+ /**
79
+ * The default value of the boolean.
80
+ */
81
+ Object.defineProperty(this, "default", {
82
+ enumerable: true,
83
+ configurable: true,
84
+ writable: true,
85
+ value: void 0
86
+ });
69
87
  this.title = fields.title;
70
88
  this.description = fields.description;
71
89
  this.nullable = fields.nullable;
72
90
  this.extensionFields = fields.extensionFields;
73
91
  this.example = fields.example;
92
+ this.enum = fields.enum;
93
+ this.default = fields.default;
74
94
  }
75
95
  isRef() {
76
96
  return false;
@@ -88,7 +108,9 @@ export class OasBoolean {
88
108
  title: this.title,
89
109
  description: this.description,
90
110
  nullable: this.nullable,
91
- example: this.example
111
+ example: this.example,
112
+ enum: this.enum,
113
+ default: this.default
92
114
  };
93
115
  }
94
116
  }
@@ -1,10 +1,10 @@
1
- import { z } from '@hono/zod-openapi';
2
- export declare const oasBooleanData: z.ZodType<OasBooleanData>;
1
+ import * as v from 'valibot';
2
+ export declare const oasBooleanData: v.GenericSchema<OasBooleanData>;
3
3
  export type OasBooleanData = {
4
- oasType: 'schema';
4
+ type: 'boolean';
5
5
  title?: string;
6
6
  description?: string;
7
7
  default?: boolean;
8
- type: 'boolean';
8
+ enum?: boolean[];
9
9
  };
10
10
  //# sourceMappingURL=boolean-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-types.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/boolean-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAMnD,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,QAAQ,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA"}
1
+ {"version":3,"file":"boolean-types.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/boolean-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAMzD,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;CACjB,CAAA"}
@@ -1,8 +1,8 @@
1
- import { z } from '@hono/zod-openapi';
2
- export const oasBooleanData = z.object({
3
- oasType: z.literal('schema'),
4
- title: z.string().optional(),
5
- description: z.string().optional(),
6
- default: z.boolean().optional(),
7
- type: z.literal('boolean')
1
+ import * as v from 'valibot';
2
+ export const oasBooleanData = v.object({
3
+ type: v.literal('boolean'),
4
+ title: v.optional(v.string()),
5
+ description: v.optional(v.string()),
6
+ default: v.optional(v.boolean()),
7
+ enum: v.optional(v.array(v.boolean()))
8
8
  });