@kubb/adapter-oas 5.0.0-alpha.15 → 5.0.0-alpha.17
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 +126 -373
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -25
- package/dist/index.js +126 -373
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/adapter.ts +10 -3
- package/src/constants.ts +1 -51
- package/src/oas/types.ts +10 -4
- package/src/parser.ts +161 -335
- package/src/types.ts +1 -26
- package/src/utils.ts +0 -168
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as _kubb_core0 from "@kubb/core";
|
|
|
3
3
|
import { AdapterFactoryOptions } from "@kubb/core";
|
|
4
4
|
import { DiscriminatorObject, OASDocument, ParameterObject, SchemaObject } from "oas/types";
|
|
5
5
|
import BaseOas from "oas";
|
|
6
|
+
import { ParserOptions } from "@kubb/ast/types";
|
|
6
7
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
7
8
|
import { Operation } from "oas/operation";
|
|
8
9
|
import { OpenAPIV3 } from "openapi-types";
|
|
@@ -94,31 +95,6 @@ declare class Oas extends BaseOas {
|
|
|
94
95
|
}
|
|
95
96
|
//#endregion
|
|
96
97
|
//#region src/types.d.ts
|
|
97
|
-
/**
|
|
98
|
-
* Controls how various OAS constructs are mapped to Kubb AST nodes.
|
|
99
|
-
*/
|
|
100
|
-
type ParserOptions = {
|
|
101
|
-
/**
|
|
102
|
-
* How `format: 'date-time'` schemas are represented. `false` falls through to a plain string.
|
|
103
|
-
*/
|
|
104
|
-
dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
|
|
105
|
-
/**
|
|
106
|
-
* Whether `type: 'integer'` and `format: 'int64'` produce `number` or `bigint` nodes.
|
|
107
|
-
*/
|
|
108
|
-
integerType?: 'number' | 'bigint';
|
|
109
|
-
/**
|
|
110
|
-
* AST type used when no schema type can be inferred.
|
|
111
|
-
*/
|
|
112
|
-
unknownType: 'any' | 'unknown' | 'void';
|
|
113
|
-
/**
|
|
114
|
-
* AST type used for completely empty schemas (`{}`).
|
|
115
|
-
*/
|
|
116
|
-
emptySchemaType: 'any' | 'unknown' | 'void';
|
|
117
|
-
/**
|
|
118
|
-
* Suffix appended to derived enum names when building property schema names.
|
|
119
|
-
*/
|
|
120
|
-
enumSuffix: 'enum' | (string & {});
|
|
121
|
-
};
|
|
122
98
|
type OasAdapterOptions = {
|
|
123
99
|
/**
|
|
124
100
|
* Validate the OpenAPI spec before parsing.
|