@skmtc/core 0.0.798 → 0.0.800
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 +26 -1
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +26 -1
- package/esm/context/ParseContext.d.ts +64 -3
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +61 -0
- package/esm/context/ResultsHandler.d.ts +10 -3
- package/esm/context/ResultsHandler.d.ts.map +1 -1
- package/esm/dsl/model/types.d.ts +51 -4
- package/esm/dsl/model/types.d.ts.map +1 -1
- package/esm/dsl/operation/types.d.ts +61 -3
- package/esm/dsl/operation/types.d.ts.map +1 -1
- 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/operation/Operation.d.ts +47 -2
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +43 -0
- package/esm/oas/ref/Ref.d.ts +49 -2
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +28 -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/esm/typescript/List.d.ts +64 -3
- package/esm/typescript/List.d.ts.map +1 -1
- package/esm/typescript/List.js +43 -0
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +26 -1
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +26 -1
- package/script/context/ParseContext.d.ts +64 -3
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +61 -0
- package/script/context/ResultsHandler.d.ts +10 -3
- package/script/context/ResultsHandler.d.ts.map +1 -1
- package/script/dsl/model/types.d.ts +51 -4
- package/script/dsl/model/types.d.ts.map +1 -1
- package/script/dsl/operation/types.d.ts +61 -3
- package/script/dsl/operation/types.d.ts.map +1 -1
- 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/operation/Operation.d.ts +47 -2
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +43 -0
- package/script/oas/ref/Ref.d.ts +49 -2
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +28 -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
- package/script/typescript/List.d.ts +64 -3
- package/script/typescript/List.d.ts.map +1 -1
- package/script/typescript/List.js +43 -0
|
@@ -5,40 +5,88 @@ import type { Identifier } from '../Identifier.js';
|
|
|
5
5
|
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
6
6
|
import type * as v from 'valibot';
|
|
7
7
|
import type { MappingModule, PreviewModule } from '../../types/Preview.js';
|
|
8
|
+
/**
|
|
9
|
+
* Arguments passed to operation insertable constructors.
|
|
10
|
+
*
|
|
11
|
+
* @template EnrichmentType - Optional enrichment data type for additional metadata
|
|
12
|
+
*/
|
|
8
13
|
export type OperationInsertableArgs<EnrichmentType = undefined> = {
|
|
9
14
|
context: GenerateContext;
|
|
10
15
|
settings: ContentSettings<EnrichmentType>;
|
|
11
16
|
operation: OasOperation;
|
|
12
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Arguments passed to operation transformation functions.
|
|
20
|
+
*
|
|
21
|
+
* @template Acc - Accumulator type for collecting transformation results
|
|
22
|
+
*/
|
|
13
23
|
export type TransformOperationArgs<Acc> = {
|
|
14
24
|
context: GenerateContext;
|
|
15
25
|
operation: OasOperation;
|
|
16
26
|
acc: Acc | undefined;
|
|
17
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Interface for objects that provide operation transformation capabilities.
|
|
30
|
+
*
|
|
31
|
+
* Used by generator configurations to transform operation definitions
|
|
32
|
+
* during the code generation process.
|
|
33
|
+
*/
|
|
18
34
|
export type WithTransformOperation = {
|
|
19
35
|
transformOperation: (operation: OasOperation) => void;
|
|
20
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Arguments for checking if an operation is supported with enrichment configuration.
|
|
39
|
+
*
|
|
40
|
+
* @template EnrichmentType - Optional enrichment data type for additional metadata
|
|
41
|
+
*/
|
|
21
42
|
export type IsSupportedOperationConfigArgs<EnrichmentType = undefined> = {
|
|
22
43
|
context: GenerateContext;
|
|
23
44
|
operation: OasOperation;
|
|
24
45
|
enrichments: EnrichmentType;
|
|
25
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Arguments for checking if an operation is supported for code generation.
|
|
49
|
+
*/
|
|
26
50
|
export type IsSupportedOperationArgs = {
|
|
27
51
|
context: GenerateContext;
|
|
28
52
|
operation: OasOperation;
|
|
29
53
|
};
|
|
30
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Arguments for generating enrichment data for operations.
|
|
56
|
+
*/
|
|
57
|
+
export type OperationToEnrichmentsArgs = {
|
|
31
58
|
operation: OasOperation;
|
|
32
59
|
context: GenerateContext;
|
|
33
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Arguments for generating operation preview modules.
|
|
63
|
+
*
|
|
64
|
+
* Preview modules provide quick insights into generated operations
|
|
65
|
+
* without full code generation.
|
|
66
|
+
*/
|
|
34
67
|
export type ToOperationPreviewModuleArgs = {
|
|
35
68
|
context: GenerateContext;
|
|
36
69
|
operation: OasOperation;
|
|
37
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Arguments for generating operation mapping information.
|
|
73
|
+
*
|
|
74
|
+
* Mappings track relationships between OAS operations and generated code,
|
|
75
|
+
* enabling cross-references and dependency analysis.
|
|
76
|
+
*/
|
|
38
77
|
export type ToOperationMappingArgs = {
|
|
39
78
|
context: GenerateContext;
|
|
40
79
|
operation: OasOperation;
|
|
41
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Configuration object for insertable operation generators.
|
|
83
|
+
*
|
|
84
|
+
* Defines the contract for operation generator classes that can be inserted
|
|
85
|
+
* into the generation context to produce type-safe operation definitions.
|
|
86
|
+
*
|
|
87
|
+
* @template V - Generated value type produced by the operation generator
|
|
88
|
+
* @template EnrichmentType - Optional enrichment data type for additional metadata
|
|
89
|
+
*/
|
|
42
90
|
export type OperationInsertable<V, EnrichmentType = undefined> = {
|
|
43
91
|
prototype: V;
|
|
44
92
|
} & {
|
|
@@ -47,12 +95,23 @@ export type OperationInsertable<V, EnrichmentType = undefined> = {
|
|
|
47
95
|
type: 'operation';
|
|
48
96
|
toIdentifier: (operation: OasOperation) => Identifier;
|
|
49
97
|
toExportPath: (operation: OasOperation) => string;
|
|
50
|
-
toEnrichments: ({ operation, context }:
|
|
98
|
+
toEnrichments: ({ operation, context }: OperationToEnrichmentsArgs) => EnrichmentType;
|
|
51
99
|
} & Function;
|
|
100
|
+
/**
|
|
101
|
+
* Arguments for checking if an operation is supported for generation.
|
|
102
|
+
*/
|
|
52
103
|
export type IsSupportedArgs = {
|
|
53
104
|
context: GenerateContext;
|
|
54
105
|
operation: OasOperation;
|
|
55
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* Configuration object for operation generators.
|
|
109
|
+
*
|
|
110
|
+
* Defines the behavior and capabilities of operation generators including
|
|
111
|
+
* support detection, transformation logic, and enrichment handling.
|
|
112
|
+
*
|
|
113
|
+
* @template EnrichmentType - Optional enrichment data type for additional metadata
|
|
114
|
+
*/
|
|
56
115
|
export type OperationConfig<EnrichmentType = undefined> = {
|
|
57
116
|
id: string;
|
|
58
117
|
type: 'operation';
|
|
@@ -63,5 +122,4 @@ export type OperationConfig<EnrichmentType = undefined> = {
|
|
|
63
122
|
toMappingModule?: ({ context, operation }: ToOperationMappingArgs) => MappingModule;
|
|
64
123
|
toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(operation: OasOperation) => EnrichmentRequest<RequestedEnrichment> | undefined;
|
|
65
124
|
};
|
|
66
|
-
export {};
|
|
67
125
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC1E,MAAM,MAAM,uBAAuB,CAAC,cAAc,GAAG,SAAS,IAAI;IAChE,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,sBAAsB,CAAC,GAAG,IAAI;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,SAAS,EAAE,YAAY,CAAA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,aAAa,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,0BAA0B,KAAK,cAAc,CAAA;CAEtF,GAAG,QAAQ,CAAA;AAEZ;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,eAAe,CAAA;IACxB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,CAAC,cAAc,GAAG,SAAS,IAAI;IACxD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,EAAE,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,sBAAsB,CAAC,GAAG,CAAC,KAAK,GAAG,CAAA;IACxF,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;IAC1D,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,KAAK,OAAO,CAAA;IACjE,eAAe,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,4BAA4B,KAAK,aAAa,CAAA;IACzF,eAAe,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,sBAAsB,KAAK,aAAa,CAAA;IACnF,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,SAAS,cAAc,EAC/D,SAAS,EAAE,YAAY,KACpB,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAA;CACxD,CAAA"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { type OasSchemaData } from '../schema/schema-types.js';
|
|
3
3
|
import { type OasSchemaRefData } from '../ref/ref-types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Valibot schema for validating OpenAPI array data objects.
|
|
6
|
+
*
|
|
7
|
+
* Validates array schemas including item type definitions, length constraints,
|
|
8
|
+
* uniqueness requirements, and enumeration values. Uses lazy evaluation
|
|
9
|
+
* to handle recursive schema references.
|
|
10
|
+
*/
|
|
4
11
|
export declare const oasArrayData: v.ObjectSchema<{
|
|
5
12
|
readonly type: v.LiteralSchema<"array", undefined>;
|
|
6
13
|
readonly items: v.LazySchema<v.UnionSchema<[v.LazySchema<v.GenericSchema<OasSchemaData>>, v.GenericSchema<OasSchemaRefData>], undefined>>;
|
|
@@ -12,15 +19,31 @@ export declare const oasArrayData: v.ObjectSchema<{
|
|
|
12
19
|
readonly uniqueItems: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
13
20
|
readonly enums: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
14
21
|
}, undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* Data type for OpenAPI array schema objects.
|
|
24
|
+
*
|
|
25
|
+
* Represents array schemas with item type specifications, length constraints,
|
|
26
|
+
* and validation rules. Used throughout the SKMTC pipeline for array type
|
|
27
|
+
* processing and code generation.
|
|
28
|
+
*/
|
|
15
29
|
export type OasArrayData = {
|
|
30
|
+
/** Type identifier (always 'array') */
|
|
16
31
|
type: 'array';
|
|
32
|
+
/** Schema definition for array items */
|
|
17
33
|
items: OasSchemaData | OasSchemaRefData;
|
|
34
|
+
/** Human-readable title for the array */
|
|
18
35
|
title?: string;
|
|
36
|
+
/** Detailed description of the array's purpose */
|
|
19
37
|
description?: string;
|
|
38
|
+
/** Default value for the array */
|
|
20
39
|
default?: unknown[];
|
|
40
|
+
/** Maximum number of items allowed */
|
|
21
41
|
maxItems?: number;
|
|
42
|
+
/** Minimum number of items required */
|
|
22
43
|
minItems?: number;
|
|
44
|
+
/** Whether all items must be unique */
|
|
23
45
|
uniqueItems?: boolean;
|
|
46
|
+
/** Array of valid enumeration values */
|
|
24
47
|
enums?: unknown[];
|
|
25
48
|
};
|
|
26
49
|
//# 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,eAAO,MAAM,YAAY;;;;;;;;;;aAUvB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,aAAa,GAAG,gBAAgB,CAAA;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,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;;;;;;;;;;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"}
|
|
@@ -37,6 +37,13 @@ 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");
|
|
40
|
+
/**
|
|
41
|
+
* Valibot schema for validating OpenAPI array data objects.
|
|
42
|
+
*
|
|
43
|
+
* Validates array schemas including item type definitions, length constraints,
|
|
44
|
+
* uniqueness requirements, and enumeration values. Uses lazy evaluation
|
|
45
|
+
* to handle recursive schema references.
|
|
46
|
+
*/
|
|
40
47
|
exports.oasArrayData = v.object({
|
|
41
48
|
type: v.literal('array'),
|
|
42
49
|
items: v.lazy(() => v.union([v.lazy(() => schema_types_js_1.oasSchemaData), ref_types_js_1.oasSchemaRefData])),
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Valibot schema for validating OpenAPI boolean data objects.
|
|
4
|
+
*
|
|
5
|
+
* Validates boolean schemas including default values and enumeration
|
|
6
|
+
* constraints. Boolean enums typically contain [true, false] or single values.
|
|
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>;
|
|
15
|
+
/**
|
|
16
|
+
* Data type for OpenAPI boolean schema objects.
|
|
17
|
+
*
|
|
18
|
+
* Represents boolean schemas with optional default values and enumeration
|
|
19
|
+
* constraints. Used throughout the SKMTC pipeline for boolean type
|
|
20
|
+
* processing and code generation.
|
|
21
|
+
*/
|
|
3
22
|
export type OasBooleanData = {
|
|
23
|
+
/** Type identifier (always 'boolean') */
|
|
4
24
|
type: 'boolean';
|
|
25
|
+
/** Human-readable title for the boolean */
|
|
5
26
|
title?: string;
|
|
27
|
+
/** Detailed description of the boolean's purpose */
|
|
6
28
|
description?: string;
|
|
29
|
+
/** Default value for the boolean */
|
|
7
30
|
default?: boolean;
|
|
31
|
+
/** Array of valid boolean values (typically [true], [false], or [true, false]) */
|
|
8
32
|
enum?: boolean[];
|
|
9
33
|
};
|
|
10
34
|
//# sourceMappingURL=boolean-types.d.ts.map
|
|
@@ -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,eAAO,MAAM,cAAc,
|
|
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"}
|
|
@@ -35,6 +35,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.oasBooleanData = void 0;
|
|
37
37
|
const v = __importStar(require("valibot"));
|
|
38
|
+
/**
|
|
39
|
+
* Valibot schema for validating OpenAPI boolean data objects.
|
|
40
|
+
*
|
|
41
|
+
* Validates boolean schemas including default values and enumeration
|
|
42
|
+
* constraints. Boolean enums typically contain [true, false] or single values.
|
|
43
|
+
*/
|
|
38
44
|
exports.oasBooleanData = v.object({
|
|
39
45
|
type: v.literal('boolean'),
|
|
40
46
|
title: v.optional(v.string()),
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Data type for OpenAPI discriminator objects.
|
|
4
|
+
*
|
|
5
|
+
* Discriminators are used with union types (oneOf/anyOf) to provide
|
|
6
|
+
* hints about which schema variant to use based on a property value.
|
|
7
|
+
* This enables more efficient type resolution and better tooling support.
|
|
8
|
+
*/
|
|
2
9
|
export type OasDiscriminatorData = {
|
|
10
|
+
/** Type category identifier for discriminator objects */
|
|
3
11
|
oasType: 'discriminator';
|
|
12
|
+
/** Name of the property that contains the discriminator value */
|
|
4
13
|
propertyName: string;
|
|
14
|
+
/** Optional mapping from property values to schema names */
|
|
5
15
|
mapping?: Record<string, string>;
|
|
6
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Valibot schema for validating OpenAPI discriminator data objects.
|
|
19
|
+
*
|
|
20
|
+
* Validates discriminator objects including the required property name
|
|
21
|
+
* and optional value-to-schema mappings. Used to ensure discriminator
|
|
22
|
+
* objects conform to OpenAPI specification requirements.
|
|
23
|
+
*/
|
|
7
24
|
export declare const oasDiscriminatorData: v.ObjectSchema<{
|
|
8
25
|
readonly oasType: v.LiteralSchema<"discriminator", undefined>;
|
|
9
26
|
readonly propertyName: v.StringSchema<undefined>;
|
|
@@ -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,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC,CAAA;AAED,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;;;;aAI/B,CAAA"}
|
|
@@ -35,6 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.oasDiscriminatorData = void 0;
|
|
37
37
|
const v = __importStar(require("valibot"));
|
|
38
|
+
/**
|
|
39
|
+
* Valibot schema for validating OpenAPI discriminator data objects.
|
|
40
|
+
*
|
|
41
|
+
* Validates discriminator objects including the required property name
|
|
42
|
+
* and optional value-to-schema mappings. Used to ensure discriminator
|
|
43
|
+
* objects conform to OpenAPI specification requirements.
|
|
44
|
+
*/
|
|
38
45
|
exports.oasDiscriminatorData = v.object({
|
|
39
46
|
oasType: v.literal('discriminator'),
|
|
40
47
|
propertyName: v.string(),
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Valibot schema for validating integer values.
|
|
4
|
+
*
|
|
5
|
+
* Ensures values are numbers and specifically integers,
|
|
6
|
+
* used for integer validation throughout OAS processing.
|
|
7
|
+
*/
|
|
2
8
|
export declare const integerSchema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
9
|
+
/**
|
|
10
|
+
* Valibot schema for valid integer format values.
|
|
11
|
+
*
|
|
12
|
+
* Defines the size formats for integer types: int32 for 32-bit signed
|
|
13
|
+
* integers and int64 for 64-bit signed integers.
|
|
14
|
+
*/
|
|
3
15
|
export declare const integerFormat: v.UnionSchema<[v.LiteralSchema<"int32", undefined>, v.LiteralSchema<"int64", undefined>], undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Valibot schema for validating OpenAPI integer data objects.
|
|
18
|
+
*
|
|
19
|
+
* Validates integer schemas including size formats (int32/int64),
|
|
20
|
+
* range constraints, multiple validation, and enumeration values.
|
|
21
|
+
*/
|
|
4
22
|
export declare const oasIntegerData: v.ObjectSchema<{
|
|
5
23
|
readonly type: v.LiteralSchema<"integer", undefined>;
|
|
6
24
|
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integer-types.d.ts","sourceRoot":"","sources":["../../../src/oas/integer/integer-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,aAAa,4FAAkC,CAAA;AAE5D,eAAO,MAAM,aAAa,sGAAoD,CAAA;AAE9E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;aAczB,CAAA;AAEF,MAAM,MAA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AChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA"}
|
|
@@ -35,8 +35,26 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.oasIntegerData = exports.integerFormat = exports.integerSchema = void 0;
|
|
37
37
|
const v = __importStar(require("valibot"));
|
|
38
|
+
/**
|
|
39
|
+
* Valibot schema for validating integer values.
|
|
40
|
+
*
|
|
41
|
+
* Ensures values are numbers and specifically integers,
|
|
42
|
+
* used for integer validation throughout OAS processing.
|
|
43
|
+
*/
|
|
38
44
|
exports.integerSchema = v.pipe(v.number(), v.integer());
|
|
45
|
+
/**
|
|
46
|
+
* Valibot schema for valid integer format values.
|
|
47
|
+
*
|
|
48
|
+
* Defines the size formats for integer types: int32 for 32-bit signed
|
|
49
|
+
* integers and int64 for 64-bit signed integers.
|
|
50
|
+
*/
|
|
39
51
|
exports.integerFormat = v.union([v.literal('int32'), v.literal('int64')]);
|
|
52
|
+
/**
|
|
53
|
+
* Valibot schema for validating OpenAPI integer data objects.
|
|
54
|
+
*
|
|
55
|
+
* Validates integer schemas including size formats (int32/int64),
|
|
56
|
+
* range constraints, multiple validation, and enumeration values.
|
|
57
|
+
*/
|
|
40
58
|
exports.oasIntegerData = v.object({
|
|
41
59
|
type: v.literal('integer'),
|
|
42
60
|
title: v.optional(v.string()),
|
|
@@ -2,12 +2,29 @@ import { type OasExampleData } from '../example/example-types.js';
|
|
|
2
2
|
import { type OasExampleRefData, type OasSchemaRefData } from '../ref/ref-types.js';
|
|
3
3
|
import { type OasSchemaData } from '../schema/schema-types.js';
|
|
4
4
|
import * as v from 'valibot';
|
|
5
|
+
/**
|
|
6
|
+
* Data type for OpenAPI media type objects.
|
|
7
|
+
*
|
|
8
|
+
* Represents media type definitions within request/response bodies,
|
|
9
|
+
* specifying the format, schema, and examples for different content types
|
|
10
|
+
* like application/json, multipart/form-data, etc.
|
|
11
|
+
*/
|
|
5
12
|
export type OasMediaTypeData = {
|
|
13
|
+
/** Type identifier for OAS media type objects */
|
|
6
14
|
oasType: 'mediaType';
|
|
15
|
+
/** The media type identifier (e.g., 'application/json', 'text/plain') */
|
|
7
16
|
mediaType: string;
|
|
17
|
+
/** Schema definition for the media type content */
|
|
8
18
|
schema?: OasSchemaData | OasSchemaRefData;
|
|
19
|
+
/** Named examples for the media type content */
|
|
9
20
|
examples?: Record<string, OasExampleData | OasExampleRefData>;
|
|
10
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Valibot schema for validating OpenAPI media type data.
|
|
24
|
+
*
|
|
25
|
+
* Validates the structure of media type objects including content type
|
|
26
|
+
* identifiers, schema definitions, and example collections.
|
|
27
|
+
*/
|
|
11
28
|
export declare const oasMediaTypeData: v.ObjectSchema<{
|
|
12
29
|
readonly oasType: v.LiteralSchema<"mediaType", undefined>;
|
|
13
30
|
readonly mediaType: v.StringSchema<undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaType-types.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/mediaType-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,6BAA6B,CAAA;AACjF,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAGtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,WAAW,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAA;IAEzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,CAAC,CAAA;CAE9D,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;aAO3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"mediaType-types.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/mediaType-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,6BAA6B,CAAA;AACjF,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAGtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,iDAAiD;IACjD,OAAO,EAAE,WAAW,CAAA;IACpB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,MAAM,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAA;IAEzC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,CAAC,CAAA;CAE9D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;aAO3B,CAAA"}
|
|
@@ -38,6 +38,12 @@ const example_types_js_1 = require("../example/example-types.js");
|
|
|
38
38
|
const ref_types_js_1 = require("../ref/ref-types.js");
|
|
39
39
|
const schema_types_js_1 = require("../schema/schema-types.js");
|
|
40
40
|
const v = __importStar(require("valibot"));
|
|
41
|
+
/**
|
|
42
|
+
* Valibot schema for validating OpenAPI media type data.
|
|
43
|
+
*
|
|
44
|
+
* Validates the structure of media type objects including content type
|
|
45
|
+
* identifiers, schema definitions, and example collections.
|
|
46
|
+
*/
|
|
41
47
|
exports.oasMediaTypeData = v.object({
|
|
42
48
|
oasType: v.literal('mediaType'),
|
|
43
49
|
mediaType: v.string(),
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Valibot schema for valid number format values.
|
|
4
|
+
*
|
|
5
|
+
* Defines the precision formats for number types: float for single-precision
|
|
6
|
+
* and double for double-precision floating-point numbers.
|
|
7
|
+
*/
|
|
2
8
|
export declare const numberFormat: v.UnionSchema<[v.LiteralSchema<"float", undefined>, v.LiteralSchema<"double", undefined>], undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Valibot schema for validating OpenAPI number data objects.
|
|
11
|
+
*
|
|
12
|
+
* Validates number schemas including precision formats, range constraints,
|
|
13
|
+
* multiple validation, and enumeration values.
|
|
14
|
+
*/
|
|
3
15
|
export declare const oasNumberData: v.ObjectSchema<{
|
|
4
16
|
readonly type: v.LiteralSchema<"number", undefined>;
|
|
5
17
|
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-types.d.ts","sourceRoot":"","sources":["../../../src/oas/number/number-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,YAAY,uGAAqD,CAAA;AAE9E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;aAcxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"number-types.d.ts","sourceRoot":"","sources":["../../../src/oas/number/number-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,YAAY,uGAAqD,CAAA;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;aAcxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA"}
|
|
@@ -35,7 +35,19 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.oasNumberData = exports.numberFormat = void 0;
|
|
37
37
|
const v = __importStar(require("valibot"));
|
|
38
|
+
/**
|
|
39
|
+
* Valibot schema for valid number format values.
|
|
40
|
+
*
|
|
41
|
+
* Defines the precision formats for number types: float for single-precision
|
|
42
|
+
* and double for double-precision floating-point numbers.
|
|
43
|
+
*/
|
|
38
44
|
exports.numberFormat = v.union([v.literal('float'), v.literal('double')]);
|
|
45
|
+
/**
|
|
46
|
+
* Valibot schema for validating OpenAPI number data objects.
|
|
47
|
+
*
|
|
48
|
+
* Validates number schemas including precision formats, range constraints,
|
|
49
|
+
* multiple validation, and enumeration values.
|
|
50
|
+
*/
|
|
39
51
|
exports.oasNumberData = v.object({
|
|
40
52
|
type: v.literal('number'),
|
|
41
53
|
title: v.optional(v.string()),
|
|
@@ -46,7 +46,10 @@ export type OperationFields = {
|
|
|
46
46
|
/** OpenAPI specification extensions */
|
|
47
47
|
extensionFields?: Record<string, unknown>;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Arguments passed to request body mapping functions.
|
|
51
|
+
*/
|
|
52
|
+
export type ToRequestBodyMapArgs = {
|
|
50
53
|
schema: OasSchema | OasRef<'schema'>;
|
|
51
54
|
requestBody: OasRequestBody;
|
|
52
55
|
};
|
|
@@ -186,9 +189,35 @@ export declare class OasOperation {
|
|
|
186
189
|
deprecated: boolean | undefined;
|
|
187
190
|
/** OpenAPI specification extensions */
|
|
188
191
|
extensionFields: Record<string, unknown> | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Creates a new OasOperation instance from operation field data.
|
|
194
|
+
*
|
|
195
|
+
* @param fields - Operation field data from OpenAPI specification
|
|
196
|
+
*/
|
|
189
197
|
constructor(fields: OperationFields);
|
|
198
|
+
/**
|
|
199
|
+
* Returns the successful response definition for this operation.
|
|
200
|
+
*
|
|
201
|
+
* Looks for the lowest numbered 2xx response code and returns its response definition.
|
|
202
|
+
*
|
|
203
|
+
* @returns Success response object or undefined if none found
|
|
204
|
+
*/
|
|
190
205
|
toSuccessResponse(): OasResponse | OasRef<'response'> | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* Returns the HTTP status code for the primary success response.
|
|
208
|
+
*
|
|
209
|
+
* Finds the lowest numbered 2xx status code in the responses.
|
|
210
|
+
*
|
|
211
|
+
* @returns Success status code as string or undefined if none found
|
|
212
|
+
*/
|
|
191
213
|
toSuccessResponseCode(): string | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* Maps the request body schema to a custom value using the provided mapping function.
|
|
216
|
+
*
|
|
217
|
+
* @param map - Function to transform the request body schema and metadata
|
|
218
|
+
* @param mediaType - Media type to extract schema from (default: 'application/json')
|
|
219
|
+
* @returns Mapped value or undefined if no request body schema found
|
|
220
|
+
*/
|
|
192
221
|
toRequestBody<V>(map: ({ schema, requestBody }: ToRequestBodyMapArgs) => V, mediaType?: string): V | undefined;
|
|
193
222
|
/**
|
|
194
223
|
* Resolve all parameters and optionally filter by location
|
|
@@ -197,9 +226,25 @@ export declare class OasOperation {
|
|
|
197
226
|
* @returns
|
|
198
227
|
*/
|
|
199
228
|
toParams(filter?: OasParameterLocation[]): OasParameter[];
|
|
229
|
+
/**
|
|
230
|
+
* Creates an OAS object representation of operation parameters.
|
|
231
|
+
*
|
|
232
|
+
* @param filter - Optional array of parameter locations to include
|
|
233
|
+
* @returns OAS object with parameter properties
|
|
234
|
+
*/
|
|
200
235
|
toParametersObject(filter?: OasParameterLocation[]): OasObject;
|
|
236
|
+
/**
|
|
237
|
+
* Converts the operation to OpenAPI v3 JSON schema format.
|
|
238
|
+
*
|
|
239
|
+
* @param options - Conversion options for nested components
|
|
240
|
+
* @returns OpenAPI v3 operation object
|
|
241
|
+
*/
|
|
201
242
|
toJsonSchema(options: ToJsonSchemaOptions): OpenAPIV3.OperationObject;
|
|
243
|
+
/**
|
|
244
|
+
* Serializes the operation to a plain JavaScript object.
|
|
245
|
+
*
|
|
246
|
+
* @returns Plain object representation of the operation
|
|
247
|
+
*/
|
|
202
248
|
toJSON(): object;
|
|
203
249
|
}
|
|
204
|
-
export {};
|
|
205
250
|
//# sourceMappingURL=Operation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/Operation.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,E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CAAC,EACb,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,oBAAoB,KAAK,CAAC,EACzD,SAAS,SAAqB,GAC7B,CAAC,GAAG,SAAS;IAOhB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,YAAY,EAAE;IAQzD;;;;;OAKG;IACH,kBAAkB,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS;IAY9D;;;;;OAKG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,eAAe;IAiBrE;;;;OAIG;IACH,MAAM,IAAI,MAAM;CAcjB"}
|
|
@@ -111,6 +111,11 @@ const Object_js_1 = require("../object/Object.js");
|
|
|
111
111
|
* ```
|
|
112
112
|
*/
|
|
113
113
|
class OasOperation {
|
|
114
|
+
/**
|
|
115
|
+
* Creates a new OasOperation instance from operation field data.
|
|
116
|
+
*
|
|
117
|
+
* @param fields - Operation field data from OpenAPI specification
|
|
118
|
+
*/
|
|
114
119
|
constructor(fields) {
|
|
115
120
|
/** Type identifier for OAS operation objects */
|
|
116
121
|
Object.defineProperty(this, "oasType", {
|
|
@@ -224,10 +229,24 @@ class OasOperation {
|
|
|
224
229
|
this.deprecated = fields.deprecated;
|
|
225
230
|
this.extensionFields = fields.extensionFields;
|
|
226
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Returns the successful response definition for this operation.
|
|
234
|
+
*
|
|
235
|
+
* Looks for the lowest numbered 2xx response code and returns its response definition.
|
|
236
|
+
*
|
|
237
|
+
* @returns Success response object or undefined if none found
|
|
238
|
+
*/
|
|
227
239
|
toSuccessResponse() {
|
|
228
240
|
const successCode = this.toSuccessResponseCode();
|
|
229
241
|
return successCode ? this.responses[successCode] : undefined;
|
|
230
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Returns the HTTP status code for the primary success response.
|
|
245
|
+
*
|
|
246
|
+
* Finds the lowest numbered 2xx status code in the responses.
|
|
247
|
+
*
|
|
248
|
+
* @returns Success status code as string or undefined if none found
|
|
249
|
+
*/
|
|
231
250
|
toSuccessResponseCode() {
|
|
232
251
|
const successCode = Object.keys(this.responses)
|
|
233
252
|
.map(httpCode => parseInt(httpCode))
|
|
@@ -241,6 +260,13 @@ class OasOperation {
|
|
|
241
260
|
}
|
|
242
261
|
return undefined;
|
|
243
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Maps the request body schema to a custom value using the provided mapping function.
|
|
265
|
+
*
|
|
266
|
+
* @param map - Function to transform the request body schema and metadata
|
|
267
|
+
* @param mediaType - Media type to extract schema from (default: 'application/json')
|
|
268
|
+
* @returns Mapped value or undefined if no request body schema found
|
|
269
|
+
*/
|
|
244
270
|
toRequestBody(map, mediaType = 'application/json') {
|
|
245
271
|
const requestBody = this.requestBody?.resolve();
|
|
246
272
|
const schema = requestBody?.content[mediaType]?.schema;
|
|
@@ -257,6 +283,12 @@ class OasOperation {
|
|
|
257
283
|
?.map(param => param.resolve())
|
|
258
284
|
.filter(param => (filter?.length ? filter.includes(param.location) : true)) ?? []);
|
|
259
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Creates an OAS object representation of operation parameters.
|
|
288
|
+
*
|
|
289
|
+
* @param filter - Optional array of parameter locations to include
|
|
290
|
+
* @returns OAS object with parameter properties
|
|
291
|
+
*/
|
|
260
292
|
toParametersObject(filter) {
|
|
261
293
|
const parameters = this.toParams(filter);
|
|
262
294
|
return parameters.reduce((acc, parameter) => {
|
|
@@ -267,6 +299,12 @@ class OasOperation {
|
|
|
267
299
|
});
|
|
268
300
|
}, Object_js_1.OasObject.empty());
|
|
269
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Converts the operation to OpenAPI v3 JSON schema format.
|
|
304
|
+
*
|
|
305
|
+
* @param options - Conversion options for nested components
|
|
306
|
+
* @returns OpenAPI v3 operation object
|
|
307
|
+
*/
|
|
270
308
|
toJsonSchema(options) {
|
|
271
309
|
return {
|
|
272
310
|
tags: this.tags,
|
|
@@ -281,6 +319,11 @@ class OasOperation {
|
|
|
281
319
|
...this.extensionFields
|
|
282
320
|
};
|
|
283
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Serializes the operation to a plain JavaScript object.
|
|
324
|
+
*
|
|
325
|
+
* @returns Plain object representation of the operation
|
|
326
|
+
*/
|
|
284
327
|
toJSON() {
|
|
285
328
|
return {
|
|
286
329
|
tags: this.tags,
|