@kubb/plugin-fetch 5.6.4 → 5.6.5

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
@@ -714,21 +714,23 @@ function toKey(name, location) {
714
714
  return isValidVarName(key) ? key : JSON.stringify(key);
715
715
  }
716
716
  /**
717
- * Serializes one parameter's metadata into a `{ style, explode }` literal, or `null` when the
718
- * parameter carries neither. Path and query carry the serialization `style`; header and cookie use a
719
- * fixed style (`simple` and `form`), so only `explode` is emitted for them.
717
+ * Serializes one parameter's metadata into a `{ style, explode, allowReserved }` literal, or `null`
718
+ * when the parameter carries none. Path and query carry the serialization `style`; header and cookie
719
+ * use a fixed style (`simple` and `form`), so only `explode` is emitted for them. `allowReserved`
720
+ * only applies to query parameters.
720
721
  */
721
722
  function serializeParameter(parameter) {
722
723
  const parts = [];
723
724
  if ((parameter.in === "path" || parameter.in === "query") && parameter.style) parts.push(`style: '${parameter.style}'`);
724
725
  if (parameter.explode !== void 0) parts.push(`explode: ${parameter.explode}`);
726
+ if (parameter.in === "query" && parameter.allowReserved !== void 0) parts.push(`allowReserved: ${parameter.allowReserved}`);
725
727
  return parts.length > 0 ? `{ ${parts.join(", ")} }` : null;
726
728
  }
727
729
  /**
728
730
  * Builds the per-operation `styles` literal from the operation's parameters, grouped by location.
729
731
  * Path entries are keyed by the camelCased name to match the URL template placeholders; query,
730
732
  * header, and cookie entries keep the spec name to match the keys the runtime serializes.
731
- * Only parameters whose source defines `style` or `explode` are emitted, so calls without
733
+ * Only parameters whose source defines `style`, `explode`, or `allowReserved` are emitted, so calls without
732
734
  * serialization metadata keep the runtime defaults and existing output is unchanged. Returns `null`
733
735
  * when no parameter carries metadata.
734
736
  *
@@ -1428,7 +1430,7 @@ var compatibility = {
1428
1430
  };
1429
1431
  //#endregion
1430
1432
  //#region package.json
1431
- var version = "5.6.4";
1433
+ var version = "5.6.5";
1432
1434
  //#endregion
1433
1435
  //#region src/templates.ts
1434
1436
  /** Absolute path to the fetch client template, copied into `.kubb/client.ts`. */