@skmtc/core 0.0.800 → 0.0.803

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 (291) hide show
  1. package/esm/context/CoreContext.d.ts +2 -2
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/GenerateContext.d.ts +16 -3
  4. package/esm/context/GenerateContext.d.ts.map +1 -1
  5. package/esm/context/ParseContext.d.ts +3 -3
  6. package/esm/context/ParseContext.d.ts.map +1 -1
  7. package/esm/context/RenderContext.d.ts +153 -1
  8. package/esm/context/RenderContext.d.ts.map +1 -1
  9. package/esm/context/RenderContext.js +179 -0
  10. package/esm/context/types.d.ts +30 -0
  11. package/esm/context/types.d.ts.map +1 -1
  12. package/esm/dsl/model/ModelBase.d.ts +1 -1
  13. package/esm/dsl/model/ModelBase.d.ts.map +1 -1
  14. package/esm/dsl/model/ModelDriver.d.ts +62 -0
  15. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  16. package/esm/dsl/model/ModelDriver.js +63 -1
  17. package/esm/dsl/model/toModelBase.d.ts +66 -0
  18. package/esm/dsl/model/toModelBase.d.ts.map +1 -1
  19. package/esm/dsl/model/toModelBase.js +46 -0
  20. package/esm/dsl/model/toModelEntry.d.ts +63 -0
  21. package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
  22. package/esm/dsl/model/toModelEntry.js +63 -0
  23. package/esm/dsl/operation/OperationBase.d.ts +3 -3
  24. package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
  25. package/esm/dsl/operation/OperationDriver.d.ts +84 -0
  26. package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
  27. package/esm/dsl/operation/OperationDriver.js +85 -1
  28. package/esm/dsl/operation/toOperationBase.d.ts +58 -0
  29. package/esm/dsl/operation/toOperationBase.d.ts.map +1 -1
  30. package/esm/dsl/operation/toOperationBase.js +46 -0
  31. package/esm/dsl/operation/toOperationEntry.d.ts +37 -0
  32. package/esm/dsl/operation/toOperationEntry.d.ts.map +1 -1
  33. package/esm/dsl/operation/toOperationEntry.js +28 -0
  34. package/esm/helpers/isEmpty.d.ts +1 -1
  35. package/esm/helpers/isEmpty.d.ts.map +1 -1
  36. package/esm/helpers/tracer.d.ts +1 -1
  37. package/esm/helpers/tracer.d.ts.map +1 -1
  38. package/esm/helpers/tracer.js +1 -1
  39. package/esm/mod.d.ts +52 -0
  40. package/esm/mod.d.ts.map +1 -1
  41. package/esm/mod.js +52 -0
  42. package/esm/oas/array/Array.d.ts +26 -0
  43. package/esm/oas/array/Array.d.ts.map +1 -1
  44. package/esm/oas/array/Array.js +26 -0
  45. package/esm/oas/array/array-types.d.ts +32 -11
  46. package/esm/oas/array/array-types.d.ts.map +1 -1
  47. package/esm/oas/array/array-types.js +16 -0
  48. package/esm/oas/array/toArray.d.ts +111 -0
  49. package/esm/oas/array/toArray.d.ts.map +1 -1
  50. package/esm/oas/array/toArray.js +115 -3
  51. package/esm/oas/boolean/Boolean.d.ts +26 -0
  52. package/esm/oas/boolean/Boolean.d.ts.map +1 -1
  53. package/esm/oas/boolean/Boolean.js +26 -0
  54. package/esm/oas/boolean/boolean-types.d.ts +1 -7
  55. package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
  56. package/esm/oas/boolean/toBoolean.d.ts +57 -0
  57. package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
  58. package/esm/oas/boolean/toBoolean.js +57 -0
  59. package/esm/oas/components/components-types.d.ts +19 -0
  60. package/esm/oas/components/components-types.d.ts.map +1 -0
  61. package/esm/oas/components/components-types.js +21 -0
  62. package/esm/oas/contact/contact-types.d.ts +9 -0
  63. package/esm/oas/contact/contact-types.d.ts.map +1 -0
  64. package/esm/oas/contact/contact-types.js +7 -0
  65. package/esm/oas/discriminator/discriminator-types.d.ts +1 -5
  66. package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
  67. package/esm/oas/document/document-types.d.ts +16 -0
  68. package/esm/oas/document/document-types.d.ts.map +1 -0
  69. package/esm/oas/document/document-types.js +18 -0
  70. package/esm/oas/example/example-types.d.ts +1 -6
  71. package/esm/oas/example/example-types.d.ts.map +1 -1
  72. package/esm/oas/header/header-types.d.ts +50 -0
  73. package/esm/oas/header/header-types.d.ts.map +1 -0
  74. package/esm/oas/header/header-types.js +30 -0
  75. package/esm/oas/info/info-types.d.ts +14 -0
  76. package/esm/oas/info/info-types.d.ts.map +1 -0
  77. package/esm/oas/info/info-types.js +13 -0
  78. package/esm/oas/integer/integer-types.d.ts +3 -17
  79. package/esm/oas/integer/integer-types.d.ts.map +1 -1
  80. package/esm/oas/license/license-types.d.ts +9 -0
  81. package/esm/oas/license/license-types.d.ts.map +1 -0
  82. package/esm/oas/license/license-types.js +7 -0
  83. package/esm/oas/mediaType/mediaType-types.d.ts +1 -11
  84. package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
  85. package/esm/oas/number/number-types.d.ts +2 -16
  86. package/esm/oas/number/number-types.d.ts.map +1 -1
  87. package/esm/oas/number/toNumber.d.ts +62 -0
  88. package/esm/oas/number/toNumber.d.ts.map +1 -1
  89. package/esm/oas/number/toNumber.js +62 -0
  90. package/esm/oas/operation/operation-types.d.ts +22 -0
  91. package/esm/oas/operation/operation-types.d.ts.map +1 -0
  92. package/esm/oas/operation/operation-types.js +35 -0
  93. package/esm/oas/parameter/Parameter.d.ts +47 -0
  94. package/esm/oas/parameter/Parameter.d.ts.map +1 -1
  95. package/esm/oas/parameter/Parameter.js +47 -0
  96. package/esm/oas/parameter/parameter-types.d.ts +3 -58
  97. package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
  98. package/esm/oas/pathItem/pathItem-types.d.ts +12 -0
  99. package/esm/oas/pathItem/pathItem-types.d.ts.map +1 -0
  100. package/esm/oas/pathItem/pathItem-types.js +12 -0
  101. package/esm/oas/requestBody/requestBody-types.d.ts +10 -0
  102. package/esm/oas/requestBody/requestBody-types.d.ts.map +1 -0
  103. package/esm/oas/requestBody/requestBody-types.js +9 -0
  104. package/esm/oas/response/response-types.d.ts +12 -0
  105. package/esm/oas/response/response-types.d.ts.map +1 -0
  106. package/esm/oas/response/response-types.js +11 -0
  107. package/esm/oas/schema/toSchemasV3.js +2 -2
  108. package/esm/oas/server/toServerV3.d.ts.map +1 -1
  109. package/esm/oas/string/string-types.d.ts +2 -29
  110. package/esm/oas/string/string-types.d.ts.map +1 -1
  111. package/esm/oas/string/toString.d.ts +125 -1
  112. package/esm/oas/string/toString.d.ts.map +1 -1
  113. package/esm/oas/string/toString.js +119 -0
  114. package/esm/oas/tag/tag-types.d.ts +8 -0
  115. package/esm/oas/tag/tag-types.d.ts.map +1 -0
  116. package/esm/oas/tag/tag-types.js +8 -0
  117. package/esm/oas/union/union-types.d.ts +1 -12
  118. package/esm/oas/union/union-types.d.ts.map +1 -1
  119. package/esm/oas/unknown/unknown-types.d.ts +1 -7
  120. package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
  121. package/esm/types/CustomValue.d.ts +58 -0
  122. package/esm/types/CustomValue.d.ts.map +1 -1
  123. package/esm/types/CustomValue.js +58 -0
  124. package/esm/types/DenoJson.d.ts +24 -0
  125. package/esm/types/DenoJson.d.ts.map +1 -1
  126. package/esm/types/DenoJson.js +12 -0
  127. package/esm/types/Enrichments.d.ts +103 -0
  128. package/esm/types/Enrichments.d.ts.map +1 -1
  129. package/esm/types/Enrichments.js +52 -0
  130. package/esm/types/GeneratedValue.d.ts +17 -0
  131. package/esm/types/GeneratedValue.d.ts.map +1 -1
  132. package/esm/types/Logger.d.ts +9 -0
  133. package/esm/types/Logger.d.ts.map +1 -0
  134. package/esm/types/Logger.js +1 -0
  135. package/esm/types/Preview.d.ts +37 -0
  136. package/esm/types/Preview.d.ts.map +1 -1
  137. package/esm/types/Preview.js +37 -0
  138. package/esm/types/Settings.d.ts +35 -0
  139. package/esm/types/Settings.d.ts.map +1 -1
  140. package/esm/types/Settings.js +27 -0
  141. package/esm/typescript/FunctionParameter.d.ts +4 -4
  142. package/esm/typescript/FunctionParameter.d.ts.map +1 -1
  143. package/esm/typescript/List.d.ts +40 -2
  144. package/esm/typescript/List.d.ts.map +1 -1
  145. package/esm/typescript/List.js +32 -0
  146. package/package.json +1 -1
  147. package/script/context/CoreContext.d.ts +2 -2
  148. package/script/context/CoreContext.d.ts.map +1 -1
  149. package/script/context/GenerateContext.d.ts +16 -3
  150. package/script/context/GenerateContext.d.ts.map +1 -1
  151. package/script/context/ParseContext.d.ts +3 -3
  152. package/script/context/ParseContext.d.ts.map +1 -1
  153. package/script/context/RenderContext.d.ts +153 -1
  154. package/script/context/RenderContext.d.ts.map +1 -1
  155. package/script/context/RenderContext.js +179 -0
  156. package/script/context/types.d.ts +30 -0
  157. package/script/context/types.d.ts.map +1 -1
  158. package/script/dsl/model/ModelBase.d.ts +1 -1
  159. package/script/dsl/model/ModelBase.d.ts.map +1 -1
  160. package/script/dsl/model/ModelDriver.d.ts +62 -0
  161. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  162. package/script/dsl/model/ModelDriver.js +63 -1
  163. package/script/dsl/model/toModelBase.d.ts +66 -0
  164. package/script/dsl/model/toModelBase.d.ts.map +1 -1
  165. package/script/dsl/model/toModelBase.js +46 -0
  166. package/script/dsl/model/toModelEntry.d.ts +63 -0
  167. package/script/dsl/model/toModelEntry.d.ts.map +1 -1
  168. package/script/dsl/model/toModelEntry.js +63 -0
  169. package/script/dsl/operation/OperationBase.d.ts +3 -3
  170. package/script/dsl/operation/OperationBase.d.ts.map +1 -1
  171. package/script/dsl/operation/OperationDriver.d.ts +84 -0
  172. package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
  173. package/script/dsl/operation/OperationDriver.js +85 -1
  174. package/script/dsl/operation/toOperationBase.d.ts +58 -0
  175. package/script/dsl/operation/toOperationBase.d.ts.map +1 -1
  176. package/script/dsl/operation/toOperationBase.js +46 -0
  177. package/script/dsl/operation/toOperationEntry.d.ts +37 -0
  178. package/script/dsl/operation/toOperationEntry.d.ts.map +1 -1
  179. package/script/dsl/operation/toOperationEntry.js +28 -0
  180. package/script/helpers/isEmpty.d.ts +1 -1
  181. package/script/helpers/isEmpty.d.ts.map +1 -1
  182. package/script/helpers/tracer.d.ts +1 -1
  183. package/script/helpers/tracer.d.ts.map +1 -1
  184. package/script/helpers/tracer.js +1 -1
  185. package/script/mod.d.ts +52 -0
  186. package/script/mod.d.ts.map +1 -1
  187. package/script/mod.js +52 -0
  188. package/script/oas/array/Array.d.ts +26 -0
  189. package/script/oas/array/Array.d.ts.map +1 -1
  190. package/script/oas/array/Array.js +26 -0
  191. package/script/oas/array/array-types.d.ts +32 -11
  192. package/script/oas/array/array-types.d.ts.map +1 -1
  193. package/script/oas/array/array-types.js +17 -1
  194. package/script/oas/array/toArray.d.ts +111 -0
  195. package/script/oas/array/toArray.d.ts.map +1 -1
  196. package/script/oas/array/toArray.js +114 -2
  197. package/script/oas/boolean/Boolean.d.ts +26 -0
  198. package/script/oas/boolean/Boolean.d.ts.map +1 -1
  199. package/script/oas/boolean/Boolean.js +26 -0
  200. package/script/oas/boolean/boolean-types.d.ts +1 -7
  201. package/script/oas/boolean/boolean-types.d.ts.map +1 -1
  202. package/script/oas/boolean/toBoolean.d.ts +57 -0
  203. package/script/oas/boolean/toBoolean.d.ts.map +1 -1
  204. package/script/oas/boolean/toBoolean.js +57 -0
  205. package/script/oas/components/components-types.d.ts +19 -0
  206. package/script/oas/components/components-types.d.ts.map +1 -0
  207. package/script/oas/components/components-types.js +57 -0
  208. package/script/oas/contact/contact-types.d.ts +9 -0
  209. package/script/oas/contact/contact-types.d.ts.map +1 -0
  210. package/script/oas/contact/contact-types.js +43 -0
  211. package/script/oas/discriminator/discriminator-types.d.ts +1 -5
  212. package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
  213. package/script/oas/document/document-types.d.ts +16 -0
  214. package/script/oas/document/document-types.d.ts.map +1 -0
  215. package/script/oas/document/document-types.js +54 -0
  216. package/script/oas/example/example-types.d.ts +1 -6
  217. package/script/oas/example/example-types.d.ts.map +1 -1
  218. package/script/oas/header/header-types.d.ts +50 -0
  219. package/script/oas/header/header-types.d.ts.map +1 -0
  220. package/script/oas/header/header-types.js +66 -0
  221. package/script/oas/info/info-types.d.ts +14 -0
  222. package/script/oas/info/info-types.d.ts.map +1 -0
  223. package/script/oas/info/info-types.js +49 -0
  224. package/script/oas/integer/integer-types.d.ts +3 -17
  225. package/script/oas/integer/integer-types.d.ts.map +1 -1
  226. package/script/oas/license/license-types.d.ts +9 -0
  227. package/script/oas/license/license-types.d.ts.map +1 -0
  228. package/script/oas/license/license-types.js +43 -0
  229. package/script/oas/mediaType/mediaType-types.d.ts +1 -11
  230. package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
  231. package/script/oas/number/number-types.d.ts +2 -16
  232. package/script/oas/number/number-types.d.ts.map +1 -1
  233. package/script/oas/number/toNumber.d.ts +62 -0
  234. package/script/oas/number/toNumber.d.ts.map +1 -1
  235. package/script/oas/number/toNumber.js +62 -0
  236. package/script/oas/operation/operation-types.d.ts +22 -0
  237. package/script/oas/operation/operation-types.d.ts.map +1 -0
  238. package/script/oas/operation/operation-types.js +71 -0
  239. package/script/oas/parameter/Parameter.d.ts +47 -0
  240. package/script/oas/parameter/Parameter.d.ts.map +1 -1
  241. package/script/oas/parameter/Parameter.js +47 -0
  242. package/script/oas/parameter/parameter-types.d.ts +3 -58
  243. package/script/oas/parameter/parameter-types.d.ts.map +1 -1
  244. package/script/oas/pathItem/pathItem-types.d.ts +12 -0
  245. package/script/oas/pathItem/pathItem-types.d.ts.map +1 -0
  246. package/script/oas/pathItem/pathItem-types.js +48 -0
  247. package/script/oas/requestBody/requestBody-types.d.ts +10 -0
  248. package/script/oas/requestBody/requestBody-types.d.ts.map +1 -0
  249. package/script/oas/requestBody/requestBody-types.js +45 -0
  250. package/script/oas/response/response-types.d.ts +12 -0
  251. package/script/oas/response/response-types.d.ts.map +1 -0
  252. package/script/oas/response/response-types.js +47 -0
  253. package/script/oas/schema/toSchemasV3.js +2 -2
  254. package/script/oas/server/toServerV3.d.ts.map +1 -1
  255. package/script/oas/string/string-types.d.ts +2 -29
  256. package/script/oas/string/string-types.d.ts.map +1 -1
  257. package/script/oas/string/toString.d.ts +125 -1
  258. package/script/oas/string/toString.d.ts.map +1 -1
  259. package/script/oas/string/toString.js +119 -0
  260. package/script/oas/tag/tag-types.d.ts +8 -0
  261. package/script/oas/tag/tag-types.d.ts.map +1 -0
  262. package/script/oas/tag/tag-types.js +44 -0
  263. package/script/oas/union/union-types.d.ts +1 -12
  264. package/script/oas/union/union-types.d.ts.map +1 -1
  265. package/script/oas/unknown/unknown-types.d.ts +1 -7
  266. package/script/oas/unknown/unknown-types.d.ts.map +1 -1
  267. package/script/types/CustomValue.d.ts +58 -0
  268. package/script/types/CustomValue.d.ts.map +1 -1
  269. package/script/types/CustomValue.js +58 -0
  270. package/script/types/DenoJson.d.ts +24 -0
  271. package/script/types/DenoJson.d.ts.map +1 -1
  272. package/script/types/DenoJson.js +12 -0
  273. package/script/types/Enrichments.d.ts +103 -0
  274. package/script/types/Enrichments.d.ts.map +1 -1
  275. package/script/types/Enrichments.js +52 -0
  276. package/script/types/GeneratedValue.d.ts +17 -0
  277. package/script/types/GeneratedValue.d.ts.map +1 -1
  278. package/script/types/Logger.d.ts +9 -0
  279. package/script/types/Logger.d.ts.map +1 -0
  280. package/script/types/Logger.js +2 -0
  281. package/script/types/Preview.d.ts +37 -0
  282. package/script/types/Preview.d.ts.map +1 -1
  283. package/script/types/Preview.js +37 -0
  284. package/script/types/Settings.d.ts +35 -0
  285. package/script/types/Settings.d.ts.map +1 -1
  286. package/script/types/Settings.js +27 -0
  287. package/script/typescript/FunctionParameter.d.ts +4 -4
  288. package/script/typescript/FunctionParameter.d.ts.map +1 -1
  289. package/script/typescript/List.d.ts +40 -2
  290. package/script/typescript/List.d.ts.map +1 -1
  291. package/script/typescript/List.js +32 -0
