@skmtc/core 0.0.800 → 0.0.802

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 (219) hide show
  1. package/esm/context/CoreContext.d.ts +0 -3
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/CoreContext.js +12 -17
  4. package/esm/context/GenerateContext.d.ts +14 -2
  5. package/esm/context/GenerateContext.d.ts.map +1 -1
  6. package/esm/context/RenderContext.d.ts +151 -2
  7. package/esm/context/RenderContext.d.ts.map +1 -1
  8. package/esm/context/RenderContext.js +185 -11
  9. package/esm/context/types.d.ts +30 -0
  10. package/esm/context/types.d.ts.map +1 -1
  11. package/esm/dsl/model/ModelBase.d.ts +1 -1
  12. package/esm/dsl/model/ModelBase.d.ts.map +1 -1
  13. package/esm/dsl/model/ModelDriver.d.ts +62 -0
  14. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  15. package/esm/dsl/model/ModelDriver.js +63 -1
  16. package/esm/dsl/model/toModelBase.d.ts +66 -0
  17. package/esm/dsl/model/toModelBase.d.ts.map +1 -1
  18. package/esm/dsl/model/toModelBase.js +46 -0
  19. package/esm/dsl/model/toModelEntry.d.ts +63 -0
  20. package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
  21. package/esm/dsl/model/toModelEntry.js +63 -0
  22. package/esm/dsl/operation/OperationBase.d.ts +3 -3
  23. package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
  24. package/esm/dsl/operation/OperationDriver.d.ts +48 -0
  25. package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
  26. package/esm/dsl/operation/OperationDriver.js +49 -1
  27. package/esm/helpers/isEmpty.d.ts +1 -1
  28. package/esm/helpers/isEmpty.d.ts.map +1 -1
  29. package/esm/helpers/tracer.d.ts +1 -1
  30. package/esm/helpers/tracer.d.ts.map +1 -1
  31. package/esm/helpers/tracer.js +1 -1
  32. package/esm/mod.d.ts +51 -0
  33. package/esm/mod.d.ts.map +1 -1
  34. package/esm/mod.js +51 -0
  35. package/esm/oas/array/array-types.d.ts +20 -11
  36. package/esm/oas/array/array-types.d.ts.map +1 -1
  37. package/esm/oas/array/array-types.js +10 -0
  38. package/esm/oas/array/toArray.d.ts +111 -0
  39. package/esm/oas/array/toArray.d.ts.map +1 -1
  40. package/esm/oas/array/toArray.js +115 -3
  41. package/esm/oas/boolean/boolean-types.d.ts +1 -7
  42. package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
  43. package/esm/oas/components/components-types.d.ts +19 -0
  44. package/esm/oas/components/components-types.d.ts.map +1 -0
  45. package/esm/oas/components/components-types.js +21 -0
  46. package/esm/oas/contact/contact-types.d.ts +9 -0
  47. package/esm/oas/contact/contact-types.d.ts.map +1 -0
  48. package/esm/oas/contact/contact-types.js +7 -0
  49. package/esm/oas/discriminator/discriminator-types.d.ts +1 -5
  50. package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
  51. package/esm/oas/document/document-types.d.ts +16 -0
  52. package/esm/oas/document/document-types.d.ts.map +1 -0
  53. package/esm/oas/document/document-types.js +18 -0
  54. package/esm/oas/example/example-types.d.ts +1 -6
  55. package/esm/oas/example/example-types.d.ts.map +1 -1
  56. package/esm/oas/header/header-types.d.ts +50 -0
  57. package/esm/oas/header/header-types.d.ts.map +1 -0
  58. package/esm/oas/header/header-types.js +30 -0
  59. package/esm/oas/info/info-types.d.ts +14 -0
  60. package/esm/oas/info/info-types.d.ts.map +1 -0
  61. package/esm/oas/info/info-types.js +13 -0
  62. package/esm/oas/integer/integer-types.d.ts +3 -17
  63. package/esm/oas/integer/integer-types.d.ts.map +1 -1
  64. package/esm/oas/license/license-types.d.ts +9 -0
  65. package/esm/oas/license/license-types.d.ts.map +1 -0
  66. package/esm/oas/license/license-types.js +7 -0
  67. package/esm/oas/mediaType/mediaType-types.d.ts +1 -11
  68. package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
  69. package/esm/oas/number/number-types.d.ts +2 -16
  70. package/esm/oas/number/number-types.d.ts.map +1 -1
  71. package/esm/oas/operation/operation-types.d.ts +22 -0
  72. package/esm/oas/operation/operation-types.d.ts.map +1 -0
  73. package/esm/oas/operation/operation-types.js +35 -0
  74. package/esm/oas/parameter/parameter-types.d.ts +3 -58
  75. package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
  76. package/esm/oas/pathItem/pathItem-types.d.ts +12 -0
  77. package/esm/oas/pathItem/pathItem-types.d.ts.map +1 -0
  78. package/esm/oas/pathItem/pathItem-types.js +12 -0
  79. package/esm/oas/requestBody/requestBody-types.d.ts +10 -0
  80. package/esm/oas/requestBody/requestBody-types.d.ts.map +1 -0
  81. package/esm/oas/requestBody/requestBody-types.js +9 -0
  82. package/esm/oas/response/response-types.d.ts +12 -0
  83. package/esm/oas/response/response-types.d.ts.map +1 -0
  84. package/esm/oas/response/response-types.js +11 -0
  85. package/esm/oas/schema/toSchemasV3.js +2 -2
  86. package/esm/oas/server/toServerV3.d.ts.map +1 -1
  87. package/esm/oas/string/string-types.d.ts +2 -29
  88. package/esm/oas/string/string-types.d.ts.map +1 -1
  89. package/esm/oas/string/toString.d.ts +125 -1
  90. package/esm/oas/string/toString.d.ts.map +1 -1
  91. package/esm/oas/string/toString.js +119 -0
  92. package/esm/oas/tag/tag-types.d.ts +8 -0
  93. package/esm/oas/tag/tag-types.d.ts.map +1 -0
  94. package/esm/oas/tag/tag-types.js +8 -0
  95. package/esm/oas/union/union-types.d.ts +1 -12
  96. package/esm/oas/union/union-types.d.ts.map +1 -1
  97. package/esm/oas/unknown/unknown-types.d.ts +1 -7
  98. package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
  99. package/esm/types/Preview.d.ts +37 -0
  100. package/esm/types/Preview.d.ts.map +1 -1
  101. package/esm/types/Preview.js +37 -0
  102. package/esm/types/Settings.d.ts +35 -0
  103. package/esm/types/Settings.d.ts.map +1 -1
  104. package/esm/types/Settings.js +27 -0
  105. package/esm/typescript/FunctionParameter.d.ts +4 -4
  106. package/esm/typescript/FunctionParameter.d.ts.map +1 -1
  107. package/esm/typescript/List.d.ts +40 -2
  108. package/esm/typescript/List.d.ts.map +1 -1
  109. package/esm/typescript/List.js +32 -0
  110. package/package.json +1 -1
  111. package/script/context/CoreContext.d.ts +0 -3
  112. package/script/context/CoreContext.d.ts.map +1 -1
  113. package/script/context/CoreContext.js +12 -17
  114. package/script/context/GenerateContext.d.ts +14 -2
  115. package/script/context/GenerateContext.d.ts.map +1 -1
  116. package/script/context/RenderContext.d.ts +151 -2
  117. package/script/context/RenderContext.d.ts.map +1 -1
  118. package/script/context/RenderContext.js +185 -11
  119. package/script/context/types.d.ts +30 -0
  120. package/script/context/types.d.ts.map +1 -1
  121. package/script/dsl/model/ModelBase.d.ts +1 -1
  122. package/script/dsl/model/ModelBase.d.ts.map +1 -1
  123. package/script/dsl/model/ModelDriver.d.ts +62 -0
  124. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  125. package/script/dsl/model/ModelDriver.js +63 -1
  126. package/script/dsl/model/toModelBase.d.ts +66 -0
  127. package/script/dsl/model/toModelBase.d.ts.map +1 -1
  128. package/script/dsl/model/toModelBase.js +46 -0
  129. package/script/dsl/model/toModelEntry.d.ts +63 -0
  130. package/script/dsl/model/toModelEntry.d.ts.map +1 -1
  131. package/script/dsl/model/toModelEntry.js +63 -0
  132. package/script/dsl/operation/OperationBase.d.ts +3 -3
  133. package/script/dsl/operation/OperationBase.d.ts.map +1 -1
  134. package/script/dsl/operation/OperationDriver.d.ts +48 -0
  135. package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
  136. package/script/dsl/operation/OperationDriver.js +49 -1
  137. package/script/helpers/isEmpty.d.ts +1 -1
  138. package/script/helpers/isEmpty.d.ts.map +1 -1
  139. package/script/helpers/tracer.d.ts +1 -1
  140. package/script/helpers/tracer.d.ts.map +1 -1
  141. package/script/helpers/tracer.js +1 -1
  142. package/script/mod.d.ts +51 -0
  143. package/script/mod.d.ts.map +1 -1
  144. package/script/mod.js +51 -0
  145. package/script/oas/array/array-types.d.ts +20 -11
  146. package/script/oas/array/array-types.d.ts.map +1 -1
  147. package/script/oas/array/array-types.js +11 -1
  148. package/script/oas/array/toArray.d.ts +111 -0
  149. package/script/oas/array/toArray.d.ts.map +1 -1
  150. package/script/oas/array/toArray.js +114 -2
  151. package/script/oas/boolean/boolean-types.d.ts +1 -7
  152. package/script/oas/boolean/boolean-types.d.ts.map +1 -1
  153. package/script/oas/components/components-types.d.ts +19 -0
  154. package/script/oas/components/components-types.d.ts.map +1 -0
  155. package/script/oas/components/components-types.js +57 -0
  156. package/script/oas/contact/contact-types.d.ts +9 -0
  157. package/script/oas/contact/contact-types.d.ts.map +1 -0
  158. package/script/oas/contact/contact-types.js +43 -0
  159. package/script/oas/discriminator/discriminator-types.d.ts +1 -5
  160. package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
  161. package/script/oas/document/document-types.d.ts +16 -0
  162. package/script/oas/document/document-types.d.ts.map +1 -0
  163. package/script/oas/document/document-types.js +54 -0
  164. package/script/oas/example/example-types.d.ts +1 -6
  165. package/script/oas/example/example-types.d.ts.map +1 -1
  166. package/script/oas/header/header-types.d.ts +50 -0
  167. package/script/oas/header/header-types.d.ts.map +1 -0
  168. package/script/oas/header/header-types.js +66 -0
  169. package/script/oas/info/info-types.d.ts +14 -0
  170. package/script/oas/info/info-types.d.ts.map +1 -0
  171. package/script/oas/info/info-types.js +49 -0
  172. package/script/oas/integer/integer-types.d.ts +3 -17
  173. package/script/oas/integer/integer-types.d.ts.map +1 -1
  174. package/script/oas/license/license-types.d.ts +9 -0
  175. package/script/oas/license/license-types.d.ts.map +1 -0
  176. package/script/oas/license/license-types.js +43 -0
  177. package/script/oas/mediaType/mediaType-types.d.ts +1 -11
  178. package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
  179. package/script/oas/number/number-types.d.ts +2 -16
  180. package/script/oas/number/number-types.d.ts.map +1 -1
  181. package/script/oas/operation/operation-types.d.ts +22 -0
  182. package/script/oas/operation/operation-types.d.ts.map +1 -0
  183. package/script/oas/operation/operation-types.js +71 -0
  184. package/script/oas/parameter/parameter-types.d.ts +3 -58
  185. package/script/oas/parameter/parameter-types.d.ts.map +1 -1
  186. package/script/oas/pathItem/pathItem-types.d.ts +12 -0
  187. package/script/oas/pathItem/pathItem-types.d.ts.map +1 -0
  188. package/script/oas/pathItem/pathItem-types.js +48 -0
  189. package/script/oas/requestBody/requestBody-types.d.ts +10 -0
  190. package/script/oas/requestBody/requestBody-types.d.ts.map +1 -0
  191. package/script/oas/requestBody/requestBody-types.js +45 -0
  192. package/script/oas/response/response-types.d.ts +12 -0
  193. package/script/oas/response/response-types.d.ts.map +1 -0
  194. package/script/oas/response/response-types.js +47 -0
  195. package/script/oas/schema/toSchemasV3.js +2 -2
  196. package/script/oas/server/toServerV3.d.ts.map +1 -1
  197. package/script/oas/string/string-types.d.ts +2 -29
  198. package/script/oas/string/string-types.d.ts.map +1 -1
  199. package/script/oas/string/toString.d.ts +125 -1
  200. package/script/oas/string/toString.d.ts.map +1 -1
  201. package/script/oas/string/toString.js +119 -0
  202. package/script/oas/tag/tag-types.d.ts +8 -0
  203. package/script/oas/tag/tag-types.d.ts.map +1 -0
  204. package/script/oas/tag/tag-types.js +44 -0
  205. package/script/oas/union/union-types.d.ts +1 -12
  206. package/script/oas/union/union-types.d.ts.map +1 -1
  207. package/script/oas/unknown/unknown-types.d.ts +1 -7
  208. package/script/oas/unknown/unknown-types.d.ts.map +1 -1
  209. package/script/types/Preview.d.ts +37 -0
  210. package/script/types/Preview.d.ts.map +1 -1
  211. package/script/types/Preview.js +37 -0
  212. package/script/types/Settings.d.ts +35 -0
  213. package/script/types/Settings.d.ts.map +1 -1
  214. package/script/types/Settings.js +27 -0
  215. package/script/typescript/FunctionParameter.d.ts +4 -4
  216. package/script/typescript/FunctionParameter.d.ts.map +1 -1
  217. package/script/typescript/List.d.ts +40 -2
  218. package/script/typescript/List.d.ts.map +1 -1
  219. package/script/typescript/List.js +32 -0
