@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
@@ -35,6 +35,15 @@ class OasNumber {
35
35
  writable: true,
36
36
  value: void 0
37
37
  });
38
+ /**
39
+ * The default value of the number.
40
+ */
41
+ Object.defineProperty(this, "default", {
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true,
45
+ value: void 0
46
+ });
38
47
  /**
39
48
  * A description of the number.
40
49
  */
@@ -69,11 +78,82 @@ class OasNumber {
69
78
  writable: true,
70
79
  value: void 0
71
80
  });
81
+ /**
82
+ * An array of allowed values for the number.
83
+ */
84
+ Object.defineProperty(this, "enums", {
85
+ enumerable: true,
86
+ configurable: true,
87
+ writable: true,
88
+ value: void 0
89
+ });
90
+ /**
91
+ * The format of the number.
92
+ */
93
+ Object.defineProperty(this, "format", {
94
+ enumerable: true,
95
+ configurable: true,
96
+ writable: true,
97
+ value: void 0
98
+ });
99
+ /**
100
+ * The multiple of the number.
101
+ */
102
+ Object.defineProperty(this, "multipleOf", {
103
+ enumerable: true,
104
+ configurable: true,
105
+ writable: true,
106
+ value: void 0
107
+ });
108
+ /**
109
+ * The maximum value of the number.
110
+ */
111
+ Object.defineProperty(this, "maximum", {
112
+ enumerable: true,
113
+ configurable: true,
114
+ writable: true,
115
+ value: void 0
116
+ });
117
+ /**
118
+ * Whether the maximum value is exclusive.
119
+ */
120
+ Object.defineProperty(this, "exclusiveMaximum", {
121
+ enumerable: true,
122
+ configurable: true,
123
+ writable: true,
124
+ value: void 0
125
+ });
126
+ /**
127
+ * The minimum value of the number.
128
+ */
129
+ Object.defineProperty(this, "minimum", {
130
+ enumerable: true,
131
+ configurable: true,
132
+ writable: true,
133
+ value: void 0
134
+ });
135
+ /**
136
+ * Whether the minimum value is exclusive.
137
+ */
138
+ Object.defineProperty(this, "exclusiveMinimum", {
139
+ enumerable: true,
140
+ configurable: true,
141
+ writable: true,
142
+ value: void 0
143
+ });
72
144
  this.title = fields.title;
73
145
  this.description = fields.description;
74
146
  this.nullable = fields.nullable;
147
+ this.default = fields.default;
75
148
  this.extensionFields = fields.extensionFields;
76
149
  this.example = fields.example;
150
+ this.enums = fields.enums;
151
+ this.format = fields.format;
152
+ this.multipleOf = fields.multipleOf;
153
+ this.maximum = fields.maximum;
154
+ this.exclusiveMaximum = fields.exclusiveMaximum;
155
+ this.minimum = fields.minimum;
156
+ this.exclusiveMinimum = fields.exclusiveMinimum;
77
157
  }
78
158
  isRef() {
79
159
  return false;
@@ -91,7 +171,14 @@ class OasNumber {
91
171
  title: this.title,
92
172
  description: this.description,
93
173
  nullable: this.nullable,
94
- example: this.example
174
+ example: this.example,
175
+ enum: this.enums,
176
+ format: this.format,
177
+ multipleOf: this.multipleOf,
178
+ maximum: this.maximum,
179
+ exclusiveMaximum: this.exclusiveMaximum,
180
+ minimum: this.minimum,
181
+ exclusiveMinimum: this.exclusiveMinimum
95
182
  };
96
183
  }
97
184
  }