package/esm/mod.js CHANGED
@@ -69,11 +69,15 @@ export * from './app/validate.js';
69
69
  export * from './context/CoreContext.js';
70
70
  export * from './context/GenerateContext.js';
71
71
  export * from './context/ParseContext.js';
72
+ export * from './context/RenderContext.js';
73
+ export * from './context/types.js';
72
74
  export * from './dsl/constants.js';
73
75
  export * from './dsl/ContentBase.js';
74
76
  export * from './dsl/ContentSettings.js';
75
77
  export * from './dsl/Definition.js';
76
78
  export * from './dsl/EntityType.js';
79
+ export * from './dsl/File.js';
80
+ export * from './dsl/JsonFile.js';
77
81
  export * from './dsl/GeneratedValueList.js';
78
82
  export * from './dsl/Identifier.js';
79
83
  export * from './dsl/Import.js';
@@ -99,25 +103,71 @@ export * from './helpers/refFns.js';
99
103
  export * from './helpers/strings.js';
100
104
  export * from './helpers/parseModuleName.js';
101
105
  export * from './helpers/toResolvedArtifactPath.js';
106
+ export * from './context/StackTrail.js';
102
107
  export * from './oas/array/Array.js';
108
+ export * from './oas/array/array-types.js';
109
+ export * from './oas/array/toArray.js';
103
110
  export * from './oas/boolean/Boolean.js';
