@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.cjs CHANGED
@@ -36,7 +36,7 @@ var compatibility = {
36
36
  };
37
37
  //#endregion
38
38
  //#region package.json
39
- var version = "5.12.7";
39
+ var version = "5.12.8";
40
40
  //#endregion
41
41
  //#region src/constants.ts
42
42
  /**
@@ -1067,8 +1067,10 @@ function collectPropertyKeysByFlag(schema, flag) {
1067
1067
  }
1068
1068
  function parseParameter({ param, parentName, options, parseSchema }) {
1069
1069
  const schemaName = parentName && param.name ? pascalCase(`${parentName} ${param.name}`) : void 0;
1070
- const schema = param.schema ? parseSchema({
1071
- schema: param.schema,
1070
+ const contentType = param.schema ? void 0 : Object.keys(param.content ?? {})[0];
1071
+ const rawSchema = param.schema ?? (contentType ? param.content?.[contentType]?.schema : void 0);
1072
+ const schema = rawSchema ? parseSchema({
1073
+ schema: rawSchema,
1072
1074
  name: schemaName
1073
1075
  }) : _kubb_kit.ast.factory.createSchema({ type: options.unknownType });
1074
1076
  const style = param.style;
@@ -1084,7 +1086,8 @@ function parseParameter({ param, parentName, options, parseSchema }) {
1084
1086
  required: param.required ?? false,
1085
1087
  ...style !== void 0 ? { style } : {},
1086
1088
  ...explode !== void 0 ? { explode } : {},
1087
- ...allowReserved !== void 0 ? { allowReserved } : {}
1089
+ ...allowReserved !== void 0 ? { allowReserved } : {},
1090
+ ...contentType !== void 0 ? { contentType } : {}
1088
1091
  });
1089
1092
  }
1090
1093
  /**