package/script/mod.js CHANGED
@@ -85,11 +85,15 @@ __exportStar(require("./app/validate.js"), exports);
85
85
  __exportStar(require("./context/CoreContext.js"), exports);
86
86
  __exportStar(require("./context/GenerateContext.js"), exports);
87
87
  __exportStar(require("./context/ParseContext.js"), exports);
88
+ __exportStar(require("./context/RenderContext.js"), exports);
89
+ __exportStar(require("./context/types.js"), exports);
88
90
  __exportStar(require("./dsl/constants.js"), exports);
89
91
  __exportStar(require("./dsl/ContentBase.js"), exports);
90
92
  __exportStar(require("./dsl/ContentSettings.js"), exports);
91
93
  __exportStar(require("./dsl/Definition.js"), exports);
92
94
  __exportStar(require("./dsl/EntityType.js"), exports);
95
+ __exportStar(require("./dsl/File.js"), exports);
96
+ __exportStar(require("./dsl/JsonFile.js"), exports);
93
97
  __exportStar(require("./dsl/GeneratedValueList.js"), exports);
94
98
  __exportStar(require("./dsl/Identifier.js"), exports);
95
99
  __exportStar(require("./dsl/Import.js"), exports);
@@ -115,25 +119,71 @@ __exportStar(require("./helpers/refFns.js"), exports);
115
119
  __exportStar(require("./helpers/strings.js"), exports);
