@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/src/types.ts CHANGED
@@ -7,8 +7,7 @@ import type { Operation } from './operation.ts'
7
7
  export type { Operation }
8
8
 
9
9
  /**
10
- * Content-type string for selecting request/response schemas from an OpenAPI spec.
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
- * Enum values for this schema (narrowed from `unknown[]`).
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 as a lowercase string (`'get' | 'post' | ...`).
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 from a spec that contains schema, status code, and headers.
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 options for the OpenAPI adapter. Controls spec validation,
135
- * content-type selection, server URL resolution, and how types are derived
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: documentation such as
198
- * `description` and `example` is ignored. Enabled by default. Set to `false` to keep every
199
- * occurrence inline and produce byte-for-byte identical output to earlier versions.
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
  */