@kubb/adapter-oas 5.0.0-beta.57 → 5.0.0-beta.59
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 +178 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -11
- package/dist/index.js +177 -136
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/adapter.ts +2 -2
- package/src/constants.ts +3 -3
- package/src/discriminator.ts +42 -2
- package/src/parser.ts +64 -55
- package/src/resolvers.ts +1 -1
- package/src/stream.ts +7 -6
- package/src/types.ts +9 -11
package/dist/index.d.ts
CHANGED
|
@@ -1071,8 +1071,7 @@ type Operation = {
|
|
|
1071
1071
|
//#endregion
|
|
1072
1072
|
//#region src/types.d.ts
|
|
1073
1073
|
/**
|
|
1074
|
-
*
|
|
1075
|
-
* Supports `'application/json'` or any other media type.
|
|
1074
|
+
* Media type used to pick a schema from an operation's request or response.
|
|
1076
1075
|
*
|
|
1077
1076
|
* @example
|
|
1078
1077
|
* ```ts
|
|
@@ -1131,12 +1130,12 @@ type SchemaObject$1 = {
|
|
|
1131
1130
|
*/
|
|
1132
1131
|
items?: SchemaObject$1 | ReferenceObject$1;
|
|
1133
1132
|
/**
|
|
1134
|
-
*
|
|
1133
|
+
* Allowed values for this schema.
|
|
1135
1134
|
*/
|
|
1136
1135
|
enum?: Array<string | number | boolean | null>;
|
|
1137
1136
|
} & (OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject | JSONSchema4 | JSONSchema6 | JSONSchema7);
|
|
1138
1137
|
/**
|
|
1139
|
-
* HTTP method
|
|
1138
|
+
* HTTP method in the lowercase form an OpenAPI path item uses for its keys.
|
|
1140
1139
|
*/
|
|
1141
1140
|
type HttpMethod = Lowercase<ast.HttpMethod>;
|
|
1142
1141
|
/**
|
|
@@ -1156,7 +1155,7 @@ type DiscriminatorObject$1 = OpenAPIV3.DiscriminatorObject | OpenAPIV3_1.Discrim
|
|
|
1156
1155
|
*/
|
|
1157
1156
|
type ReferenceObject$1 = OpenAPIV3.ReferenceObject;
|
|
1158
1157
|
/**
|
|
1159
|
-
* OpenAPI response object
|
|
1158
|
+
* OpenAPI response object holding the content and headers for one status code.
|
|
1160
1159
|
*/
|
|
1161
1160
|
type ResponseObject$1 = OpenAPIV3.ResponseObject | OpenAPIV3_1.ResponseObject;
|
|
1162
1161
|
/**
|
|
@@ -1164,9 +1163,8 @@ type ResponseObject$1 = OpenAPIV3.ResponseObject | OpenAPIV3_1.ResponseObject;
|
|
|
1164
1163
|
*/
|
|
1165
1164
|
type MediaTypeObject$1 = OpenAPIV3.MediaTypeObject | OpenAPIV3_1.MediaTypeObject;
|
|
1166
1165
|
/**
|
|
1167
|
-
* Configuration
|
|
1168
|
-
*
|
|
1169
|
-
* from the spec.
|
|
1166
|
+
* Configuration for the OpenAPI adapter: spec validation, content-type selection,
|
|
1167
|
+
* server URL resolution, and how schema types are derived.
|
|
1170
1168
|
*
|
|
1171
1169
|
* @example
|
|
1172
1170
|
* ```ts
|
|
@@ -1227,9 +1225,9 @@ type AdapterOasOptions = {
|
|
|
1227
1225
|
*
|
|
1228
1226
|
* Duplicated inline shapes (especially enums repeated across many properties) are hoisted
|
|
1229
1227
|
* into one named schema. Every other occurrence, and any structurally identical top-level
|
|
1230
|
-
* component, becomes a `ref` to it. Equality is shape-only
|
|
1231
|
-
* `description` and `example` is ignored.
|
|
1232
|
-
*
|
|
1228
|
+
* component, becomes a `ref` to it. Equality is shape-only, so documentation such as
|
|
1229
|
+
* `description` and `example` is ignored. Set to `false` to keep every occurrence inline
|
|
1230
|
+
* and produce byte-for-byte identical output to earlier versions.
|
|
1233
1231
|
*
|
|
1234
1232
|
* @default true
|
|
1235
1233
|
*/
|