116
120
  __exportStar(require("./helpers/parseModuleName.js"), exports);
117
121
  __exportStar(require("./helpers/toResolvedArtifactPath.js"), exports);
122
+ __exportStar(require("./context/StackTrail.js"), exports);
118
123
  __exportStar(require("./oas/array/Array.js"), exports);
124
+ __exportStar(require("./oas/array/array-types.js"), exports);
125
+ __exportStar(require("./oas/array/toArray.js"), exports);
119
126
  __exportStar(require("./oas/boolean/Boolean.js"), exports);
127
+ __exportStar(require("./oas/boolean/boolean-types.js"), exports);
128
+ __exportStar(require("./oas/boolean/toBoolean.js"), exports);
120
129
  __exportStar(require("./oas/components/Components.js"), exports);
130
+ __exportStar(require("./oas/components/components-types.js"), exports);
131
+ __exportStar(require("./oas/contact/Contact.js"), exports);
132
+ __exportStar(require("./oas/contact/contact-types.js"), exports);
121
133
  __exportStar(require("./oas/discriminator/Discriminator.js"), exports);
134
+ __exportStar(require("./oas/discriminator/discriminator-types.js"), exports);
122
135
  __exportStar(require("./oas/document/Document.js"), exports);
136
+ __exportStar(require("./oas/document/document-types.js"), exports);
137
+ __exportStar(require("./oas/example/Example.js"), exports);
138
+ __exportStar(require("./oas/example/example-types.js"), exports);
139
+ __exportStar(require("./oas/header/Header.js"), exports);
140
+ __exportStar(require("./oas/header/header-types.js"), exports);
123
141
  __exportStar(require("./oas/info/Info.js"), exports);