111
+ export * from './oas/boolean/boolean-types.js';
112
+ export * from './oas/boolean/toBoolean.js';
104
113
  export * from './oas/components/Components.js';
114
+ export * from './oas/components/components-types.js';
115
+ export * from './oas/contact/Contact.js';
116
+ export * from './oas/contact/contact-types.js';
105
117
  export * from './oas/discriminator/Discriminator.js';
118
+ export * from './oas/discriminator/discriminator-types.js';
106
119
  export * from './oas/document/Document.js';
120
+ export * from './oas/document/document-types.js';
121
+ export * from './oas/example/Example.js';
122
+ export * from './oas/example/example-types.js';
123
+ export * from './oas/header/Header.js';
124
+ export * from './oas/header/header-types.js';
107
125
  export * from './oas/info/Info.js';
126
+ export * from './oas/info/info-types.js';
127
+ export * from './oas/license/License.js';
128
+ export * from './oas/license/license-types.js';
129
+ export * from './oas/mediaType/MediaType.js';
130
+ export * from './oas/mediaType/mediaType-types.js';
108
131
  export * from './oas/integer/Integer.js';
132
+ export * from './oas/integer/integer-types.js';
133
+ export * from './oas/integer/toInteger.js';
109
134
  export * from './oas/number/Number.js';
