@kubb/adapter-oas 5.29.3 → 5.29.4

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
@@ -15,7 +15,7 @@ var compatibility = {
15
15
  "node": ">=22.22"
16
16
  };
17
17
  // package.json
18
- var version = "5.29.3";
18
+ var version = "5.29.4";
19
19
  // src/constants.ts
20
20
  /**
21
21
  * Default parser options applied when no explicit options are provided.
@@ -4008,8 +4008,10 @@ function convertObject({ schema, name, nullable, defaultValue, options, parse, r
4008
4008
  * Converts an OAS 3.1 `prefixItems` tuple into a `TupleSchemaNode`.
4009
4009
  */
4010
4010
  function convertTuple({ schema, name, nullable, defaultValue, options, parse }) {
4011
- const tupleItems = (schema.prefixItems ?? []).map((item) => parse({ schema: item }));
4012
- const tail = schema.items ?? schema.unevaluatedItems;
4011
+ const prefixItems = schema.prefixItems ?? [];
4012
+ const isClosed = schema.maxItems !== void 0 && schema.maxItems <= prefixItems.length;
4013
+ const tupleItems = (isClosed ? prefixItems.slice(0, schema.maxItems) : prefixItems).map((item) => parse({ schema: item }));
4014
+ const tail = isClosed ? false : schema.items ?? schema.unevaluatedItems;
4013
4015
  const rest = tail === false ? void 0 : !tail || tail === true ? _kubb_kit.ast.factory.createSchema({ type: options.unknownType }) : parse({ schema: tail });
4014
4016
  return createNode({
4015
4017
  schema,