@@ -1,10 +1,33 @@
1
- import { z } from '@hono/zod-openapi';
2
- export declare const oasNumberData: z.ZodType<OasNumberData>;
1
+ import * as v from 'valibot';
2
+ export declare const numberFormat: v.UnionSchema<[v.LiteralSchema<"float", undefined>, v.LiteralSchema<"double", undefined>], undefined>;
3
+ export declare const oasNumberData: v.ObjectSchema<{
4
+ readonly type: v.LiteralSchema<"number", undefined>;
5
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
6
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7
+ readonly default: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
8
+ readonly format: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"float", undefined>, v.LiteralSchema<"double", undefined>], undefined>, undefined>;
9
+ readonly enum: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
10
+ readonly nullable: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11
+ readonly example: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
12
+ readonly multipleOf: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
13
+ readonly maximum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
14
+ readonly exclusiveMaximum: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
15
+ readonly minimum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
16
+ readonly exclusiveMinimum: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
17
+ }, undefined>;
3
18
  export type OasNumberData = {
4
- oasType: 'schema';
19
+ type: 'number';
5
20
  title?: string;
6
21
  description?: string;
7
22
  default?: number;
8
- type: 'number';
23
+ format?: 'float' | 'double';
24
+ enum?: number[];
25
+ nullable?: boolean;
26
+ example?: number;
27
+ multipleOf?: number;
28
+ maximum?: number;
29
+ exclusiveMaximum?: boolean;
30
+ minimum?: number;
31
+ exclusiveMinimum?: boolean;
9
32
  };
10
33
  //# sourceMappingURL=number-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"number-types.d.ts","sourceRoot":"","sources":["../../../src/oas/number/number-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAErC,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAYjD,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,QAAQ,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA"}