135
+ export * from './oas/number/number-types.js';
136
+ export * from './oas/number/toNumber.js';
110
137
  export * from './oas/object/Object.js';
138
+ export * from './oas/object/object-types.js';
139
+ export * from './oas/object/toObject.js';
111
140
  export * from './oas/operation/Operation.js';
141
+ export * from './oas/operation/operation-types.js';
112
142
  export * from './oas/parameter/Parameter.js';
143
+ export * from './oas/parameter/parameter-types.js';
144
+ export * from './oas/pathItem/PathItem.js';
145
+ export * from './oas/pathItem/pathItem-types.js';
113
146
  export * from './oas/ref/Ref.js';
147
+ export * from './oas/ref/ref-types.js';
148
+ export * from './oas/ref/toRefV31.js';
114
149
  export * from './oas/requestBody/RequestBody.js';
150
+ export * from './oas/requestBody/requestBody-types.js';
115
151
  export * from './oas/response/Response.js';
152
+ export * from './oas/response/response-types.js';
116
153
  export * from './oas/schema/Schema.js';
154
+ export * from './oas/schema/schema-types.js';
155
+ export * from './oas/schema/toSchemasV3.js';
156
+ export * from './oas/securityRequirement/SecurityRequirement.js';
157
+ export * from './oas/securitySchemes/SecurityScheme.js';
158
+ export * from './oas/server/Server.js';
159
+ export * from './oas/serverVariable/ServerVariable.js';
117
160
  export * from './oas/string/String.js';
161
+ export * from './oas/string/string-types.js';
162
+ export * from './oas/string/toString.js';
118
163
  export * from './oas/tag/Tag.js';
164
+ export * from './oas/tag/tag-types.js';
119
165
  export * from './oas/union/Union.js';
166
+ export * from './oas/union/union-types.js';
167
+ export * from './oas/union/toUnion.js';
120
168
  export * from './oas/unknown/Unknown.js';
