@kubb/adapter-oas 5.12.7 → 5.12.8

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.js CHANGED
@@ -14,7 +14,7 @@ var compatibility = {
14
14
  };
15
15
  //#endregion
16
16
  //#region package.json
17
- var version = "5.12.7";
17
+ var version = "5.12.8";
18
18
  //#endregion
19
19
  //#region src/constants.ts
20
20
  /**
@@ -1045,8 +1045,10 @@ function collectPropertyKeysByFlag(schema, flag) {
1045
1045
  }
1046
1046
  function parseParameter({ param, parentName, options, parseSchema }) {
1047
1047
  const schemaName = parentName && param.name ? pascalCase(`${parentName} ${param.name}`) : void 0;
1048
- const schema = param.schema ? parseSchema({
1049
- schema: param.schema,
1048
+ const contentType = param.schema ? void 0 : Object.keys(param.content ?? {})[0];
1049
+ const rawSchema = param.schema ?? (contentType ? param.content?.[contentType]?.schema : void 0);
1050
+ const schema = rawSchema ? parseSchema({
1051
+ schema: rawSchema,
1050
1052
  name: schemaName
1051
1053
  }) : ast.factory.createSchema({ type: options.unknownType });
1052
1054
  const style = param.style;
@@ -1062,7 +1064,8 @@ function parseParameter({ param, parentName, options, parseSchema }) {
1062
1064
  required: param.required ?? false,
1063
1065
  ...style !== void 0 ? { style } : {},
1064
1066
  ...explode !== void 0 ? { explode } : {},
1065
- ...allowReserved !== void 0 ? { allowReserved } : {}
1067
+ ...allowReserved !== void 0 ? { allowReserved } : {},
1068
+ ...contentType !== void 0 ? { contentType } : {}
1066
1069
  });
1067
1070
  }
1068
1071
  /**