@kubb/adapter-oas 5.15.4 → 5.16.1

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.d.cts CHANGED
@@ -1104,6 +1104,10 @@ type SchemaObject$1 = {
1104
1104
  * OAS 3.1: encoding applied to string content, such as `base64`.
1105
1105
  */
1106
1106
  contentEncoding?: string;
1107
+ /**
1108
+ * OAS 3.1: schema of the decoded value a string with `contentMediaType` holds.
1109
+ */
1110
+ contentSchema?: SchemaObject$1 | ReferenceObject$1;
1107
1111
  $ref?: string;
1108
1112
  /**
1109
1113
  * OAS 3.1: positional tuple items, replacing the multi-item `items` array from OAS 3.0.
@@ -1134,13 +1138,18 @@ type Document = OpenAPIV3_1.Document & Record<string, unknown>;
1134
1138
  */
1135
1139
  type OperationObject$1 = OpenAPIV3_1.OperationObject & Record<string, unknown>;
1136
1140
  /**
1137
- * Path item object holding the operations and shared parameters for a single URL path.
1141
+ * Path item object holding the operations and shared parameters for a single URL path, plus the
1142
+ * OpenAPI 3.2 `additionalOperations` map for HTTP methods outside the fixed fields.
1138
1143
  */
1139
- type PathItemObject$1 = OpenAPIV3_1.PathItemObject;
1144
+ type PathItemObject$1 = OpenAPIV3_1.PathItemObject & {
1145
+ additionalOperations?: Record<string, OperationObject$1>;
1146
+ };
1140
1147
  /**
1141
- * Discriminator object for `oneOf`/`anyOf` schemas in OpenAPI.
1148
+ * Discriminator object for `oneOf`/`anyOf` schemas, with the OpenAPI 3.2 `defaultMapping` fallback schema.
1142
1149
  */
1143
- type DiscriminatorObject$1 = OpenAPIV3_1.DiscriminatorObject;
1150
+ type DiscriminatorObject$1 = OpenAPIV3_1.DiscriminatorObject & {
1151
+ defaultMapping?: string;
1152
+ };
1144
1153
  /**
1145
1154
  * OpenAPI reference object pointing to a schema definition via `$ref`.
1146
1155
  */
@@ -1150,9 +1159,11 @@ type ReferenceObject$1 = OpenAPIV3_1.ReferenceObject;
1150
1159
  */
1151
1160
  type ResponseObject$1 = OpenAPIV3_1.ResponseObject;
1152
1161
  /**
1153
- * OpenAPI media type object that maps a content-type string to its schema.
1162
+ * OpenAPI media type object, with the OpenAPI 3.2 `itemSchema` of one item of a stream.
1154
1163
  */
1155
- type MediaTypeObject$1 = OpenAPIV3_1.MediaTypeObject;
1164
+ type MediaTypeObject$1 = OpenAPIV3_1.MediaTypeObject & {
1165
+ itemSchema?: SchemaObject$1 | ReferenceObject$1;
1166
+ };
1156
1167
  /**
1157
1168
  * Selects which entry in the spec's `servers` array becomes the base URL and
1158
1169
  * supplies values for its `{variable}` placeholders.
@@ -1186,7 +1197,8 @@ type AdapterOasOptions = {
1186
1197
  /**
1187
1198
  * Validate the OpenAPI spec with `@readme/openapi-parser` before parsing. Each problem is
1188
1199
  * reported as a `KUBB_INVALID_SPEC` warning and generation continues. Set to `false` to skip the
1189
- * check, which also makes generation faster on a large spec.
1200
+ * check, which also makes generation faster on a large spec. An OpenAPI 3.2 document is not
1201
+ * validated yet and gets one warning that says so.
1190
1202
  *
1191
1203
  * @default true
1192
1204
  */
@@ -1254,7 +1266,7 @@ type AdapterOas = AdapterFactoryOptions<'oas', AdapterOasOptions, AdapterOasReso
1254
1266
  */
1255
1267
  export declare const adapterOasName = "oas";
1256
1268
  /**
1257
- * Default Kubb adapter for OpenAPI 2.0, 3.0, and 3.1 specifications. Reads the
1269
+ * Default Kubb adapter for OpenAPI 2.0, 3.0, 3.1, and 3.2 specifications. Reads the
1258
1270
  * spec from `input` (a file path, URL, inline content, or parsed object), validates
1259
1271
  * it, resolves the base URL, and converts every schema and operation into the
1260
1272
  * universal AST that every downstream plugin consumes.
package/dist/index.d.ts CHANGED
@@ -1104,6 +1104,10 @@ type SchemaObject$1 = {
1104
1104
  * OAS 3.1: encoding applied to string content, such as `base64`.
1105
1105
  */
1106
1106
  contentEncoding?: string;
1107
+ /**
1108
+ * OAS 3.1: schema of the decoded value a string with `contentMediaType` holds.
1109
+ */
1110
+ contentSchema?: SchemaObject$1 | ReferenceObject$1;
1107
1111
  $ref?: string;
1108
1112
  /**
1109
1113
  * OAS 3.1: positional tuple items, replacing the multi-item `items` array from OAS 3.0.
@@ -1134,13 +1138,18 @@ type Document = OpenAPIV3_1.Document & Record<string, unknown>;
1134
1138
  */
1135
1139
  type OperationObject$1 = OpenAPIV3_1.OperationObject & Record<string, unknown>;
1136
1140
  /**
1137
- * Path item object holding the operations and shared parameters for a single URL path.
1141
+ * Path item object holding the operations and shared parameters for a single URL path, plus the
1142
+ * OpenAPI 3.2 `additionalOperations` map for HTTP methods outside the fixed fields.
1138
1143
  */
1139
- type PathItemObject$1 = OpenAPIV3_1.PathItemObject;
1144
+ type PathItemObject$1 = OpenAPIV3_1.PathItemObject & {
1145
+ additionalOperations?: Record<string, OperationObject$1>;
1146
+ };
1140
1147
  /**
1141
- * Discriminator object for `oneOf`/`anyOf` schemas in OpenAPI.
1148
+ * Discriminator object for `oneOf`/`anyOf` schemas, with the OpenAPI 3.2 `defaultMapping` fallback schema.
1142
1149
  */
1143
- type DiscriminatorObject$1 = OpenAPIV3_1.DiscriminatorObject;
1150
+ type DiscriminatorObject$1 = OpenAPIV3_1.DiscriminatorObject & {
1151
+ defaultMapping?: string;
1152
+ };
1144
1153
  /**
1145
1154
  * OpenAPI reference object pointing to a schema definition via `$ref`.
1146
1155
  */
@@ -1150,9 +1159,11 @@ type ReferenceObject$1 = OpenAPIV3_1.ReferenceObject;
1150
1159
  */
1151
1160
  type ResponseObject$1 = OpenAPIV3_1.ResponseObject;
1152
1161
  /**
1153
- * OpenAPI media type object that maps a content-type string to its schema.
1162
+ * OpenAPI media type object, with the OpenAPI 3.2 `itemSchema` of one item of a stream.
1154
1163
  */
1155
- type MediaTypeObject$1 = OpenAPIV3_1.MediaTypeObject;
1164
+ type MediaTypeObject$1 = OpenAPIV3_1.MediaTypeObject & {
1165
+ itemSchema?: SchemaObject$1 | ReferenceObject$1;
1166
+ };
1156
1167
  /**
1157
1168
  * Selects which entry in the spec's `servers` array becomes the base URL and
1158
1169
  * supplies values for its `{variable}` placeholders.
@@ -1186,7 +1197,8 @@ type AdapterOasOptions = {
1186
1197
  /**
1187
1198
  * Validate the OpenAPI spec with `@readme/openapi-parser` before parsing. Each problem is
1188
1199
  * reported as a `KUBB_INVALID_SPEC` warning and generation continues. Set to `false` to skip the
1189
- * check, which also makes generation faster on a large spec.
1200
+ * check, which also makes generation faster on a large spec. An OpenAPI 3.2 document is not
1201
+ * validated yet and gets one warning that says so.
1190
1202
  *
1191
1203
  * @default true
1192
1204
  */
@@ -1254,7 +1266,7 @@ type AdapterOas = AdapterFactoryOptions<'oas', AdapterOasOptions, AdapterOasReso
1254
1266
  */
1255
1267
  export declare const adapterOasName = "oas";
1256
1268
  /**
1257
- * Default Kubb adapter for OpenAPI 2.0, 3.0, and 3.1 specifications. Reads the
1269
+ * Default Kubb adapter for OpenAPI 2.0, 3.0, 3.1, and 3.2 specifications. Reads the
1258
1270
  * spec from `input` (a file path, URL, inline content, or parsed object), validates
1259
1271
  * it, resolves the base URL, and converts every schema and operation into the
1260
1272
  * universal AST that every downstream plugin consumes.