169
+ export * from './oas/unknown/unknown-types.js';
170
+ export * from './oas/unknown/toUnknown.js';
121
171
  export * from './oas/void/Void.js';
122
172
  export * from './run/toArtifacts.js';
123
173
  export * from './run/toV3JsonDocument.js';
@@ -128,6 +178,7 @@ export * from './types/Enrichments.js';
128
178
  export * from './types/GeneratedValue.js';
129
179
  export * from './types/GeneratorKeys.js';
130
180
  export * from './types/GeneratorType.js';
181
+ export * from './types/Logger.js';
131
182
  export * from './types/Manifest.js';
132
183
  export * from './types/Method.js';
133
184
  export * from './types/Modifiers.js';
@@ -135,6 +186,7 @@ export * from './types/ModuleExport.js';
135
186
  export * from './types/PrettierConfig.js';
136
187
  export * from './types/Preview.js';
137
188
  export * from './types/RefName.js';
189
+ export * from './types/Results.js';
138
190
  export * from './types/Settings.js';
139
191
  export * from './types/TypeSystem.js';
140
192
  export * from './typescript/FunctionParameter.js';
@@ -178,10 +178,36 @@ export declare class OasArray<Nullable extends boolean | undefined = boolean | u
178
178
  * The default value for the array.
179
179
  */
180
180
  defaultValue: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
181
+ /**
182
+ * Creates a new OasArray instance.
183
+ *
184
+ * @param fields - Array configuration fields including items schema, validation constraints, and metadata
185
+ */
181
186
  constructor(fields: ArrayFields<Nullable>);
187
+ /**
188
+ * Determines if this array is a reference object.
189
+ *
190
+ * @returns Always returns false since this is a concrete array instance, not a reference
191
+ */
182
192
  isRef(): this is OasRef<'schema'>;
193
+ /**
194
+ * Resolves this array object.
195
+ *
196
+ * @returns The array instance itself since it's already a concrete object, not a reference
197
+ */
183
198
  resolve(): OasArray<Nullable>;
199
+ /**
200
+ * Resolves this array object one level.
201
+ *
202
+ * @returns The array instance itself since it's already a concrete object, not a reference
203
+ */
184
204
  resolveOnce(): OasArray<Nullable>;
205
+ /**
206
+ * Converts this OAS array to an OpenAPI v3 JSON schema representation.
207
+ *
208
+ * @param options - Conversion options including reference handling and formatting preferences
209
+ * @returns OpenAPI v3 array schema object with type, items schema, and all validation constraints
210
+ */
185
211
  toJsonSchema(options: ToJsonSchemaOptions): OpenAPIV3.ArraySchemaObject;
186
212
  }
187
213
  //# sourceMappingURL=Array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,e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AAO,EAAE,GAAG,SAAS,CAAA;IAE1F;;;;OAIG;gBACS,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC;IAczC;;;;OAIG;IACH,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC;;;;OAIG;IACH,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAI7B;;;;OAIG;IACH,WAAW,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAIjC;;;;;OAKG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,iBAAiB;CAexE"}