142
+ __exportStar(require("./oas/info/info-types.js"), exports);
143
+ __exportStar(require("./oas/license/License.js"), exports);
144
+ __exportStar(require("./oas/license/license-types.js"), exports);
145
+ __exportStar(require("./oas/mediaType/MediaType.js"), exports);
146
+ __exportStar(require("./oas/mediaType/mediaType-types.js"), exports);
124
147
  __exportStar(require("./oas/integer/Integer.js"), exports);
148
+ __exportStar(require("./oas/integer/integer-types.js"), exports);
149
+ __exportStar(require("./oas/integer/toInteger.js"), exports);
125
150
  __exportStar(require("./oas/number/Number.js"), exports);
151
+ __exportStar(require("./oas/number/number-types.js"), exports);
152
+ __exportStar(require("./oas/number/toNumber.js"), exports);
126
153
  __exportStar(require("./oas/object/Object.js"), exports);
154
+ __exportStar(require("./oas/object/object-types.js"), exports);
155
+ __exportStar(require("./oas/object/toObject.js"), exports);
127
156
  __exportStar(require("./oas/operation/Operation.js"), exports);
157
+ __exportStar(require("./oas/operation/operation-types.js"), exports);
128
158
  __exportStar(require("./oas/parameter/Parameter.js"), exports);
159
+ __exportStar(require("./oas/parameter/parameter-types.js"), exports);
160
+ __exportStar(require("./oas/pathItem/PathItem.js"), exports);
161
+ __exportStar(require("./oas/pathItem/pathItem-types.js"), exports);
129
162
  __exportStar(require("./oas/ref/Ref.js"), exports);
163
+ __exportStar(require("./oas/ref/ref-types.js"), exports);
164
+ __exportStar(require("./oas/ref/toRefV31.js"), exports);
130
165
  __exportStar(require("./oas/requestBody/RequestBody.js"), exports);
