@kubb/oas 4.12.2 → 4.12.3

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
@@ -4597,6 +4597,20 @@ var Oas = class extends oas.default {
4597
4597
  return params.reduce((schema$2, pathParameters) => {
4598
4598
  const property = pathParameters.content?.[contentType]?.schema ?? pathParameters.schema;
4599
4599
  const required = [...schema$2.required || [], pathParameters.required ? pathParameters.name : void 0].filter(Boolean);
4600
+ const getDefaultStyle = (location) => {
4601
+ if (location === "query") return "form";
4602
+ if (location === "path") return "simple";
4603
+ return "simple";
4604
+ };
4605
+ const style = pathParameters.style || getDefaultStyle(inKey);
4606
+ const explode = pathParameters.explode !== void 0 ? pathParameters.explode : style === "form";
4607
+ if (inKey === "query" && style === "form" && explode === true && property?.type === "object" && property?.additionalProperties && !property?.properties) return {
4608
+ ...schema$2,
4609
+ description: pathParameters.description || schema$2.description,
4610
+ deprecated: schema$2.deprecated,
4611
+ example: property.example || schema$2.example,
4612
+ additionalProperties: property.additionalProperties
4613
+ };
4600
4614
  return {
4601
4615
  ...schema$2,
4602
4616
  description: schema$2.description,