@@ -95,6 +95,11 @@ import "../../_dnt.polyfills.js";
95
95
  * ```
96
96
  */
97
97
  export class OasArray {
98
+ /**
99
+ * Creates a new OasArray instance.
100
+ *
101
+ * @param fields - Array configuration fields including items schema, validation constraints, and metadata
102
+ */
98
103
  constructor(fields) {
99
104
  /**
100
105
  * Object is part the 'schema' set which is used
@@ -224,15 +229,36 @@ export class OasArray {
224
229
  this.enums = fields.enums;
225
230
  this.defaultValue = fields.defaultValue;
226
231
  }
232
+ /**
233
+ * Determines if this array is a reference object.
234
+ *
235
+ * @returns Always returns false since this is a concrete array instance, not a reference
236
+ */
227
237
  isRef() {
228
238
  return false;
229
239
  }
240
+ /**
241
+ * Resolves this array object.
242
+ *
243
+ * @returns The array instance itself since it's already a concrete object, not a reference
244
+ */
230
245
  resolve() {
231
246
  return this;
232
247
  }
248
+ /**
249
+ * Resolves this array object one level.
250
+ *
251
+ * @returns The array instance itself since it's already a concrete object, not a reference
252
+ */
233
253
  resolveOnce() {
234
254
  return this;
235
255
  }
256
+ /**
257
+ * Converts this OAS array to an OpenAPI v3 JSON schema representation.
258
+ *
259
+ * @param options - Conversion options including reference handling and formatting preferences
260
+ * @returns OpenAPI v3 array schema object with type, items schema, and all validation constraints
261
+ */
236
262
  toJsonSchema(options) {
237
263
  return {
238
264
  type: 'array',
@@ -8,17 +8,14 @@ import { type OasSchemaRefData } from '../ref/ref-types.js';
8
8
  * uniqueness requirements, and enumeration values. Uses lazy evaluation
9
9
  * to handle recursive schema references.
10
10
  */
11
- export declare const oasArrayData: v.ObjectSchema<{
12
- readonly type: v.LiteralSchema<"array", undefined>;
13
- readonly items: v.LazySchema<v.UnionSchema<[v.LazySchema<v.GenericSchema<OasSchemaData>>, v.GenericSchema<OasSchemaRefData>], undefined>>;
14
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
15
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
16
- readonly default: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
17
- readonly maxItems: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
18
- readonly minItems: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
19
- readonly uniqueItems: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
20
- readonly enums: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
21
- }, undefined>;
11
+ export declare const oasArrayData: v.GenericSchema<OasArrayData>;
12
+ /**
13
+ * Valibot schema for array data without the items property.
14
+ *
15
+ * Used for parsing array schemas when the items property is handled separately,
16
+ * typically during schema transformation and validation processes.
17
+ */
18
+ export declare const oasArrayDataWithoutItems: v.GenericSchema<OasArrayDataWithoutItems>;
22
19
  /**
23
20
  * Data type for OpenAPI array schema objects.
24
21
  *
@@ -46,4 +43,28 @@ export type OasArrayData = {
46
43
  /** Array of valid enumeration values */
47
44
  enums?: unknown[];
48
45
  };
46
+ /**
47
+ * Array schema data without the items property.
48
+ *
49
+ * Represents an array schema with all properties except the items definition.
50
+ * Used during parsing phases where item schemas are processed separately.
51
+ */
52
+ export type OasArrayDataWithoutItems = {
53
+ /** Type identifier (always 'array') */
54
+ type: 'array';
55
+ /** Human-readable title for the array */
56
+ title?: string;
57
+ /** Detailed description of the array's purpose */
58
+ description?: string;
59
+ /** Default value for the array */
60
+ default?: unknown[];
61
+ /** Maximum number of items allowed */
62
+ maxItems?: number;
63
+ /** Minimum number of items required */
64
+ minItems?: number;
65
+ /** Whether all items must be unique */
66
+ uniqueItems?: boolean;
67
+ /** Array of valid enumeration values */
68
+ enums?: unknown[];
69
+ };
49
70
  //# 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,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,qBAAqB,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;aAUvB,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,wCAAwC;IACxC,KAAK,EAAE,aAAa,GAAG,gBAAgB,CAAA;IACvC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;CAClB,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,C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uniqueItems: v.optional(v.boolean()),
20
20
  enums: v.optional(v.array(v.unknown()))
21
21
  });
22
+ /**
23
+ * Valibot schema for array data without the items property.
24
+ *
25
+ * Used for parsing array schemas when the items property is handled separately,
26
+ * typically during schema transformation and validation processes.
27
+ */
28
+ export const oasArrayDataWithoutItems = v.object({
29
+ type: v.literal('array'),
30
+ title: v.optional(v.string()),
31
+ description: v.optional(v.string()),
32
+ default: v.optional(v.array(v.unknown())),
33
+ maxItems: v.optional(v.number()),
34
+ minItems: v.optional(v.number()),
35
+ uniqueItems: v.optional(v.boolean()),
36
+ enums: v.optional(v.array(v.unknown()))
37
+ });
@@ -5,6 +5,65 @@ type ToArrayArgs = {
5
5
  value: OpenAPIV3.ArraySchemaObject;
6
6
  context: ParseContext;
7
7
  };
8
+ /**
9
+ * Transforms an OpenAPI v3 array schema object into an internal OAS array representation.
10
+ *
11
+ * This function processes OpenAPI array schemas by extracting and parsing nullable values,
12
+ * examples, enumerations, and default values. It handles the complete transformation from
13
+ * raw OpenAPI JSON to the SKMTC internal array representation with proper type safety.
14
+ *
15
+ * The transformation follows a pipeline approach:
16
+ * 1. Parse nullable flag and extract base value
17
+ * 2. Parse example values with nullable support
18
+ * 3. Parse enumeration constraints
19
+ * 4. Parse default values
20
+ * 5. Create final OasArray instance
21
+ *
22
+ * @param args - Transformation arguments
23
+ * @param args.value - The OpenAPI v3 array schema object to transform
24
+ * @param args.context - Parse context providing utilities and tracing
25
+ * @returns Transformed OAS array object with parsed properties
26
+ *
27
+ * @example Basic array transformation
28
+ * ```typescript
29
+ * import { toArray } from '@skmtc/core';
30
+ *
31
+ * const openApiArray = {
32
+ * type: 'array',
33
+ * items: { type: 'string' },
34
+ * maxItems: 10,
35
+ * uniqueItems: true
36
+ * };
37
+ *
38
+ * const oasArray = toArray({
39
+ * value: openApiArray,
40
+ * context: parseContext
41
+ * });
42
+ *
43
+ * console.log(oasArray.maxItems); // 10
44
+ * console.log(oasArray.uniqueItems); // true
45
+ * ```
46
+ *
47
+ * @example Array with nullable and examples
48
+ * ```typescript
49
+ * const complexArray = {
50
+ * type: 'array',
51
+ * items: { type: 'number' },
52
+ * nullable: true,
53
+ * example: [1, 2, 3],
54
+ * default: [],
55
+ * enum: [[1, 2], [3, 4], null]
56
+ * };
57
+ *
58
+ * const oasArray = toArray({
59
+ * value: complexArray,
60
+ * context: parseContext
61
+ * });
62
+ *
63
+ * console.log(oasArray.nullable); // true
64
+ * console.log(oasArray.example); // [1, 2, 3]
65
+ * ```
66
+ */
8
67
  export declare const toArray: ({ value, context }: ToArrayArgs) => OasArray;
9
68
  type ToParsedArrayArgs<Nullable extends boolean | undefined> = {
10
69
  value: Omit<OpenAPIV3.ArraySchemaObject, 'nullable' | 'example' | 'enums' | 'default'>;
@@ -14,6 +73,58 @@ type ToParsedArrayArgs<Nullable extends boolean | undefined> = {
14
73
  enums: Nullable extends true ? (unknown[] | null)[] | undefined : unknown[] | undefined;
15
74
  defaultValue: Nullable extends true ? unknown[] | null | undefined : unknown[] | undefined;
16
75
  };
76
+ /**
77
+ * Creates an OAS array instance from pre-parsed array schema components.
78
+ *
79
+ * This function is the final step in the array transformation pipeline, taking
80
+ * already-parsed nullable, example, enum, and default values and combining them
81
+ * with the remaining array properties to create the complete OasArray instance.
82
+ *
83
+ * The function handles type-safe nullable parsing, items schema resolution,
84
+ * and specification extension processing. It uses Valibot for schema validation
85
+ * and maintains proper type relationships between nullable flags and value types.
86
+ *
87
+ * @template Nullable - Boolean type indicating if the array can be null
88
+ * @param args - Pre-parsed array components
89
+ * @param args.value - OpenAPI array object without parsed fields
90
+ * @param args.context - Parse context for tracing and utilities
91
+ * @param args.nullable - Parsed nullable flag
92
+ * @param args.example - Parsed example value (type-safe with nullable)
93
+ * @param args.enums - Parsed enumeration constraints (type-safe with nullable)
94
+ * @param args.defaultValue - Parsed default value (type-safe with nullable)
95
+ * @returns Complete OAS array instance with all properties
96
+ *
97
+ * @example Type-safe nullable array
98
+ * ```typescript
99
+ * const nullableArray = toParsedArray({
100
+ * context: parseContext,
101
+ * nullable: true,
102
+ * example: [1, 2, 3], // Can be null due to nullable: true
103
+ * enums: [[1], [2], null], // Null allowed in enums
104
+ * defaultValue: null,
105
+ * value: {
106
+ * type: 'array',
107
+ * items: { type: 'number' },
108
+ * maxItems: 5
109
+ * }
110
+ * });
111
+ * ```
112
+ *
113
+ * @example Non-nullable array
114
+ * ```typescript
115
+ * const regularArray = toParsedArray({
116
+ * context: parseContext,
117
+ * nullable: false,
118
+ * example: ['a', 'b'], // Cannot be null
119
+ * enums: [['x'], ['y']], // No null values allowed
120
+ * defaultValue: [],
121
+ * value: {
122
+ * type: 'array',
123
+ * items: { type: 'string' }
124
+ * }
125
+ * });
126
+ * ```
127
+ */
17
128
  export declare const toParsedArray: <Nullable extends boolean | undefined>({ context, nullable, example, enums, defaultValue, value }: ToParsedArrayArgs<Nullable>) => OasArray<Nullable>;
18
129
  export {};
19
130
  //# 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;AAQjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,oBAAoB,WAAW,KAAG,QAmCzD,CAAA;AAED,KAAK,iBAAiB,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAC7D,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IACtF,OAAO,EAAE,YAAY,CAAA;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OAAO,EAAE,YAAY,CAAA;IACrB,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACrF,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACvF,YAAY,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;CAC3F,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,SAAS,OAAO,GAAG,SAAS,EAAE,4DAOjE,iBAAiB,CAAC,QAAQ,CAAC,KAAG,QAAQ,CAAC,QAAQ,CAyCjD,CAAA"}
@@ -5,8 +5,67 @@ import { parseNullable } from '../_helpers/parseNullable.js';
5
5
  import { parseExample } from '../_helpers/parseExample.js';
6
6
  import { parseEnum } from '../_helpers/parseEnum.js';
7
7
  import * as v from 'valibot';
8
- import { oasArrayData } from './array-types.js';
8
+ import { oasArrayDataWithoutItems } from './array-types.js';
9
9
  import { parseDefault } from '../_helpers/parseDefault.js';
10
+ /**
11
+ * Transforms an OpenAPI v3 array schema object into an internal OAS array representation.
12
+ *
13
+ * This function processes OpenAPI array schemas by extracting and parsing nullable values,
14
+ * examples, enumerations, and default values. It handles the complete transformation from
15
+ * raw OpenAPI JSON to the SKMTC internal array representation with proper type safety.
16
+ *
17
+ * The transformation follows a pipeline approach:
18
+ * 1. Parse nullable flag and extract base value
19
+ * 2. Parse example values with nullable support
20
+ * 3. Parse enumeration constraints
21
+ * 4. Parse default values
22
+ * 5. Create final OasArray instance
23
+ *
24
+ * @param args - Transformation arguments
25
+ * @param args.value - The OpenAPI v3 array schema object to transform
26
+ * @param args.context - Parse context providing utilities and tracing
27
+ * @returns Transformed OAS array object with parsed properties
28
+ *
29
+ * @example Basic array transformation
30
+ * ```typescript
31
+ * import { toArray } from '@skmtc/core';
32
+ *
33
+ * const openApiArray = {
34
+ * type: 'array',
35
+ * items: { type: 'string' },
36
+ * maxItems: 10,
37
+ * uniqueItems: true
38
+ * };
39
+ *
40
+ * const oasArray = toArray({
41
+ * value: openApiArray,
42
+ * context: parseContext
43
+ * });
44
+ *
45
+ * console.log(oasArray.maxItems); // 10
46
+ * console.log(oasArray.uniqueItems); // true
47
+ * ```
48
+ *
49
+ * @example Array with nullable and examples
50
+ * ```typescript
51
+ * const complexArray = {
52
+ * type: 'array',
53
+ * items: { type: 'number' },
54
+ * nullable: true,
55
+ * example: [1, 2, 3],
56
+ * default: [],
57
+ * enum: [[1, 2], [3, 4], null]
58
+ * };
59
+ *
60
+ * const oasArray = toArray({
61
+ * value: complexArray,
62
+ * context: parseContext
63
+ * });
64
+ *
65
+ * console.log(oasArray.nullable); // true
66
+ * console.log(oasArray.example); // [1, 2, 3]
67
+ * ```
68
+ */
10
69
  export const toArray = ({ value, context }) => {
11
70
  const { nullable, value: valueWithoutNullable } = parseNullable({
12
71
  value,
@@ -39,11 +98,64 @@ export const toArray = ({ value, context }) => {
39
98
  value: valueWithoutDefault
40
99
  });
41
100
  };
101
+ /**
102
+ * Creates an OAS array instance from pre-parsed array schema components.
103
+ *
104
+ * This function is the final step in the array transformation pipeline, taking
105
+ * already-parsed nullable, example, enum, and default values and combining them
106
+ * with the remaining array properties to create the complete OasArray instance.
107
+ *
108
+ * The function handles type-safe nullable parsing, items schema resolution,
109
+ * and specification extension processing. It uses Valibot for schema validation
110
+ * and maintains proper type relationships between nullable flags and value types.
111
+ *
112
+ * @template Nullable - Boolean type indicating if the array can be null
113
+ * @param args - Pre-parsed array components
114
+ * @param args.value - OpenAPI array object without parsed fields
115
+ * @param args.context - Parse context for tracing and utilities
116
+ * @param args.nullable - Parsed nullable flag
117
+ * @param args.example - Parsed example value (type-safe with nullable)
118
+ * @param args.enums - Parsed enumeration constraints (type-safe with nullable)
119
+ * @param args.defaultValue - Parsed default value (type-safe with nullable)
120
+ * @returns Complete OAS array instance with all properties
121
+ *
122
+ * @example Type-safe nullable array
123
+ * ```typescript
124
+ * const nullableArray = toParsedArray({
125
+ * context: parseContext,
126
+ * nullable: true,
127
+ * example: [1, 2, 3], // Can be null due to nullable: true
128
+ * enums: [[1], [2], null], // Null allowed in enums
129
+ * defaultValue: null,
130
+ * value: {
131
+ * type: 'array',
132
+ * items: { type: 'number' },
133
+ * maxItems: 5
134
+ * }
135
+ * });
136
+ * ```
137
+ *
138
+ * @example Non-nullable array
139
+ * ```typescript
140
+ * const regularArray = toParsedArray({
141
+ * context: parseContext,
142
+ * nullable: false,
143
+ * example: ['a', 'b'], // Cannot be null
144
+ * enums: [['x'], ['y']], // No null values allowed
145
+ * defaultValue: [],
146
+ * value: {
147
+ * type: 'array',
148
+ * items: { type: 'string' }
149
+ * }
150
+ * });
151
+ * ```
152
+ */
42
153
  export const toParsedArray = ({ context, nullable, example, enums, defaultValue, value }) => {
43
154
  // We only want parse non-items fields here since items is handled below
44
155
  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);
156
+ // Parse the object without items field
157
+ const parsed = v.parse(oasArrayDataWithoutItems, rest);
158
+ const { type: _type, title, description, uniqueItems, maxItems, minItems, ...skipped } = parsed;
47
159
  const extensionFields = toSpecificationExtensionsV3({
48
160
  skipped,
49
161
  parent: value,
@@ -191,10 +191,36 @@ export declare class OasBoolean<Nullable extends boolean | undefined = boolean |
191
191
  * The default value of the boolean.
192
192
  */
193
193
  default: Nullable extends true ? boolean | null | undefined : boolean | undefined;
194
+ /**
195
+ * Creates a new OasBoolean instance.
196
+ *
197
+ * @param fields - Boolean configuration fields including validation constraints and metadata
198
+ */
194
199
  constructor(fields?: BooleanFields<Nullable>);
200
+ /**
201
+ * Determines if this boolean is a reference object.
202
+ *
203
+ * @returns Always returns false since this is a concrete boolean instance, not a reference
204
+ */
195
205
  isRef(): this is OasRef<'schema'>;
206
+ /**
207
+ * Resolves this boolean object.
208
+ *
209
+ * @returns The boolean instance itself since it's already a concrete object, not a reference
210
+ */
196
211
  resolve(): OasBoolean<Nullable>;
212
+ /**
213
+ * Resolves this boolean object one level.
214
+ *
215
+ * @returns The boolean instance itself since it's already a concrete object, not a reference
216
+ */
197
217
  resolveOnce(): OasBoolean<Nullable>;
218
+ /**
219
+ * Converts this OAS boolean to an OpenAPI v3 JSON schema representation.
220
+ *
221
+ * @param options - Conversion options (currently unused for boolean schemas)
222
+ * @returns OpenAPI v3 boolean schema object with type and all validation constraints
223
+ */
198
224
  toJsonSchema(options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject;
199
225
  }
200
226
  //# 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;AAE9D;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAChE,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM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AAQ,CAAM;IAUhD;;;;OAIG;IACH,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC;;;;OAIG;IACH,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC;IAI/B;;;;OAIG;IACH,WAAW,IAAI,UAAU,CAAC,QAAQ,CAAC;IAInC;;;;;OAKG;IAEH,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CAW5E"}
@@ -132,6 +132,11 @@ import "../../_dnt.polyfills.js";
132
132
  * ```
