@skmtc/core 0.0.798 → 0.0.799
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/GenerateContext.d.ts +5 -0
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +5 -0
- package/esm/oas/array/array-types.d.ts +23 -0
- package/esm/oas/array/array-types.d.ts.map +1 -1
- package/esm/oas/array/array-types.js +7 -0
- package/esm/oas/boolean/boolean-types.d.ts +25 -1
- package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
- package/esm/oas/boolean/boolean-types.js +6 -0
- package/esm/oas/discriminator/discriminator-types.d.ts +17 -0
- package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/esm/oas/discriminator/discriminator-types.js +7 -0
- package/esm/oas/integer/integer-types.d.ts +18 -0
- package/esm/oas/integer/integer-types.d.ts.map +1 -1
- package/esm/oas/integer/integer-types.js +18 -0
- package/esm/oas/mediaType/mediaType-types.d.ts +17 -0
- package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/esm/oas/mediaType/mediaType-types.js +6 -0
- package/esm/oas/number/number-types.d.ts +12 -0
- package/esm/oas/number/number-types.d.ts.map +1 -1
- package/esm/oas/number/number-types.js +12 -0
- package/esm/oas/serverVariable/ServerVariable.d.ts +34 -0
- package/esm/oas/serverVariable/ServerVariable.d.ts.map +1 -1
- package/esm/oas/serverVariable/ServerVariable.js +24 -0
- package/esm/oas/string/string-types.d.ts +38 -1
- package/esm/oas/string/string-types.d.ts.map +1 -1
- package/esm/oas/string/string-types.js +12 -0
- package/esm/oas/union/union-types.d.ts +20 -0
- package/esm/oas/union/union-types.d.ts.map +1 -1
- package/esm/oas/union/union-types.js +7 -0
- package/esm/oas/unknown/unknown-types.d.ts +18 -0
- package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
- package/esm/oas/unknown/unknown-types.js +6 -0
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +5 -0
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +5 -0
- package/script/oas/array/array-types.d.ts +23 -0
- package/script/oas/array/array-types.d.ts.map +1 -1
- package/script/oas/array/array-types.js +7 -0
- package/script/oas/boolean/boolean-types.d.ts +25 -1
- package/script/oas/boolean/boolean-types.d.ts.map +1 -1
- package/script/oas/boolean/boolean-types.js +6 -0
- package/script/oas/discriminator/discriminator-types.d.ts +17 -0
- package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/script/oas/discriminator/discriminator-types.js +7 -0
- package/script/oas/integer/integer-types.d.ts +18 -0
- package/script/oas/integer/integer-types.d.ts.map +1 -1
- package/script/oas/integer/integer-types.js +18 -0
- package/script/oas/mediaType/mediaType-types.d.ts +17 -0
- package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/script/oas/mediaType/mediaType-types.js +6 -0
- package/script/oas/number/number-types.d.ts +12 -0
- package/script/oas/number/number-types.d.ts.map +1 -1
- package/script/oas/number/number-types.js +12 -0
- package/script/oas/serverVariable/ServerVariable.d.ts +34 -0
- package/script/oas/serverVariable/ServerVariable.d.ts.map +1 -1
- package/script/oas/serverVariable/ServerVariable.js +24 -0
- package/script/oas/string/string-types.d.ts +38 -1
- package/script/oas/string/string-types.d.ts.map +1 -1
- package/script/oas/string/string-types.js +12 -0
- package/script/oas/union/union-types.d.ts +20 -0
- package/script/oas/union/union-types.d.ts.map +1 -1
- package/script/oas/union/union-types.js +7 -0
- package/script/oas/unknown/unknown-types.d.ts +18 -0
- package/script/oas/unknown/unknown-types.d.ts.map +1 -1
- package/script/oas/unknown/unknown-types.js +6 -0
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Union type for OpenAPI string format specifiers.
|
|
4
|
+
*
|
|
5
|
+
* Represents the standard string formats defined in OpenAPI v3,
|
|
6
|
+
* providing semantic meaning for string validation and processing.
|
|
7
|
+
* Used for generating appropriate validation rules in target languages.
|
|
8
|
+
*/
|
|
9
|
+
export type StringFormat = 'date-time' | 'time' | 'date' | 'duration' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uuid' | 'uri' | 'regex' | 'password' | 'byte' | 'binary';
|
|
10
|
+
/**
|
|
11
|
+
* Valibot enum schema for valid OpenAPI string format values.
|
|
12
|
+
*
|
|
13
|
+
* Defines the standard string formats supported by OpenAPI v3,
|
|
14
|
+
* including date/time formats, network formats, and encoding formats.
|
|
15
|
+
*/
|
|
2
16
|
export declare const stringFormat: v.EnumSchema<{
|
|
3
17
|
readonly 'date-time': "date-time";
|
|
4
18
|
readonly time: "time";
|
|
@@ -15,6 +29,12 @@ export declare const stringFormat: v.EnumSchema<{
|
|
|
15
29
|
readonly byte: "byte";
|
|
16
30
|
readonly binary: "binary";
|
|
17
31
|
}, undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* Valibot schema for validating OpenAPI string data objects.
|
|
34
|
+
*
|
|
35
|
+
* Validates string schema objects including length constraints,
|
|
36
|
+
* pattern validation, format specifiers, and enumeration values.
|
|
37
|
+
*/
|
|
18
38
|
export declare const oasStringData: v.ObjectSchema<{
|
|
19
39
|
readonly type: v.LiteralSchema<"string", undefined>;
|
|
20
40
|
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -28,18 +48,35 @@ export declare const oasStringData: v.ObjectSchema<{
|
|
|
28
48
|
readonly nullable: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
29
49
|
readonly example: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
30
50
|
}, undefined>;
|
|
31
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Data type for OpenAPI string schema objects.
|
|
53
|
+
*
|
|
54
|
+
* Represents string schemas with validation constraints,
|
|
55
|
+
* format specifiers, and metadata. Used throughout the
|
|
56
|
+
* SKMTC pipeline for string type processing and code generation.
|
|
57
|
+
*/
|
|
32
58
|
export type OasStringData = {
|
|
59
|
+
/** Human-readable title for the string */
|
|
33
60
|
title?: string;
|
|
61
|
+
/** Detailed description of the string's purpose */
|
|
34
62
|
description?: string;
|
|
63
|
+
/** Default value for the string */
|
|
35
64
|
default?: string;
|
|
65
|
+
/** Type identifier (always 'string') */
|
|
36
66
|
type: 'string';
|
|
67
|
+
/** Maximum allowed length */
|
|
37
68
|
maxLength?: number;
|
|
69
|
+
/** Minimum required length */
|
|
38
70
|
minLength?: number;
|
|
71
|
+
/** Regular expression pattern for validation */
|
|
39
72
|
pattern?: string;
|
|
73
|
+
/** Array of valid enumeration values */
|
|
40
74
|
enum?: string[];
|
|
75
|
+
/** Format specifier (date-time, email, etc.) */
|
|
41
76
|
format?: string;
|
|
77
|
+
/** Whether null values are allowed */
|
|
42
78
|
nullable?: boolean;
|
|
79
|
+
/** Example value for documentation */
|
|
43
80
|
example?: string;
|
|
44
81
|
};
|
|
45
82
|
//# sourceMappingURL=string-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B
|
|
1
|
+
{"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,OAAO,GACP,UAAU,GACV,MAAM,GACN,QAAQ,CAAA;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;aAevB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;aAYxB,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,CAAA;IACd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
@@ -35,6 +35,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.oasStringData = exports.stringFormat = void 0;
|
|
37
37
|
const v = __importStar(require("valibot"));
|
|
38
|
+
/**
|
|
39
|
+
* Valibot enum schema for valid OpenAPI string format values.
|
|
40
|
+
*
|
|
41
|
+
* Defines the standard string formats supported by OpenAPI v3,
|
|
42
|
+
* including date/time formats, network formats, and encoding formats.
|
|
43
|
+
*/
|
|
38
44
|
exports.stringFormat = v.enum({
|
|
39
45
|
'date-time': 'date-time',
|
|
40
46
|
time: 'time',
|
|
@@ -51,6 +57,12 @@ exports.stringFormat = v.enum({
|
|
|
51
57
|
byte: 'byte',
|
|
52
58
|
binary: 'binary'
|
|
53
59
|
});
|
|
60
|
+
/**
|
|
61
|
+
* Valibot schema for validating OpenAPI string data objects.
|
|
62
|
+
*
|
|
63
|
+
* Validates string schema objects including length constraints,
|
|
64
|
+
* pattern validation, format specifiers, and enumeration values.
|
|
65
|
+
*/
|
|
54
66
|
exports.oasStringData = v.object({
|
|
55
67
|
type: v.literal('string'),
|
|
56
68
|
title: v.optional(v.string()),
|
|
@@ -2,14 +2,34 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { type OasSchemaData } from '../schema/schema-types.js';
|
|
3
3
|
import { type OasSchemaRefData } from '../ref/ref-types.js';
|
|
4
4
|
import { type OasDiscriminatorData } from '../discriminator/discriminator-types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Data type for OpenAPI union schema objects.
|
|
7
|
+
*
|
|
8
|
+
* Represents union types (oneOf/anyOf) that allow values to match
|
|
9
|
+
* one or more of several possible schemas. Includes support for
|
|
10
|
+
* discriminator properties for efficient type resolution.
|
|
11
|
+
*/
|
|
5
12
|
export type OasUnionData = {
|
|
13
|
+
/** Type category identifier for schema objects */
|
|
6
14
|
oasType: 'schema';
|
|
15
|
+
/** Type identifier (always 'union') */
|
|
7
16
|
type: 'union';
|
|
17
|
+
/** Human-readable title for the union */
|
|
8
18
|
title?: string;
|
|
19
|
+
/** Detailed description of the union's purpose */
|
|
9
20
|
description?: string;
|
|
21
|
+
/** Array of schemas that comprise the union */
|
|
10
22
|
members: (OasSchemaData | OasSchemaRefData)[];
|
|
23
|
+
/** Optional discriminator for efficient type resolution */
|
|
11
24
|
discriminator?: OasDiscriminatorData;
|
|
12
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Valibot schema for validating OpenAPI union data objects.
|
|
28
|
+
*
|
|
29
|
+
* Validates union schemas including member schema arrays and optional
|
|
30
|
+
* discriminator properties. Uses lazy evaluation to handle recursive
|
|
31
|
+
* schema references in union members.
|
|
32
|
+
*/
|
|
13
33
|
export declare const oasUnionData: v.ObjectSchema<{
|
|
14
34
|
readonly oasType: v.LiteralSchema<"schema", undefined>;
|
|
15
35
|
readonly type: v.LiteralSchema<"union", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union-types.d.ts","sourceRoot":"","sources":["../../../src/oas/union/union-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;AAC7E,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,yCAAyC,CAAA;AAEhD,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,QAAQ,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,CAAC,aAAa,GAAG,gBAAgB,CAAC,EAAE,CAAA;IAC7C,aAAa,CAAC,EAAE,oBAAoB,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;aAOvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"union-types.d.ts","sourceRoot":"","sources":["../../../src/oas/union/union-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;AAC7E,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,yCAAyC,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,kDAAkD;IAClD,OAAO,EAAE,QAAQ,CAAA;IACjB,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,OAAO,EAAE,CAAC,aAAa,GAAG,gBAAgB,CAAC,EAAE,CAAA;IAC7C,2DAA2D;IAC3D,aAAa,CAAC,EAAE,oBAAoB,CAAA;CACrC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;aAOvB,CAAA"}
|
|
@@ -38,6 +38,13 @@ 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");
|
|
40
40
|
const discriminator_types_js_1 = require("../discriminator/discriminator-types.js");
|
|
41
|
+
/**
|
|
42
|
+
* Valibot schema for validating OpenAPI union data objects.
|
|
43
|
+
*
|
|
44
|
+
* Validates union schemas including member schema arrays and optional
|
|
45
|
+
* discriminator properties. Uses lazy evaluation to handle recursive
|
|
46
|
+
* schema references in union members.
|
|
47
|
+
*/
|
|
41
48
|
exports.oasUnionData = v.object({
|
|
42
49
|
oasType: v.literal('schema'),
|
|
43
50
|
type: v.literal('union'),
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Valibot schema for validating OpenAPI unknown data objects.
|
|
4
|
+
*
|
|
5
|
+
* Validates unknown/unspecified schemas used as fallbacks when
|
|
6
|
+
* schema types cannot be determined or for flexible data handling.
|
|
7
|
+
*/
|
|
2
8
|
export declare const oasUnknownData: v.ObjectSchema<{
|
|
3
9
|
readonly oasType: v.LiteralSchema<"schema", undefined>;
|
|
4
10
|
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -6,11 +12,23 @@ export declare const oasUnknownData: v.ObjectSchema<{
|
|
|
6
12
|
readonly default: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
7
13
|
readonly type: v.LiteralSchema<"unknown", undefined>;
|
|
8
14
|
}, undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Data type for OpenAPI unknown schema objects.
|
|
17
|
+
*
|
|
18
|
+
* Represents schemas with unspecified or flexible types, used as
|
|
19
|
+
* fallbacks when schema types cannot be determined or when maximum
|
|
20
|
+
* flexibility is required in the API specification.
|
|
21
|
+
*/
|
|
9
22
|
export type OasUnknownData = {
|
|
23
|
+
/** Type category identifier for schema objects */
|
|
10
24
|
oasType: 'schema';
|
|
25
|
+
/** Human-readable title for the unknown schema */
|
|
11
26
|
title?: string;
|
|
27
|
+
/** Detailed description of the schema's purpose */
|
|
12
28
|
description?: string;
|
|
29
|
+
/** Default value of any type */
|
|
13
30
|
default?: unknown;
|
|
31
|
+
/** Type identifier (always 'unknown') */
|
|
14
32
|
type: 'unknown';
|
|
15
33
|
};
|
|
16
34
|
//# sourceMappingURL=unknown-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unknown-types.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/unknown-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,cAAc;;;;;;aAMzB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,QAAQ,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA"}
|
|
1
|
+
{"version":3,"file":"unknown-types.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/unknown-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,kDAAkD;IAClD,OAAO,EAAE,QAAQ,CAAA;IACjB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yCAAyC;IACzC,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA"}
|
|
@@ -35,6 +35,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.oasUnknownData = void 0;
|
|
37
37
|
const v = __importStar(require("valibot"));
|
|
38
|
+
/**
|
|
39
|
+
* Valibot schema for validating OpenAPI unknown data objects.
|
|
40
|
+
*
|
|
41
|
+
* Validates unknown/unspecified schemas used as fallbacks when
|
|
42
|
+
* schema types cannot be determined or for flexible data handling.
|
|
43
|
+
*/
|
|
38
44
|
exports.oasUnknownData = v.object({
|
|
39
45
|
oasType: v.literal('schema'),
|
|
40
46
|
title: v.optional(v.string()),
|