@kubb/adapter-oas 5.0.0-alpha.14 → 5.0.0-alpha.16
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/dist/index.cjs +164 -404
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.js +158 -402
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/adapter.ts +3 -5
- package/src/constants.ts +0 -49
- package/src/discriminator.ts +25 -0
- package/src/infer.ts +85 -0
- package/src/naming.ts +25 -0
- package/src/oas/Oas.ts +2 -10
- package/src/oas/types.ts +10 -4
- package/src/parser.ts +123 -340
- package/src/refResolver.ts +65 -0
- package/src/types.ts +0 -11
- package/src/utils.ts +0 -168
package/dist/index.d.ts
CHANGED
|
@@ -54,11 +54,6 @@ type ReferenceObject = OpenAPIV3.ReferenceObject;
|
|
|
54
54
|
type OasOptions = {
|
|
55
55
|
contentType?: contentType;
|
|
56
56
|
discriminator?: 'strict' | 'inherit';
|
|
57
|
-
/**
|
|
58
|
-
* Resolve name collisions when schemas from different components share the same name (case-insensitive).
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
collisionDetection?: boolean;
|
|
62
57
|
};
|
|
63
58
|
declare class Oas extends BaseOas {
|
|
64
59
|
#private;
|
|
@@ -92,7 +87,6 @@ declare class Oas extends BaseOas {
|
|
|
92
87
|
getSchemas(options?: {
|
|
93
88
|
contentType?: contentType;
|
|
94
89
|
includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
|
|
95
|
-
collisionDetection?: boolean;
|
|
96
90
|
}): {
|
|
97
91
|
schemas: Record<string, SchemaObject$1>;
|
|
98
92
|
nameMapping: Map<string, string>;
|
|
@@ -163,16 +157,6 @@ type OasAdapterOptions = {
|
|
|
163
157
|
* @default 'strict'
|
|
164
158
|
*/
|
|
165
159
|
discriminator?: 'strict' | 'inherit';
|
|
166
|
-
/**
|
|
167
|
-
* Enable collision detection for inline enum and schema type names.
|
|
168
|
-
* When `true` (default), full-path names are used and name collisions
|
|
169
|
-
* across schema components are automatically resolved (e.g. `OrderParamsStatusEnum`).
|
|
170
|
-
* When `false`, enum names use only the immediate property context
|
|
171
|
-
* (e.g. `ParamsStatusEnum`) matching the v4 naming conventions, with numeric
|
|
172
|
-
* suffixes for deduplication (e.g. `ParamsStatusEnum2`).
|
|
173
|
-
* @default true
|
|
174
|
-
*/
|
|
175
|
-
collisionDetection?: boolean;
|
|
176
160
|
} & Partial<ParserOptions>;
|
|
177
161
|
type OasAdapterResolvedOptions = {
|
|
178
162
|
validate: boolean;
|
|
@@ -181,7 +165,6 @@ type OasAdapterResolvedOptions = {
|
|
|
181
165
|
serverIndex: OasAdapterOptions['serverIndex'];
|
|
182
166
|
serverVariables: OasAdapterOptions['serverVariables'];
|
|
183
167
|
discriminator: NonNullable<OasAdapterOptions['discriminator']>;
|
|
184
|
-
collisionDetection: boolean;
|
|
185
168
|
dateType: NonNullable<OasAdapterOptions['dateType']>;
|
|
186
169
|
integerType: NonNullable<OasAdapterOptions['integerType']>;
|
|
187
170
|
unknownType: NonNullable<OasAdapterOptions['unknownType']>;
|