166
+ __exportStar(require("./oas/requestBody/requestBody-types.js"), exports);
131
167
  __exportStar(require("./oas/response/Response.js"), exports);
168
+ __exportStar(require("./oas/response/response-types.js"), exports);
132
169
  __exportStar(require("./oas/schema/Schema.js"), exports);
170
+ __exportStar(require("./oas/schema/schema-types.js"), exports);
171
+ __exportStar(require("./oas/schema/toSchemasV3.js"), exports);
172
+ __exportStar(require("./oas/securityRequirement/SecurityRequirement.js"), exports);
173
+ __exportStar(require("./oas/securitySchemes/SecurityScheme.js"), exports);
174
+ __exportStar(require("./oas/server/Server.js"), exports);
175
+ __exportStar(require("./oas/serverVariable/ServerVariable.js"), exports);
133
176
  __exportStar(require("./oas/string/String.js"), exports);
177
+ __exportStar(require("./oas/string/string-types.js"), exports);
178
+ __exportStar(require("./oas/string/toString.js"), exports);
134
179
  __exportStar(require("./oas/tag/Tag.js"), exports);
180
+ __exportStar(require("./oas/tag/tag-types.js"), exports);
135
181
  __exportStar(require("./oas/union/Union.js"), exports);
182
+ __exportStar(require("./oas/union/union-types.js"), exports);
183
+ __exportStar(require("./oas/union/toUnion.js"), exports);
136
184
  __exportStar(require("./oas/unknown/Unknown.js"), exports);
185
+ __exportStar(require("./oas/unknown/unknown-types.js"), exports);
186
+ __exportStar(require("./oas/unknown/toUnknown.js"), exports);
137
187
  __exportStar(require("./oas/void/Void.js"), exports);
138
188
  __exportStar(require("./run/toArtifacts.js"), exports);
139
189
  __exportStar(require("./run/toV3JsonDocument.js"), exports);
@@ -151,6 +201,7 @@ __exportStar(require("./types/ModuleExport.js"), exports);
151
201
  __exportStar(require("./types/PrettierConfig.js"), exports);
152
202
  __exportStar(require("./types/Preview.js"), exports);
153
203
  __exportStar(require("./types/RefName.js"), exports);
204
+ __exportStar(require("./types/Results.js"), exports);
154
205
  __exportStar(require("./types/Settings.js"), exports);
155
206
  __exportStar(require("./types/TypeSystem.js"), exports);
156
207
  __exportStar(require("./typescript/FunctionParameter.js"), exports);
@@ -8,17 +8,8 @@ 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
+ export declare const oasArrayDataWithoutItems: v.GenericSchema<OasArrayDataWithoutItems>;
22
13
  /**
23
14
  * Data type for OpenAPI array schema objects.
24
15
  *
@@ -46,4 +37,22 @@ export type OasArrayData = {
46
37
  /** Array of valid enumeration values */
47
38
  enums?: unknown[];
48
39
  };
40
+ export type OasArrayDataWithoutItems = {
41
+ /** Type identifier (always 'array') */
42
+ type: 'array';
43
+ /** Human-readable title for the array */
44
+ title?: string;
45
+ /** Detailed description of the array's purpose */
46
+ description?: string;
47
+ /** Default value for the array */
48
+ default?: unknown[];
49
+ /** Maximum number of items allowed */
50
+ maxItems?: number;
51
+ /** Minimum number of items required */
52
+ minItems?: number;
53
+ /** Whether all items must be unique */
54
+ uniqueItems?: boolean;
55
+ /** Array of valid enumeration values */
56
+ enums?: unknown[];
57
+ };
49
58
  //# 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,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAUrD,CAAA;AAEF,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,aAAa,CAAC,wBAAwB,CAS7E,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;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,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"}
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.oasArrayData = void 0;
36
+ exports.oasArrayDataWithoutItems = exports.oasArrayData = void 0;
37
37
  const v = __importStar(require("valibot"));
38
38
  const schema_types_js_1 = require("../schema/schema-types.js");
39
39
  const ref_types_js_1 = require("../ref/ref-types.js");
@@ -55,3 +55,13 @@ exports.oasArrayData = v.object({
55
55
  uniqueItems: v.optional(v.boolean()),
56
56
  enums: v.optional(v.array(v.unknown()))
57
57
  });