133
133
  */
134
134
  export class OasBoolean {
135
+ /**
136
+ * Creates a new OasBoolean instance.
137
+ *
138
+ * @param fields - Boolean configuration fields including validation constraints and metadata
139
+ */
135
140
  constructor(fields = {}) {
136
141
  /**
137
142
  * Object is part the 'schema' set which is used
@@ -221,15 +226,36 @@ export class OasBoolean {
221
226
  this.enums = fields.enums;
222
227
  this.default = fields.default;
223
228
  }
229
+ /**
230
+ * Determines if this boolean is a reference object.
231
+ *
232
+ * @returns Always returns false since this is a concrete boolean instance, not a reference
233
+ */
224
234
  isRef() {
225
235
  return false;
226
236
  }
237
+ /**
238
+ * Resolves this boolean object.
239
+ *
240
+ * @returns The boolean instance itself since it's already a concrete object, not a reference
241
+ */
227
242
  resolve() {
228
243
  return this;
229
244
  }
245
+ /**
246
+ * Resolves this boolean object one level.
247
+ *
248
+ * @returns The boolean instance itself since it's already a concrete object, not a reference
249
+ */
230
250
  resolveOnce() {
231
251
  return this;
232
252
  }
253
+ /**
254
+ * Converts this OAS boolean to an OpenAPI v3 JSON schema representation.
255
+ *
256
+ * @param options - Conversion options (currently unused for boolean schemas)
257
+ * @returns OpenAPI v3 boolean schema object with type and all validation constraints
258
+ */
233
259
  // deno-lint-ignore no-unused-vars
234
260
  toJsonSchema(options) {
235
261
  return {