1
+ {"version":3,"file":"number-types.d.ts","sourceRoot":"","sources":["../../../src/oas/number/number-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,YAAY,uGAAqD,CAAA;AAE9E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;aAcxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA"}
@@ -1,17 +1,43 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.oasNumberData = void 0;
4
- const zod_openapi_1 = require("@hono/zod-openapi");
5
- exports.oasNumberData = zod_openapi_1.z.object({
6
- oasType: zod_openapi_1.z.literal('schema'),
7
- title: zod_openapi_1.z.string().optional(),
8
- description: zod_openapi_1.z.string().optional(),
9
- default: zod_openapi_1.z.number().optional(),
10
- type: zod_openapi_1.z.literal('number')
11
- // Add soon
12
- // multipleOf: z.number().optional(),
13
- // maximum: z.number().optional(),
14
- // exclusiveMaximum: z.boolean().optional(),
15
- // minimum: z.number().optional(),
16
- // exclusiveMinimum: z.boolean().optional()
26
+ exports.oasNumberData = exports.numberFormat = void 0;
27
+ const v = __importStar(require("valibot"));
28
+ exports.numberFormat = v.union([v.literal('float'), v.literal('double')]);
29
+ exports.oasNumberData = v.object({
30
+ type: v.literal('number'),
31
+ title: v.optional(v.string()),
32
+ description: v.optional(v.string()),
33
+ default: v.optional(v.number()),
34
+ format: v.optional(exports.numberFormat),
35
+ enum: v.optional(v.array(v.number())),
36
+ nullable: v.optional(v.boolean()),
37
+ example: v.optional(v.number()),
38
+ multipleOf: v.optional(v.number()),
39
+ maximum: v.optional(v.number()),
40
+ exclusiveMaximum: v.optional(v.boolean()),
41
+ minimum: v.optional(v.number()),
42
+ exclusiveMinimum: v.optional(v.boolean())
17
43
  });
@@ -2,9 +2,9 @@ import type { OpenAPIV3 } from 'openapi-types';
2
2
  import type { ParseContext } from '../../context/ParseContext.js';
3
3
  import { OasNumber } from './Number.js';
4
4
  type ToNumberArgs = {
5
- value: OpenAPIV3.NonArraySchemaObject;
5
+ value: OpenAPIV3.SchemaObject;
6
6
  context: ParseContext;
7
7
  };
8
- export declare const toNumber: ({ value, context }: ToNumberArgs) => OasNumber;
8
+ export declare const toNumber: ({ context, value }: ToNumberArgs) => OasNumber;
9
9
  export {};
10
10
  //# sourceMappingURL=toNumber.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAe3D,CAAA"}
1
+ {"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAQvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA2B3D,CAAA"}
@@ -1,20 +1,89 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.toNumber = void 0;
4
27
  const Number_js_1 = require("./Number.js");
5
28
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
6
- const toNumber = ({ value, context }) => {
7
- const { type: _type, title, description, nullable, example, ...skipped } = value;
29
+ const v = __importStar(require("valibot"));
30
+ const number_types_js_1 = require("./number-types.js");
31
+ const parseNullable_js_1 = require("../_helpers/parseNullable.js");
32
+ const parseExample_js_1 = require("../_helpers/parseExample.js");
33
+ const parseEnum_js_1 = require("../_helpers/parseEnum.js");
34
+ const parseFormat_js_1 = require("../_helpers/parseFormat.js");
35
+ const toNumber = ({ context, value }) => {
36
+ const { nullable, value: valueWithoutNullable } = (0, parseNullable_js_1.parseNullable)({
37
+ value,
38
+ context
39
+ });
40
+ const { example, value: valueWithoutExample } = (0, parseExample_js_1.parseExample)({
41
+ value: valueWithoutNullable,
42
+ nullable,
43
+ valibotSchema: v.number(),
44
+ context
45
+ });
46
+ const { enum: enums, value: valueWithoutEnums } = (0, parseEnum_js_1.parseEnum)({
47
+ value: valueWithoutExample,
48
+ nullable,
49
+ valibotSchema: v.number(),
50
+ context
51
+ });
52
+ return toParsedNumber({
53
+ context,
54
+ nullable,
55
+ example,
56
+ enums,
57
+ value: valueWithoutEnums
58
+ });
59
+ };
60
+ exports.toNumber = toNumber;
61
+ const toParsedNumber = ({ context, nullable, example, enums, value: valueWithoutEnums }) => {
62
+ const { format, value: valueWithoutFormat } = (0, parseFormat_js_1.parseFormat)({
63
+ value: valueWithoutEnums,
64
+ valibotSchema: number_types_js_1.numberFormat,
65
+ context
66
+ });
67
+ const { type: _type, title, description, multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, default: defaultValue, ...skipped } = v.parse(number_types_js_1.oasNumberData, valueWithoutFormat);
8
68
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
9
69
  skipped,
10
- context
70
+ parent: valueWithoutEnums,
71
+ context,
72
+ parentType: 'schema:number'
11
73
  });
12
74
  return new Number_js_1.OasNumber({
13
75
  title,
14
76
  description,
15
77
  nullable,
78
+ default: defaultValue,
16
79
  extensionFields,
17
- example
80
+ example,
81
+ enums,
82
+ format,
83
+ multipleOf,
84
+ maximum,
85
+ exclusiveMaximum,
86
+ minimum,
87
+ exclusiveMinimum
18
88
  });
19
89
  };
20
- exports.toNumber = toNumber;
@@ -3,15 +3,22 @@ import type { OasRef } from '../ref/Ref.js';
3
3
  import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js';
4
4
  import type { CustomValue } from '../../types/CustomValue.js';
5
5
  import type { OpenAPIV3 } from 'openapi-types';
6
- export type OasObjectFields = {
6
+ export type OasObjectFields<Nullable extends boolean | undefined> = {
7
7
  title?: string;
8
8
  description?: string;
9
9
  properties?: Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
10
10
  required?: string[] | undefined;
11
+ default?: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
11
12
  additionalProperties?: boolean | OasSchema | OasRef<'schema'> | undefined;
12
- nullable?: boolean | undefined;
13
+ nullable: Nullable;
14
+ maxProperties?: number;
15
+ minProperties?: number;
16
+ enums?: Nullable extends true ? (Record<string, unknown> | null)[] | undefined : Record<string, unknown>[] | undefined;
13
17
  extensionFields?: Record<string, unknown>;
14
- example?: Record<string, unknown>;
18
+ example?: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
19
+ readOnly?: boolean;
20
+ writeOnly?: boolean;
21
+ deprecated?: boolean;
15
22
  };
16
23
  export type AddPropertyArgs = {
17
24
  name: string;
@@ -23,7 +30,7 @@ export type AddPropertyArgs = {
23
30
  *
24
31
  * Objects have fixed, named fields. Records have any number of fields that do not have predefined names.
25
32
  */
26
- export declare class OasObject {
33
+ export declare class OasObject<Nullable extends boolean | undefined = boolean | undefined> {
27
34
  /**
28
35
  * Object is part the 'schema' set which is used
29
36
  * to define data types in an OpenAPI document.
@@ -44,11 +51,11 @@ export declare class OasObject {
44
51
  /**
45
52
  * Indicates whether value can be null.
46
53
  */
47
- nullable: boolean | undefined;
54
+ nullable: Nullable;
48
55
  /**
49
56
  * A record which maps property names of the object to their schemas.
50
57
  */
51
- properties: Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
58
+ properties: Nullable extends true ? Record<string, OasSchema | OasRef<'schema'> | CustomValue> | null | undefined : Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
52
59
  /**
53
60
  * An array of required property names.
54
61
  */
@@ -64,10 +71,19 @@ export declare class OasObject {
64
71
  /**
65
72
  * An example of the object.
66
73
  */
67
- example: Record<string, unknown> | undefined;
68
- constructor(fields: OasObjectFields);
74
+ example: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
75
+ /**
76
+ * The default value of the object.
77
+ */
78
+ default: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
79
+ maxProperties?: number;
80
+ minProperties?: number;
81
+ readOnly?: boolean;
82
+ writeOnly?: boolean;
83
+ deprecated?: boolean;
84
+ constructor(fields: OasObjectFields<Nullable>);
69
85
  /** Creates new empty OasObject */
70
- static empty(): OasObject;
86
+ static empty(): OasObject<false>;
71
87
  /**
72
88
  * Adds a new property to the object.
73
89
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Object.d.ts","sourceRoot":"","sources":["../../../src/oas/object/Object.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAAG,SAAS,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,EAAE,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;IAQhC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,SAAS;IAmBnE;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAkBvC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;IAIxB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CA8B3E"}
@@ -101,6 +101,45 @@ class OasObject {
101
101
  writable: true,
102
102
  value: void 0
103
103
  });
104
+ /**
105
+ * The default value of the object.
106
+ */
107
+ Object.defineProperty(this, "default", {
108
+ enumerable: true,
109
+ configurable: true,
110
+ writable: true,
111
+ value: void 0
112
+ });
113
+ Object.defineProperty(this, "maxProperties", {
114
+ enumerable: true,
115
+ configurable: true,
116
+ writable: true,
117
+ value: void 0
118
+ });
119
+ Object.defineProperty(this, "minProperties", {
120
+ enumerable: true,
121
+ configurable: true,
122
+ writable: true,
123
+ value: void 0
124
+ });
125
+ Object.defineProperty(this, "readOnly", {
126
+ enumerable: true,
127
+ configurable: true,
128
+ writable: true,
129
+ value: void 0
130
+ });
131
+ Object.defineProperty(this, "writeOnly", {
132
+ enumerable: true,
133
+ configurable: true,
134
+ writable: true,
135
+ value: void 0
136
+ });
137
+ Object.defineProperty(this, "deprecated", {
138
+ enumerable: true,
139
+ configurable: true,
140
+ writable: true,
141
+ value: void 0
142
+ });
104
143
  this.title = fields.title;
105
144
  this.description = fields.description;
106
145
  this.properties = fields.properties;
@@ -109,10 +148,16 @@ class OasObject {
109
148
  this.nullable = fields.nullable;
110
149
  this.extensionFields = fields.extensionFields;
111
150
  this.example = fields.example;
151
+ this.default = fields.default;
152
+ this.maxProperties = fields.maxProperties;
153
+ this.minProperties = fields.minProperties;
154
+ this.readOnly = fields.readOnly;
155
+ this.deprecated = fields.deprecated;
112
156
  }
113
157
  /** Creates new empty OasObject */
114
158
  static empty() {
115
159
  return new OasObject({
160
+ nullable: false,
116
161
  properties: {},
117
162
  required: []
118
163
  });
@@ -189,10 +234,15 @@ class OasObject {
189
234
  ]))
190
235
  : undefined,
191
236
  required: this.required,
237
+ maxProperties: this.maxProperties,
238
+ minProperties: this.minProperties,
192
239
  additionalProperties: (0, ts_pattern_1.match)(this.additionalProperties)
193
240
  .with(ts_pattern_1.P.nullish, () => false)
194
241
  .with(ts_pattern_1.P.boolean, value => value)
195
- .otherwise(value => value.toJsonSchema(options))
242
+ .otherwise(value => value.toJsonSchema(options)),
243
+ readOnly: this.readOnly,
244
+ writeOnly: this.writeOnly,
245
+ deprecated: this.deprecated
196
246
  };
197
247
  }
198
248
  }
@@ -1,15 +1,19 @@
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 oasObjectData: z.ZodType<OasObjectData>;
4
+ export declare const oasObjectData: v.GenericSchema<OasObjectData>;
5
5
  export type OasObjectData = {
6
- oasType: 'schema';
7
6
  type: 'object';
8
7
  title?: string;
9
8
  description?: string;
10
9
  default?: Record<string, unknown>;
10
+ deprecated?: boolean;
11
+ maxProperties?: number;
12
+ minProperties?: number;
11
13
  properties?: Record<string, OasSchemaData | OasSchemaRefData>;
12
14
  required?: string[];
13
15
  additionalProperties?: boolean | OasSchemaData | OasSchemaRefData;
16
+ readOnly?: boolean;
17
+ writeOnly?: boolean;
14
18
  };
15
19
  //# sourceMappingURL=object-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"object-types.d.ts","sourceRoot":"","sources":["../../../src/oas/object/object-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AACrC,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OA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,aAAa,GAAG,gBAAgB,CAAC,CAAA;IAC7D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,oBAAoB,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,gBAAgB,CAAA;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA"}
@@ -1,30 +1,49 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.oasObjectData = void 0;
4
- const zod_openapi_1 = require("@hono/zod-openapi");
27
+ const v = __importStar(require("valibot"));
5
28
  const schema_types_js_1 = require("../schema/schema-types.js");
6
29
  const ref_types_js_1 = require("../ref/ref-types.js");
7
- exports.oasObjectData = zod_openapi_1.z.object({
8
- oasType: zod_openapi_1.z.literal('schema'),
9
- type: zod_openapi_1.z.literal('object'),
10
- title: zod_openapi_1.z.string().optional(),
11
- description: zod_openapi_1.z.string().optional(),
12
- default: zod_openapi_1.z.object({}).optional(),
13
- // Add soon
14
- // maxProperties: z.number().optional(),
15
- // Add soon
16
- // minProperties: z.number().optional(),
17
- properties: zod_openapi_1.z.lazy(() => {
18
- return zod_openapi_1.z.record(zod_openapi_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData])).optional();
19
- }),
30
+ exports.oasObjectData = v.object({
31
+ type: v.literal('object'),
32
+ title: v.optional(v.string()),
33
+ description: v.optional(v.string()),
34
+ default: v.optional(v.object({})),
35
+ deprecated: v.optional(v.boolean()),
36
+ maxProperties: v.optional(v.number()),
37
+ minProperties: v.optional(v.number()),
38
+ properties: v.optional(v.record(v.string(), v.union([v.lazy(() => schema_types_js_1.oasSchemaData), ref_types_js_1.oasSchemaRefData]))),
39
+ readOnly: v.optional(v.boolean()),
40
+ writeOnly: v.optional(v.boolean()),
20
41
  // Add soon
21
42
  // patternProperties: z.lazy(() => z.record(jsonSchema4).optional()),
22
- required: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
43
+ required: v.optional(v.array(v.string())),
23
44
  // allOf: z.lazy(() => z.array(oasObject).optional()),
24
45
  // Use oneOf instead of anyOf
25
46
  // anyOf: z.lazy(() => z.array(jsonSchema4).optional()),
26
47
  // oneOf: z.lazy(() => z.array(oasObject).optional()),
27
- additionalProperties: zod_openapi_1.z.lazy(() => {
28
- return zod_openapi_1.z.union([zod_openapi_1.z.boolean(), schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]).optional();
29
- })
48
+ additionalProperties: v.optional(v.union([v.boolean(), v.lazy(() => schema_types_js_1.oasSchemaData), ref_types_js_1.oasSchemaRefData]))
30
49
  });
@@ -2,7 +2,7 @@ import type { OpenAPIV3 } from 'openapi-types';
2
2
  import type { ParseContext } from '../../context/ParseContext.js';
3
3
  import { OasObject } from './Object.js';
4
4
  type ToObjectArgs = {
5
- value: OpenAPIV3.NonArraySchemaObject;
5
+ value: OpenAPIV3.SchemaObject;
6
6
  context: ParseContext;
7
7
  };
8
8
  export declare const toObject: ({ value, context }: ToObjectArgs) => OasObject;
@@ -1 +1 @@
1
- {"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAA;AAK7D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAqC3D,CAAA"}
1
+ {"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AASvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA2B3D,CAAA"}