58
+ exports.oasArrayDataWithoutItems = v.object({
59
+ type: v.literal('array'),
60
+ title: v.optional(v.string()),
61
+ description: v.optional(v.string()),
62
+ default: v.optional(v.array(v.unknown())),
63
+ maxItems: v.optional(v.number()),
64
+ minItems: v.optional(v.number()),
65
+ uniqueItems: v.optional(v.boolean()),
66
+ enums: v.optional(v.array(v.unknown()))
67
+ });
@@ -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;IACrB,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACrF,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACvF,YAAY,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;CAC3F,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,QAAQ,SAAS,OAAO,GAAG,SAAS,EAAE,4DAOjE,iBAAiB,CAAC,QAAQ,CAAC,KAAG,QAAQ,CAAC,QAAQ,CAyCjD,CAAA"}
1
+ {"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../src/oas/array/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAQjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,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;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"}
@@ -43,6 +43,65 @@ const parseEnum_js_1 = require("../_helpers/parseEnum.js");
43
43
  const v = __importStar(require("valibot"));
44
44
  const array_types_js_1 = require("./array-types.js");
45
45
  const parseDefault_js_1 = require("../_helpers/parseDefault.js");
46
+ /**
47
+ * Transforms an OpenAPI v3 array schema object into an internal OAS array representation.
48
+ *
49
+ * This function processes OpenAPI array schemas by extracting and parsing nullable values,
50
+ * examples, enumerations, and default values. It handles the complete transformation from
51
+ * raw OpenAPI JSON to the SKMTC internal array representation with proper type safety.
52
+ *
53
+ * The transformation follows a pipeline approach:
54
+ * 1. Parse nullable flag and extract base value
55
+ * 2. Parse example values with nullable support
56
+ * 3. Parse enumeration constraints
57
+ * 4. Parse default values
58
+ * 5. Create final OasArray instance
59
+ *
60
+ * @param args - Transformation arguments
61
+ * @param args.value - The OpenAPI v3 array schema object to transform
62
+ * @param args.context - Parse context providing utilities and tracing
63
+ * @returns Transformed OAS array object with parsed properties
64
+ *
65
+ * @example Basic array transformation
66
+ * ```typescript
67
+ * import { toArray } from '@skmtc/core';
68
+ *
69
+ * const openApiArray = {
70
+ * type: 'array',
71
+ * items: { type: 'string' },
72
+ * maxItems: 10,
73
+ * uniqueItems: true
74
+ * };
75
+ *
76
+ * const oasArray = toArray({
77
+ * value: openApiArray,
78
+ * context: parseContext
79
+ * });
80
+ *
81
+ * console.log(oasArray.maxItems); // 10
82
+ * console.log(oasArray.uniqueItems); // true
83
+ * ```
84
+ *
85
+ * @example Array with nullable and examples
86
+ * ```typescript
87
+ * const complexArray = {
88
+ * type: 'array',
89
+ * items: { type: 'number' },
90
+ * nullable: true,
91
+ * example: [1, 2, 3],
92
+ * default: [],
93
+ * enum: [[1, 2], [3, 4], null]
94
+ * };
95
+ *
96
+ * const oasArray = toArray({
97
+ * value: complexArray,
98
+ * context: parseContext
99
+ * });
100
+ *
101
+ * console.log(oasArray.nullable); // true
102
+ * console.log(oasArray.example); // [1, 2, 3]
103
+ * ```
104
+ */
46
105
  const toArray = ({ value, context }) => {
47
106
  const { nullable, value: valueWithoutNullable } = (0, parseNullable_js_1.parseNullable)({
48
107
  value,
@@ -76,11 +135,64 @@ const toArray = ({ value, context }) => {
76
135
  });
77
136
  };
78
137
  exports.toArray = toArray;
138
+ /**
139
+ * Creates an OAS array instance from pre-parsed array schema components.
140
+ *
141
+ * This function is the final step in the array transformation pipeline, taking
142
+ * already-parsed nullable, example, enum, and default values and combining them
143
+ * with the remaining array properties to create the complete OasArray instance.
144
+ *
145
+ * The function handles type-safe nullable parsing, items schema resolution,
146
+ * and specification extension processing. It uses Valibot for schema validation
147
+ * and maintains proper type relationships between nullable flags and value types.
148
+ *
149
+ * @template Nullable - Boolean type indicating if the array can be null
150
+ * @param args - Pre-parsed array components
151
+ * @param args.value - OpenAPI array object without parsed fields
152
+ * @param args.context - Parse context for tracing and utilities
153
+ * @param args.nullable - Parsed nullable flag
154
+ * @param args.example - Parsed example value (type-safe with nullable)
155
+ * @param args.enums - Parsed enumeration constraints (type-safe with nullable)
156
+ * @param args.defaultValue - Parsed default value (type-safe with nullable)
157
+ * @returns Complete OAS array instance with all properties
158
+ *
159
+ * @example Type-safe nullable array
160
+ * ```typescript
161
+ * const nullableArray = toParsedArray({
162
+ * context: parseContext,
163
+ * nullable: true,
164
+ * example: [1, 2, 3], // Can be null due to nullable: true
165
+ * enums: [[1], [2], null], // Null allowed in enums
166
+ * defaultValue: null,
167
+ * value: {
168
+ * type: 'array',
169
+ * items: { type: 'number' },
170
+ * maxItems: 5
171
+ * }
172
+ * });
173
+ * ```
174
+ *
175
+ * @example Non-nullable array
176
+ * ```typescript
177
+ * const regularArray = toParsedArray({
178
+ * context: parseContext,
179
+ * nullable: false,
180
+ * example: ['a', 'b'], // Cannot be null
181
+ * enums: [['x'], ['y']], // No null values allowed
182
+ * defaultValue: [],
183
+ * value: {
184
+ * type: 'array',
185
+ * items: { type: 'string' }
186
+ * }
187
+ * });
188
+ * ```
189
+ */
79
190
  const toParsedArray = ({ context, nullable, example, enums, defaultValue, value }) => {
80
191
  // We only want parse non-items fields here since items is handled below
81
192
  const { items, ...rest } = value;
82
- const oasArrayDataSchemaWithItems = v.omit(array_types_js_1.oasArrayData, ['items']);
83
- const { type: _type, title, description, uniqueItems, maxItems, minItems, ...skipped } = v.parse(oasArrayDataSchemaWithItems, rest);
193
+ // Parse the object without items field
194
+ const parsed = v.parse(array_types_js_1.oasArrayDataWithoutItems, rest);
195
+ const { type: _type, title, description, uniqueItems, maxItems, minItems, ...skipped } = parsed;
84
196
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
85
197
  skipped,
86
198
  parent: value,
@@ -5,13 +5,7 @@ import * as v from 'valibot';
5
5
  * Validates boolean schemas including default values and enumeration
6
6
  * constraints. Boolean enums typically contain [true, false] or single values.
7
7
  */
8
- export declare const oasBooleanData: v.ObjectSchema<{
9
- readonly type: v.LiteralSchema<"boolean", undefined>;
10
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
11
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
12
- readonly default: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
13
- readonly enum: v.OptionalSchema<v.ArraySchema<v.BooleanSchema<undefined>, undefined>, undefined>;
14
- }, undefined>;
8
+ export declare const oasBooleanData: v.GenericSchema<OasBooleanData>;
15
9
  /**
16
10
  * Data type for OpenAPI boolean schema objects.
17
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-types.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/boolean-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;;;aAMzB,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,yCAAyC;IACzC,IAAI,EAAE,SAAS,CAAA;IACf,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kFAAkF;IAClF,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;CACjB,CAAA"}
1
+ {"version":3,"file":"boolean-types.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/boolean-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAMzD,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,yCAAyC;IACzC,IAAI,EAAE,SAAS,CAAA;IACf,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kFAAkF;IAClF,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;CACjB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { type OasExampleData } from '../example/example-types.js';
2
+ import { type OasHeaderData } from '../header/header-types.js';
3
+ import { type OasParameterData } from '../parameter/parameter-types.js';
4
+ import type { OasExampleRefData, OasHeaderRefData, OasParameterRefData, OasRequestBodyRefData, OasResponseRefData, OasSchemaRefData } from '../ref/ref-types.js';
5
+ import { type OasRequestBodyData } from '../requestBody/requestBody-types.js';
6
+ import { type OasResponseData } from '../response/response-types.js';
7
+ import { type OasSchemaData } from '../schema/schema-types.js';
8
+ import * as v from 'valibot';
9
+ export type OasComponentsData = {
10
+ oasType: 'components';
11
+ schemas?: Record<string, OasSchemaData | OasSchemaRefData>;
12
+ responses?: Record<string, OasResponseData | OasResponseRefData>;
13
+ parameters?: Record<string, OasParameterData | OasParameterRefData>;
14
+ examples?: Record<string, OasExampleData | OasExampleRefData>;
15
+ requestBodies?: Record<string, OasRequestBodyData | OasRequestBodyRefData>;
16
+ headers?: Record<string, OasHeaderData | OasHeaderRefData>;
17
+ };
18
+ export declare const oasComponentsData: v.GenericSchema<OasComponentsData>;
19
+ //# sourceMappingURL=components-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-types.d.ts","sourceRoot":"","sources":["../../../src/oas/components/components-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,6BAA6B,CAAA;AACjF,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,iCAAiC,CAAA;AACzF,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAS5B,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,qCAAqC,CAAA;AACjG,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,+BAA+B,CAAA;AACrF,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,kBAAkB,CAAC,CAAA;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,CAAA;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,CAAC,CAAA;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,qBAAqB,CAAC,CAAA;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAA;CAC3D,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAc/D,CAAA"}
@@ -0,0 +1,57 @@
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 () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.oasComponentsData = void 0;
37
+ const example_types_js_1 = require("../example/example-types.js");
38
+ const header_types_js_1 = require("../header/header-types.js");
39
+ const parameter_types_js_1 = require("../parameter/parameter-types.js");
40
+ const ref_types_js_1 = require("../ref/ref-types.js");
41
+ const requestBody_types_js_1 = require("../requestBody/requestBody-types.js");
42
+ const response_types_js_1 = require("../response/response-types.js");
43
+ const schema_types_js_1 = require("../schema/schema-types.js");
44
+ const v = __importStar(require("valibot"));
45
+ exports.oasComponentsData = v.object({
46
+ oasType: v.literal('components'),
47
+ schemas: v.optional(v.record(v.string(), v.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]))),
48
+ responses: v.optional(v.record(v.string(), v.union([response_types_js_1.oasResponseData, ref_types_js_1.oasResponseRefData]))),
49
+ parameters: v.optional(v.record(v.string(), v.union([parameter_types_js_1.oasParameterData, ref_types_js_1.oasParameterRefData]))),
50
+ examples: v.optional(v.record(v.string(), v.union([example_types_js_1.oasExampleData, ref_types_js_1.oasExampleRefData]))),
51
+ requestBodies: v.optional(v.record(v.string(), v.union([requestBody_types_js_1.oasRequestBodyData, ref_types_js_1.oasRequestBodyRefData]))),
52
+ headers: v.optional(v.record(v.string(), v.union([header_types_js_1.oasHeaderData, ref_types_js_1.oasHeaderRefData])))
53
+ // securitySchemes: z.record(z.union([securityScheme, ref])),
54
+ // links: z.record(z.union([link, ref])),
55
+ // callbacks: z.never(),
56
+ // pathItems: z.record(z.union([oasPathItemData, oasPathItemRefData])).optional()
57
+ });
@@ -0,0 +1,9 @@
1
+ import * as v from 'valibot';
2
+ export type OasContactData = {
3
+ oasType: 'contact';
4
+ name?: string;
5
+ url?: string;
6
+ email?: string;
7
+ };
8
+ export declare const oasContactData: v.GenericSchema<OasContactData>;
9
+ //# sourceMappingURL=contact-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-types.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/contact-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,SAAS,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAKzD,CAAA"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.oasContactData = void 0;
37
+ const v = __importStar(require("valibot"));
38
+ exports.oasContactData = v.object({
39
+ oasType: v.literal('contact'),
40
+ name: v.optional(v.string()),
41
+ url: v.optional(v.string()),
42
+ email: v.optional(v.string())
43
+ });
@@ -21,9 +21,5 @@ export type OasDiscriminatorData = {
21
21
  * and optional value-to-schema mappings. Used to ensure discriminator
22
22
  * objects conform to OpenAPI specification requirements.
23
23
  */
24
- export declare const oasDiscriminatorData: v.ObjectSchema<{
25
- readonly oasType: v.LiteralSchema<"discriminator", undefined>;
26
- readonly propertyName: v.StringSchema<undefined>;
27
- readonly mapping: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
28
- }, undefined>;
24
+ export declare const oasDiscriminatorData: v.GenericSchema<OasDiscriminatorData>;
29
25
  //# sourceMappingURL=discriminator-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discriminator-types.d.ts","sourceRoot":"","sources":["../../../src/oas/discriminator/discriminator-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,yDAAyD;IACzD,OAAO,EAAE,eAAe,CAAA;IACxB,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAA;IACpB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;aAI/B,CAAA"}
1
+ {"version":3,"file":"discriminator-types.d.ts","sourceRoot":"","sources":["../../../src/oas/discriminator/discriminator-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,yDAAyD;IACzD,OAAO,EAAE,eAAe,CAAA;IACxB,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAA;IACpB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,aAAa,CAAC,oBAAoB,CAIrE,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { type OasTagData } from '../tag/tag-types.js';
2
+ import { type OasOperationData } from '../operation/operation-types.js';
3
+ import * as v from 'valibot';
4
+ import { type OasComponentsData } from '../components/components-types.js';
5
+ import { type OasInfoData } from '../info/info-types.js';
6
+ export type OasDocumentData = {
7
+ oasType: 'openapi';
8
+ openapi: string;
9
+ info: OasInfoData;
10
+ jsonSchemaDialect?: string;
11
+ operations: OasOperationData[];
12
+ components?: OasComponentsData;
13
+ tags?: OasTagData[];
14
+ };
15
+ export declare const oasDocumentData: v.GenericSchema<OasDocumentData>;
16
+ //# sourceMappingURL=document-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-types.d.ts","sourceRoot":"","sources":["../../../src/oas/document/document-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,qBAAqB,CAAA;AACjE,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,iCAAiC,CAAA;AACzF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,mCAAmC,CAAA;AAC7F,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,uBAAuB,CAAA;AAErE,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,SAAS,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,WAAW,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAE9B,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAE9B,IAAI,CAAC,EAAE,UAAU,EAAE,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,eAAe,CAY3D,CAAA"}