@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.
- package/esm/context/CoreContext.d.ts +2 -2
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.d.ts +16 -3
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/ParseContext.d.ts +3 -3
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/RenderContext.d.ts +153 -1
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +179 -0
- package/esm/context/types.d.ts +30 -0
- package/esm/context/types.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.d.ts +1 -1
- package/esm/dsl/model/ModelBase.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.d.ts +62 -0
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +63 -1
- package/esm/dsl/model/toModelBase.d.ts +66 -0
- package/esm/dsl/model/toModelBase.d.ts.map +1 -1
- package/esm/dsl/model/toModelBase.js +46 -0
- package/esm/dsl/model/toModelEntry.d.ts +63 -0
- package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
- package/esm/dsl/model/toModelEntry.js +63 -0
- package/esm/dsl/operation/OperationBase.d.ts +3 -3
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.d.ts +84 -0
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +85 -1
- package/esm/dsl/operation/toOperationBase.d.ts +58 -0
- package/esm/dsl/operation/toOperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationBase.js +46 -0
- package/esm/dsl/operation/toOperationEntry.d.ts +37 -0
- package/esm/dsl/operation/toOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationEntry.js +28 -0
- package/esm/helpers/isEmpty.d.ts +1 -1
- package/esm/helpers/isEmpty.d.ts.map +1 -1
- package/esm/helpers/tracer.d.ts +1 -1
- package/esm/helpers/tracer.d.ts.map +1 -1
- package/esm/helpers/tracer.js +1 -1
- package/esm/mod.d.ts +52 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +52 -0
- package/esm/oas/array/Array.d.ts +26 -0
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +26 -0
- package/esm/oas/array/array-types.d.ts +32 -11
- package/esm/oas/array/array-types.d.ts.map +1 -1
- package/esm/oas/array/array-types.js +16 -0
- package/esm/oas/array/toArray.d.ts +111 -0
- package/esm/oas/array/toArray.d.ts.map +1 -1
- package/esm/oas/array/toArray.js +115 -3
- package/esm/oas/boolean/Boolean.d.ts +26 -0
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +26 -0
- package/esm/oas/boolean/boolean-types.d.ts +1 -7
- package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.d.ts +57 -0
- package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.js +57 -0
- package/esm/oas/components/components-types.d.ts +19 -0
- package/esm/oas/components/components-types.d.ts.map +1 -0
- package/esm/oas/components/components-types.js +21 -0
- package/esm/oas/contact/contact-types.d.ts +9 -0
- package/esm/oas/contact/contact-types.d.ts.map +1 -0
- package/esm/oas/contact/contact-types.js +7 -0
- package/esm/oas/discriminator/discriminator-types.d.ts +1 -5
- package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/esm/oas/document/document-types.d.ts +16 -0
- package/esm/oas/document/document-types.d.ts.map +1 -0
- package/esm/oas/document/document-types.js +18 -0
- package/esm/oas/example/example-types.d.ts +1 -6
- package/esm/oas/example/example-types.d.ts.map +1 -1
- package/esm/oas/header/header-types.d.ts +50 -0
- package/esm/oas/header/header-types.d.ts.map +1 -0
- package/esm/oas/header/header-types.js +30 -0
- package/esm/oas/info/info-types.d.ts +14 -0
- package/esm/oas/info/info-types.d.ts.map +1 -0
- package/esm/oas/info/info-types.js +13 -0
- package/esm/oas/integer/integer-types.d.ts +3 -17
- package/esm/oas/integer/integer-types.d.ts.map +1 -1
- package/esm/oas/license/license-types.d.ts +9 -0
- package/esm/oas/license/license-types.d.ts.map +1 -0
- package/esm/oas/license/license-types.js +7 -0
- package/esm/oas/mediaType/mediaType-types.d.ts +1 -11
- package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/esm/oas/number/number-types.d.ts +2 -16
- package/esm/oas/number/number-types.d.ts.map +1 -1
- package/esm/oas/number/toNumber.d.ts +62 -0
- package/esm/oas/number/toNumber.d.ts.map +1 -1
- package/esm/oas/number/toNumber.js +62 -0
- package/esm/oas/operation/operation-types.d.ts +22 -0
- package/esm/oas/operation/operation-types.d.ts.map +1 -0
- package/esm/oas/operation/operation-types.js +35 -0
- package/esm/oas/parameter/Parameter.d.ts +47 -0
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +47 -0
- package/esm/oas/parameter/parameter-types.d.ts +3 -58
- package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
- package/esm/oas/pathItem/pathItem-types.d.ts +12 -0
- package/esm/oas/pathItem/pathItem-types.d.ts.map +1 -0
- package/esm/oas/pathItem/pathItem-types.js +12 -0
- package/esm/oas/requestBody/requestBody-types.d.ts +10 -0
- package/esm/oas/requestBody/requestBody-types.d.ts.map +1 -0
- package/esm/oas/requestBody/requestBody-types.js +9 -0
- package/esm/oas/response/response-types.d.ts +12 -0
- package/esm/oas/response/response-types.d.ts.map +1 -0
- package/esm/oas/response/response-types.js +11 -0
- package/esm/oas/schema/toSchemasV3.js +2 -2
- package/esm/oas/server/toServerV3.d.ts.map +1 -1
- package/esm/oas/string/string-types.d.ts +2 -29
- package/esm/oas/string/string-types.d.ts.map +1 -1
- package/esm/oas/string/toString.d.ts +125 -1
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +119 -0
- package/esm/oas/tag/tag-types.d.ts +8 -0
- package/esm/oas/tag/tag-types.d.ts.map +1 -0
- package/esm/oas/tag/tag-types.js +8 -0
- package/esm/oas/union/union-types.d.ts +1 -12
- package/esm/oas/union/union-types.d.ts.map +1 -1
- package/esm/oas/unknown/unknown-types.d.ts +1 -7
- package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
- package/esm/types/CustomValue.d.ts +58 -0
- package/esm/types/CustomValue.d.ts.map +1 -1
- package/esm/types/CustomValue.js +58 -0
- package/esm/types/DenoJson.d.ts +24 -0
- package/esm/types/DenoJson.d.ts.map +1 -1
- package/esm/types/DenoJson.js +12 -0
- package/esm/types/Enrichments.d.ts +103 -0
- package/esm/types/Enrichments.d.ts.map +1 -1
- package/esm/types/Enrichments.js +52 -0
- package/esm/types/GeneratedValue.d.ts +17 -0
- package/esm/types/GeneratedValue.d.ts.map +1 -1
- package/esm/types/Logger.d.ts +9 -0
- package/esm/types/Logger.d.ts.map +1 -0
- package/esm/types/Logger.js +1 -0
- package/esm/types/Preview.d.ts +37 -0
- package/esm/types/Preview.d.ts.map +1 -1
- package/esm/types/Preview.js +37 -0
- package/esm/types/Settings.d.ts +35 -0
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +27 -0
- package/esm/typescript/FunctionParameter.d.ts +4 -4
- package/esm/typescript/FunctionParameter.d.ts.map +1 -1
- package/esm/typescript/List.d.ts +40 -2
- package/esm/typescript/List.d.ts.map +1 -1
- package/esm/typescript/List.js +32 -0
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +2 -2
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/GenerateContext.d.ts +16 -3
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/ParseContext.d.ts +3 -3
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/RenderContext.d.ts +153 -1
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +179 -0
- package/script/context/types.d.ts +30 -0
- package/script/context/types.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.d.ts +1 -1
- package/script/dsl/model/ModelBase.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.d.ts +62 -0
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +63 -1
- package/script/dsl/model/toModelBase.d.ts +66 -0
- package/script/dsl/model/toModelBase.d.ts.map +1 -1
- package/script/dsl/model/toModelBase.js +46 -0
- package/script/dsl/model/toModelEntry.d.ts +63 -0
- package/script/dsl/model/toModelEntry.d.ts.map +1 -1
- package/script/dsl/model/toModelEntry.js +63 -0
- package/script/dsl/operation/OperationBase.d.ts +3 -3
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.d.ts +84 -0
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +85 -1
- package/script/dsl/operation/toOperationBase.d.ts +58 -0
- package/script/dsl/operation/toOperationBase.d.ts.map +1 -1
- package/script/dsl/operation/toOperationBase.js +46 -0
- package/script/dsl/operation/toOperationEntry.d.ts +37 -0
- package/script/dsl/operation/toOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/toOperationEntry.js +28 -0
- package/script/helpers/isEmpty.d.ts +1 -1
- package/script/helpers/isEmpty.d.ts.map +1 -1
- package/script/helpers/tracer.d.ts +1 -1
- package/script/helpers/tracer.d.ts.map +1 -1
- package/script/helpers/tracer.js +1 -1
- package/script/mod.d.ts +52 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +52 -0
- package/script/oas/array/Array.d.ts +26 -0
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +26 -0
- package/script/oas/array/array-types.d.ts +32 -11
- package/script/oas/array/array-types.d.ts.map +1 -1
- package/script/oas/array/array-types.js +17 -1
- package/script/oas/array/toArray.d.ts +111 -0
- package/script/oas/array/toArray.d.ts.map +1 -1
- package/script/oas/array/toArray.js +114 -2
- package/script/oas/boolean/Boolean.d.ts +26 -0
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +26 -0
- package/script/oas/boolean/boolean-types.d.ts +1 -7
- package/script/oas/boolean/boolean-types.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.d.ts +57 -0
- package/script/oas/boolean/toBoolean.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.js +57 -0
- package/script/oas/components/components-types.d.ts +19 -0
- package/script/oas/components/components-types.d.ts.map +1 -0
- package/script/oas/components/components-types.js +57 -0
- package/script/oas/contact/contact-types.d.ts +9 -0
- package/script/oas/contact/contact-types.d.ts.map +1 -0
- package/script/oas/contact/contact-types.js +43 -0
- package/script/oas/discriminator/discriminator-types.d.ts +1 -5
- package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/script/oas/document/document-types.d.ts +16 -0
- package/script/oas/document/document-types.d.ts.map +1 -0
- package/script/oas/document/document-types.js +54 -0
- package/script/oas/example/example-types.d.ts +1 -6
- package/script/oas/example/example-types.d.ts.map +1 -1
- package/script/oas/header/header-types.d.ts +50 -0
- package/script/oas/header/header-types.d.ts.map +1 -0
- package/script/oas/header/header-types.js +66 -0
- package/script/oas/info/info-types.d.ts +14 -0
- package/script/oas/info/info-types.d.ts.map +1 -0
- package/script/oas/info/info-types.js +49 -0
- package/script/oas/integer/integer-types.d.ts +3 -17
- package/script/oas/integer/integer-types.d.ts.map +1 -1
- package/script/oas/license/license-types.d.ts +9 -0
- package/script/oas/license/license-types.d.ts.map +1 -0
- package/script/oas/license/license-types.js +43 -0
- package/script/oas/mediaType/mediaType-types.d.ts +1 -11
- package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/script/oas/number/number-types.d.ts +2 -16
- package/script/oas/number/number-types.d.ts.map +1 -1
- package/script/oas/number/toNumber.d.ts +62 -0
- package/script/oas/number/toNumber.d.ts.map +1 -1
- package/script/oas/number/toNumber.js +62 -0
- package/script/oas/operation/operation-types.d.ts +22 -0
- package/script/oas/operation/operation-types.d.ts.map +1 -0
- package/script/oas/operation/operation-types.js +71 -0
- package/script/oas/parameter/Parameter.d.ts +47 -0
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +47 -0
- package/script/oas/parameter/parameter-types.d.ts +3 -58
- package/script/oas/parameter/parameter-types.d.ts.map +1 -1
- package/script/oas/pathItem/pathItem-types.d.ts +12 -0
- package/script/oas/pathItem/pathItem-types.d.ts.map +1 -0
- package/script/oas/pathItem/pathItem-types.js +48 -0
- package/script/oas/requestBody/requestBody-types.d.ts +10 -0
- package/script/oas/requestBody/requestBody-types.d.ts.map +1 -0
- package/script/oas/requestBody/requestBody-types.js +45 -0
- package/script/oas/response/response-types.d.ts +12 -0
- package/script/oas/response/response-types.d.ts.map +1 -0
- package/script/oas/response/response-types.js +47 -0
- package/script/oas/schema/toSchemasV3.js +2 -2
- package/script/oas/server/toServerV3.d.ts.map +1 -1
- package/script/oas/string/string-types.d.ts +2 -29
- package/script/oas/string/string-types.d.ts.map +1 -1
- package/script/oas/string/toString.d.ts +125 -1
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +119 -0
- package/script/oas/tag/tag-types.d.ts +8 -0
- package/script/oas/tag/tag-types.d.ts.map +1 -0
- package/script/oas/tag/tag-types.js +44 -0
- package/script/oas/union/union-types.d.ts +1 -12
- package/script/oas/union/union-types.d.ts.map +1 -1
- package/script/oas/unknown/unknown-types.d.ts +1 -7
- package/script/oas/unknown/unknown-types.d.ts.map +1 -1
- package/script/types/CustomValue.d.ts +58 -0
- package/script/types/CustomValue.d.ts.map +1 -1
- package/script/types/CustomValue.js +58 -0
- package/script/types/DenoJson.d.ts +24 -0
- package/script/types/DenoJson.d.ts.map +1 -1
- package/script/types/DenoJson.js +12 -0
- package/script/types/Enrichments.d.ts +103 -0
- package/script/types/Enrichments.d.ts.map +1 -1
- package/script/types/Enrichments.js +52 -0
- package/script/types/GeneratedValue.d.ts +17 -0
- package/script/types/GeneratedValue.d.ts.map +1 -1
- package/script/types/Logger.d.ts +9 -0
- package/script/types/Logger.d.ts.map +1 -0
- package/script/types/Logger.js +2 -0
- package/script/types/Preview.d.ts +37 -0
- package/script/types/Preview.d.ts.map +1 -1
- package/script/types/Preview.js +37 -0
- package/script/types/Settings.d.ts +35 -0
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +27 -0
- package/script/typescript/FunctionParameter.d.ts +4 -4
- package/script/typescript/FunctionParameter.d.ts.map +1 -1
- package/script/typescript/List.d.ts +40 -2
- package/script/typescript/List.d.ts.map +1 -1
- 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';
|
package/esm/oas/array/Array.d.ts
CHANGED
|
@@ -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
|
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,IAAI,GAAG,SAAS,GAAG,OAAO,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"}
|
package/esm/oas/array/Array.js
CHANGED
|
@@ -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.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
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;;;;;GAKG;AACH,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;;;;;GAKG;AACH,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"}
|
|
@@ -19,3 +19,19 @@ export const oasArrayData = v.object({
|
|
|
19
19
|
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;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;IACv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AO,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"}
|
package/esm/oas/array/toArray.js
CHANGED
|
@@ -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 {
|
|
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
|
-
|
|
46
|
-
const
|
|
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,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,uEAAuE;IACvE,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAClF,oFAAoF;IACpF,KAAK,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACtF,uEAAuE;IACvE,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI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,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAA;IAE9B,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACpD;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAEjF;;OAEG;IACH,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,GAAG,SAAS,CAAA;IACrF;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAEjF;;;;OAIG;gBACS,MAAM,GAAE,aAAa,CAAC,QAAQ,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 {
|