@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/src/types.ts
CHANGED
|
@@ -7,8 +7,7 @@ import type { Operation } from './operation.ts'
|
|
|
7
7
|
export type { Operation }
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* Supports `'application/json'` or any other media type.
|
|
10
|
+
* Media type used to pick a schema from an operation's request or response.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* ```ts
|
|
@@ -68,13 +67,13 @@ export type SchemaObject = {
|
|
|
68
67
|
*/
|
|
69
68
|
items?: SchemaObject | ReferenceObject
|
|
70
69
|
/**
|
|
71
|
-
*
|
|
70
|
+
* Allowed values for this schema.
|
|
72
71
|
*/
|
|
73
72
|
enum?: Array<string | number | boolean | null>
|
|
74
73
|
} & (OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject | JSONSchema4 | JSONSchema6 | JSONSchema7)
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
|
-
* HTTP method
|
|
76
|
+
* HTTP method in the lowercase form an OpenAPI path item uses for its keys.
|
|
78
77
|
*/
|
|
79
78
|
export type HttpMethod = Lowercase<ast.HttpMethod>
|
|
80
79
|
|
|
@@ -104,7 +103,7 @@ export type DiscriminatorObject = OpenAPIV3.DiscriminatorObject | OpenAPIV3_1.Di
|
|
|
104
103
|
export type ReferenceObject = OpenAPIV3.ReferenceObject
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
|
-
* OpenAPI response object
|
|
106
|
+
* OpenAPI response object holding the content and headers for one status code.
|
|
108
107
|
*/
|
|
109
108
|
export type ResponseObject = OpenAPIV3.ResponseObject | OpenAPIV3_1.ResponseObject
|
|
110
109
|
|
|
@@ -131,9 +130,8 @@ export type ParameterObject = {
|
|
|
131
130
|
export type ServerObject = OpenAPIV3.ServerObject | OpenAPIV3_1.ServerObject
|
|
132
131
|
|
|
133
132
|
/**
|
|
134
|
-
* Configuration
|
|
135
|
-
*
|
|
136
|
-
* from the spec.
|
|
133
|
+
* Configuration for the OpenAPI adapter: spec validation, content-type selection,
|
|
134
|
+
* server URL resolution, and how schema types are derived.
|
|
137
135
|
*
|
|
138
136
|
* @example
|
|
139
137
|
* ```ts
|
|
@@ -194,9 +192,9 @@ export type AdapterOasOptions = {
|
|
|
194
192
|
*
|
|
195
193
|
* Duplicated inline shapes (especially enums repeated across many properties) are hoisted
|
|
196
194
|
* into one named schema. Every other occurrence, and any structurally identical top-level
|
|
197
|
-
* component, becomes a `ref` to it. Equality is shape-only
|
|
198
|
-
* `description` and `example` is ignored.
|
|
199
|
-
*
|
|
195
|
+
* component, becomes a `ref` to it. Equality is shape-only, so documentation such as
|
|
196
|
+
* `description` and `example` is ignored. Set to `false` to keep every occurrence inline
|
|
197
|
+
* and produce byte-for-byte identical output to earlier versions.
|
|
200
198
|
*
|
|
201
199
|
* @default true
|
|
202
200
|
*/
|