Repository: hey-api/openapi-ts
Pull request #1913: fix(pagination-parsing): code generation when optional pagination field is missing
Author: login: BogdanMaier
Created: 2025-04-03T06:56:08Z | Merged: 2025-04-03T13:55:42Z

These tests ensure the pagination logic works correctly when defined in different parts of the request (body or query), including edge cases. This supports the fix where pagination fields might be missing or optional.

Adds tests for operationPagination to cover:
	•	Pagination from query parameters
	•	Pagination from the request body (pagination: true and "pagination")
	•	Resolving schemas from $ref
	•	Fallback to query params when the body field is missing

Closes https://github.com/hey-api/openapi-ts/issues/1908


Diff:
diff --git a/.changeset/giant-jeans-study.md b/.changeset/giant-jeans-study.md
new file mode 100644
index 0000000000..2440b09857
--- /dev/null
+++ b/.changeset/giant-jeans-study.md
@@ -0,0 +1,5 @@
+---
+"@hey-api/openapi-ts": patch
+---
+
+fix: prevent crash when optional pagination field is missing
diff --git a/packages/openapi-ts/src/ir/__tests__/pagination.test.ts b/packages/openapi-ts/src/ir/__tests__/pagination.test.ts
index 4726a12615..c2566d29c9 100644
--- a/packages/openapi-ts/src/ir/__tests__/pagination.test.ts
+++ b/packages/openapi-ts/src/ir/__tests__/pagination.test.ts
@@ -1,7 +1,9 @@
-import { describe, expect, it } from 'vitest';
+import { describe, expect, it, vi } from 'vitest';
 
 import type { Config } from '../../types/config';
+import { operationPagination } from '../operation';
 import { getPaginationKeywordsRegExp } from '../pagination';
+import type { IR } from '../types';
 
 describe('paginationKeywordsRegExp', () => {
   const defaultScenarios: Array<{
@@ -66,9 +68,190 @@ describe('paginationKeywordsRegExp', () => {
       const pagination: Config['input']['pagination'] = {
         keywords: ['customPagination', 'pageSize', 'perPage'],
       };
-
       const paginationRegExp = getPaginationKeywordsRegExp(pagination);
       expect(paginationRegExp.test(value)).toEqual(result);
     },
   );
 });
+
+describe('operationPagination', () => {
+  const queryParam = (
+    name: string,
+    type: IR.SchemaObject['type'] = 'string',
+    pagination = false,
+  ): IR.ParameterObject => ({
+    explode: true,
+    location: 'query',
+    name,
+    schema: { type },
+    style: 'form',
+    ...(pagination ? { pagination: true } : {}),
+  });
+
+  const emptyContext = {} as IR.Context;
+
+  const baseOperationMeta = {
+    method: 'post' as const,
+    path: '/test' as const,
+  };
+
+  const queryScenarios: Array<{
+    hasPagination: boolean;
+    operation: IR.OperationObject;
+  }> = [
+    {
+      hasPagination: true,
+      operation: {
+        ...baseOperationMeta,
+        id: 'op1',
+        method: 'get',
+        parameters: {
+          query: {
+            page: queryParam('page', 'integer', true),
+          },
+        },
+      },
+    },
+    {
+      hasPagination: false,
+      operation: {
+        ...baseOperationMeta,
+        id: 'op2',
+        method: 'get',
+        parameters: {
+          query: {
+            sort: queryParam('sort', 'string'),
+          },
+        },
+      },
+    },
+  ];
+
+  it.each(queryScenarios)(
+    'query params for $operation.id → $hasPagination',
+    ({
+      hasPagination,
+      operation,
+    }: {
+      hasPagination: boolean;
+      operation: IR.OperationObject;
+    }) => {
+      const result = operationPagination({ context: emptyContext, operation });
+      expect(Boolean(result)).toEqual(hasPagination);
+    },
+  );
+
+  it('body.pagination === true returns entire body', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: true,
+        schema: {
+          properties: {
+            page: { type: 'integer' },
+          },
+          type: 'object',
+        },
+      },
+      id: 'bodyTrue',
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('body');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('body.pagination = "pagination" returns the matching property', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: {
+          properties: {
+            pagination: {
+              properties: {
+                page: { type: 'integer' },
+              },
+              type: 'object',
+            },
+          },
+          type: 'object',
+        },
+      },
+      id: 'bodyField',
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('pagination');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('resolves $ref and uses the resolved pagination property', () => {
+    const context: IR.Context = {
+      resolveIrRef: vi.fn().mockReturnValue({
+        properties: {
+          pagination: {
+            properties: {
+              page: { type: 'integer' },
+            },
+            type: 'object',
+          },
+        },
+        type: 'object',
+      }),
+    } as unknown as IR.Context;
+
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: { $ref: '#/components/schemas/PaginationBody' },
+      },
+      id: 'refPagination',
+    };
+
+    const result = operationPagination({ context, operation });
+
+    expect(context.resolveIrRef).toHaveBeenCalledWith(
+      '#/components/schemas/PaginationBody',
+    );
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('pagination');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('falls back to query when pagination key not found in body', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: {
+          properties: {
+            notPagination: { type: 'string' },
+          },
+          type: 'object',
+        },
+      },
+      id: 'fallback',
+      parameters: {
+        query: {
+          cursor: queryParam('cursor', 'string', true),
+        },
+      },
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('query');
+    expect(result?.name).toEqual('cursor');
+    expect(result?.schema?.type).toEqual('string');
+  });
+});
diff --git a/packages/openapi-ts/src/ir/operation.ts b/packages/openapi-ts/src/ir/operation.ts
index 17d52a769d..10a54d24ff 100644
--- a/packages/openapi-ts/src/ir/operation.ts
+++ b/packages/openapi-ts/src/ir/operation.ts
@@ -28,29 +28,38 @@ export const operationPagination = ({
   context: IR.Context;
   operation: IR.OperationObject;
 }): Pagination | undefined => {
-  if (operation.body?.pagination) {
-    if (typeof operation.body.pagination === 'boolean') {
-      return {
-        in: 'body',
-        name: 'body',
-        schema: operation.body.schema,
-      };
-    }
+  const body = operation.body;
+
+  if (!body || !body.pagination) {
+    return parameterWithPagination(operation.parameters);
+  }
 
-    const schema = operation.body.schema.$ref
-      ? context.resolveIrRef<IR.RequestBodyObject | IR.SchemaObject>(
-          operation.body.schema.$ref,
-        )
-      : operation.body.schema;
-    const finalSchema = 'schema' in schema ? schema.schema : schema;
+  if (body.pagination === true) {
     return {
       in: 'body',
-      name: operation.body.pagination,
-      schema: finalSchema.properties![operation.body.pagination]!,
+      name: 'body',
+      schema: body.schema,
     };
   }
 
-  return parameterWithPagination(operation.parameters);
+  const schema = body.schema;
+  const resolvedSchema = schema.$ref
+    ? context.resolveIrRef<IR.RequestBodyObject | IR.SchemaObject>(schema.$ref)
+    : schema;
+
+  const finalSchema =
+    'schema' in resolvedSchema ? resolvedSchema.schema : resolvedSchema;
+  const paginationProp = finalSchema?.properties?.[body.pagination];
+
+  if (!paginationProp) {
+    return parameterWithPagination(operation.parameters);
+  }
+
+  return {
+    in: 'body',
+    name: body.pagination,
+    schema: paginationProp,
+  };
 };
 
 type StatusGroup = '1XX' | '2XX' | '3XX' | '4XX' | '5XX' | 'default';


Reviews:
user: login: mrlubos
body: Can you please add tests? Unit tests would be fine, it's hard to see which case it fixes and that it doesn't break anything
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-04-03T07:05:45Z
user: login: mrlubos
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-03T07:07:39Z
user: login: BogdanMaier
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T09:40:25Z
user: login: mrlubos
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-03T09:58:51Z
user: login: mrlubos
body: Nice work!
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-03T09:59:35Z
user: login: mrlubos
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-03T13:02:45Z
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-03T13:05:58Z
user: login: mrlubos
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-03T13:50:04Z

Review comments:
diff_hunk: @@ -28,29 +28,38 @@ export const operationPagination = ({
   context: IR.Context;
   operation: IR.OperationObject;
 }): Pagination | undefined => {
-  if (operation.body?.pagination) {
-    if (typeof operation.body.pagination === 'boolean') {
-      return {
-        in: 'body',
-        name: 'body',
-        schema: operation.body.schema,
-      };
-    }
+  const body = operation.body;
+
+  if (!body || !body.pagination) {
path: packages/openapi-ts/src/ir/operation.ts
user: login: mrlubos
body: Why switch the order of statements? The current implementation checks for existence of body and goes inside that branch, you've inversed it here and check if there's no body pagination
created_at: 2025-04-03T07:07:34Z
author_association: MEMBER
diff_hunk: @@ -28,29 +28,38 @@ export const operationPagination = ({
   context: IR.Context;
   operation: IR.OperationObject;
 }): Pagination | undefined => {
-  if (operation.body?.pagination) {
-    if (typeof operation.body.pagination === 'boolean') {
-      return {
-        in: 'body',
-        name: 'body',
-        schema: operation.body.schema,
-      };
-    }
+  const body = operation.body;
+
+  if (!body || !body.pagination) {
path: packages/openapi-ts/src/ir/operation.ts
user: login: BogdanMaier
body: I switched the order to make the function easier to read. By returning early when there’s no body or pagination, we avoid nesting the rest of the logic. It’s functionally the same, just a bit cleaner to follow. Let me know if you’d prefer keeping the original structure.
created_at: 2025-04-03T09:40:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -66,9 +68,191 @@
       const pagination: Config['input']['pagination'] = {
         keywords: ['customPagination', 'pageSize', 'perPage'],
       };
-
       const paginationRegExp = getPaginationKeywordsRegExp(pagination);
       expect(paginationRegExp.test(value)).toEqual(result);
     },
   );
 });
+
+describe('operationPagination', () => {
+  const queryParam = (
+    name: string,
+    type: IR.SchemaObject['type'] = 'string',
+    pagination = false,
+  ): IR.ParameterObject => ({
+    explode: true,
+    location: 'query',
+    name,
+    schema: { type },
+    style: 'form',
+    ...(pagination ? { pagination: true } : {}),
+  });
+
+  const emptyContext = {} as IR.Context;
+
+  const baseOperationMeta = {
+    method: 'post' as const,
+    path: '/test' as const,
+  };
+
+  const queryScenarios: Array<{
+    hasPagination: boolean;
+    operation: IR.OperationObject;
+  }> = [
+    {
+      hasPagination: true,
+      operation: {
+        ...baseOperationMeta,
+        id: 'op1',
+        method: 'get',
+        parameters: {
+          query: {
+            page: queryParam('page', 'integer', true),
+          },
+        },
+      },
+    },
+    {
+      hasPagination: false,
+      operation: {
+        ...baseOperationMeta,
+        id: 'op2',
+        method: 'get',
+        parameters: {
+          query: {
+            sort: queryParam('sort', 'string'),
+          },
+        },
+      },
+    },
+  ];
+
+  it.each(queryScenarios)(
+    'query params for $operation.id → $hasPagination',
+    ({
+      hasPagination,
+      operation,
+    }: {
+      hasPagination: boolean;
+      operation: IR.OperationObject;
+    }) => {
+      const result = operationPagination({ context: emptyContext, operation });
+      expect(Boolean(result)).toEqual(hasPagination);
+    },
+  );
+
+  it('body.pagination === true returns entire body', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: true,
+        schema: {
+          properties: {
+            page: { type: 'integer' },
+          },
+          type: 'object',
+        },
+      },
+      id: 'bodyTrue',
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('body');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('body.pagination = "pagination" returns the matching property', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: {
+          properties: {
+            pagination: {
+              properties: {
+                page: { type: 'integer' },
+              },
+              type: 'object',
+            },
+          },
+          type: 'object',
+        },
+      },
+      id: 'bodyField',
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('pagination');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('resolves $ref and uses the resolved pagination property', () => {
+    const context: IR.Context = {
+      resolveIrRef: vi.fn().mockReturnValue({
+        properties: {
+          pagination: {
+            properties: {
+              page: { type: 'integer' },
+            },
+            type: 'object',
+          },
+        },
+        type: 'object',
+      }),
+    } as unknown as IR.Context;
+
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: { $ref: '#/components/schemas/PaginationBody' },
+      },
+      id: 'refPagination',
+    };
+
+    const result = operationPagination({ context, operation });
+
+    expect(context.resolveIrRef).toHaveBeenCalledWith(
+      '#/components/schemas/PaginationBody',
+    );
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('pagination');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('falls back to query when pagination key not found in body', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: {
+          properties: {
+            notPagination: { type: 'string' },
+          },
+          type: 'object',
+        },
+      },
+      id: 'fallback',
+      parameters: {
+        query: {
+          cursor: queryParam('cursor', 'string', true),
+        },
+      },
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('query');
+    expect(result?.name).toEqual('cursor');
+    expect(result?.schema?.type).toEqual('string');
+  });
+});
+test(pagination): fix new tests in CI (2)
path: packages/openapi-ts/src/ir/__tests__/pagination.test.ts
user: login: github-advanced-security[bot]
body: ## Syntax error

Error: ';' expected.

[Show more details](https://github.com/hey-api/openapi-ts/security/code-scanning/1797)
created_at: 2025-04-03T13:05:58Z
author_association: NONE
diff_hunk: @@ -66,9 +68,191 @@
       const pagination: Config['input']['pagination'] = {
         keywords: ['customPagination', 'pageSize', 'perPage'],
       };
-
       const paginationRegExp = getPaginationKeywordsRegExp(pagination);
       expect(paginationRegExp.test(value)).toEqual(result);
     },
   );
 });
+
+describe('operationPagination', () => {
+  const queryParam = (
+    name: string,
+    type: IR.SchemaObject['type'] = 'string',
+    pagination = false,
+  ): IR.ParameterObject => ({
+    explode: true,
+    location: 'query',
+    name,
+    schema: { type },
+    style: 'form',
+    ...(pagination ? { pagination: true } : {}),
+  });
+
+  const emptyContext = {} as IR.Context;
+
+  const baseOperationMeta = {
+    method: 'post' as const,
+    path: '/test' as const,
+  };
+
+  const queryScenarios: Array<{
+    hasPagination: boolean;
+    operation: IR.OperationObject;
+  }> = [
+    {
+      hasPagination: true,
+      operation: {
+        ...baseOperationMeta,
+        id: 'op1',
+        method: 'get',
+        parameters: {
+          query: {
+            page: queryParam('page', 'integer', true),
+          },
+        },
+      },
+    },
+    {
+      hasPagination: false,
+      operation: {
+        ...baseOperationMeta,
+        id: 'op2',
+        method: 'get',
+        parameters: {
+          query: {
+            sort: queryParam('sort', 'string'),
+          },
+        },
+      },
+    },
+  ];
+
+  it.each(queryScenarios)(
+    'query params for $operation.id → $hasPagination',
+    ({
+      hasPagination,
+      operation,
+    }: {
+      hasPagination: boolean;
+      operation: IR.OperationObject;
+    }) => {
+      const result = operationPagination({ context: emptyContext, operation });
+      expect(Boolean(result)).toEqual(hasPagination);
+    },
+  );
+
+  it('body.pagination === true returns entire body', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: true,
+        schema: {
+          properties: {
+            page: { type: 'integer' },
+          },
+          type: 'object',
+        },
+      },
+      id: 'bodyTrue',
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('body');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('body.pagination = "pagination" returns the matching property', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: {
+          properties: {
+            pagination: {
+              properties: {
+                page: { type: 'integer' },
+              },
+              type: 'object',
+            },
+          },
+          type: 'object',
+        },
+      },
+      id: 'bodyField',
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('pagination');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('resolves $ref and uses the resolved pagination property', () => {
+    const context: IR.Context = {
+      resolveIrRef: vi.fn().mockReturnValue({
+        properties: {
+          pagination: {
+            properties: {
+              page: { type: 'integer' },
+            },
+            type: 'object',
+          },
+        },
+        type: 'object',
+      }),
+    } as unknown as IR.Context;
+
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: { $ref: '#/components/schemas/PaginationBody' },
+      },
+      id: 'refPagination',
+    };
+
+    const result = operationPagination({ context, operation });
+
+    expect(context.resolveIrRef).toHaveBeenCalledWith(
+      '#/components/schemas/PaginationBody',
+    );
+    expect(result?.in).toEqual('body');
+    expect(result?.name).toEqual('pagination');
+    expect(result?.schema?.type).toEqual('object');
+  });
+
+  it('falls back to query when pagination key not found in body', () => {
+    const operation: IR.OperationObject = {
+      ...baseOperationMeta,
+      body: {
+        mediaType: 'application/json',
+        pagination: 'pagination',
+        schema: {
+          properties: {
+            notPagination: { type: 'string' },
+          },
+          type: 'object',
+        },
+      },
+      id: 'fallback',
+      parameters: {
+        query: {
+          cursor: queryParam('cursor', 'string', true),
+        },
+      },
+    };
+
+    const result = operationPagination({ context: emptyContext, operation });
+
+    expect(result?.in).toEqual('query');
+    expect(result?.name).toEqual('cursor');
+    expect(result?.schema?.type).toEqual('string');
+  });
+});
+test(pagination): fix new tests in CI (2)
path: packages/openapi-ts/src/ir/__tests__/pagination.test.ts
user: login: github-advanced-security[bot]
body: ## Syntax error

Error: Unexpected keyword or identifier.

[Show more details](https://github.com/hey-api/openapi-ts/security/code-scanning/1798)
created_at: 2025-04-03T13:05:58Z
author_association: NONE

PR comments:
user: login: bolt-new-by-stackblitz[bot]
created_at: 2025-04-03T06:56:10Z
body: <a href="https://stackblitz.com/~/github.com/hey-api/openapi-ts/pull/1913"><img src="https://developer.stackblitz.com/img/review_pr_small.svg" alt="Review PR in StackBlitz Codeflow" align="left" width="103" height="20"></a> _Run & review this pull request in [StackBlitz Codeflow](https://stackblitz.com/~/github.com/hey-api/openapi-ts/pull/1913)._

author_association: NONE
user: login: changeset-bot[bot]
created_at: 2025-04-03T06:56:11Z
body: ###  🦋  Changeset detected

Latest commit: 0806a2eb8a4560cecdbb056b301cc72dcee38e8d

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 1 package</summary>

  | Name                | Type  |
| ------------------- | ----- |
| @hey-api/openapi-ts | Patch |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/BogdanMaier/openapi-ts/new/fix/code-genertion-when-optional-field-pagination-is-missing?filename=.changeset/cold-seas-greet.md&value=---%0A%22%40hey-api%2Fopenapi-ts%22%3A%20patch%0A---%0A%0Afix(pagination-parsing)%3A%20code%20generation%20when%20optional%20pagination%20field%20is%20missing%0A)


author_association: NONE
user: login: vercel[bot]
created_at: 2025-04-03T06:56:12Z
body: [vc]: #r5fXNkdh6mUKcYm+D8i1B9OwVsKog7Jj6uSo8IAdcuM=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJoZXktYXBpLWRvY3MiLCJyb290RGlyZWN0b3J5IjoiZG9jcy8iLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vaGV5LWFwaS9oZXktYXBpLWRvY3MvRVQ4TjN3dHBCNDRFaDduQXZYcFplM2I2cnBGMSIsInByZXZpZXdVcmwiOiJoZXktYXBpLWRvY3MtZ2l0LWZvcmstYm9nZGFubWFpZXItZml4LWNvZGUtZ2VuZXItMjM1NDE3LWhleS1hcGkudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJoZXktYXBpLWRvY3MtZ2l0LWZvcmstYm9nZGFubWFpZXItZml4LWNvZGUtZ2VuZXItMjM1NDE3LWhleS1hcGkudmVyY2VsLmFwcCJ9fV19
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **hey-api-docs** | ✅ Ready ([Inspect](https://vercel.com/hey-api/hey-api-docs/ET8N3wtpB44Eh7nAvXpZe3b6rpF1)) | [Visit Preview](https://hey-api-docs-git-fork-bogdanmaier-fix-code-gener-235417-hey-api.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/hey-api-docs-git-fork-bogdanmaier-fix-code-gener-235417-hey-api.vercel.app?via=pr-comment-feedback-link) | Apr 3, 2025 1:11pm |


author_association: NONE
user: login: pkg-pr-new[bot]
created_at: 2025-04-03T07:12:06Z
body: 
[Open in StackBlitz](https://pkg.pr.new/template/88ad9794-dea8-4ff9-adb4-98f04f1a404d)


<details><summary><b>@hey-api/client-axios</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-axios@1913
```

</p></details>
      
    

<details><summary><b>@hey-api/client-fetch</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-fetch@1913
```

</p></details>
      
    

<details><summary><b>@hey-api/client-nuxt</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-nuxt@1913
```

</p></details>
      
    

<details><summary><b>@hey-api/client-next</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/client-next@1913
```

</p></details>
      
    

<details><summary><b>@hey-api/nuxt</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@1913
```

</p></details>
      
    

<details><summary><b>@hey-api/openapi-ts</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@1913
```

</p></details>
      
    

<details><summary><b>@hey-api/vite-plugin</b></summary><p>

```
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@1913
```

</p></details>
      
    

_commit: <a href="https://github.com/hey-api/openapi-ts/runs/39922754561"><code>0806a2e</code></a>_

author_association: NONE
user: login: codecov[bot]
created_at: 2025-04-03T07:12:17Z
body: ## [Codecov](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1913?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 24.15%. Comparing base [(`3f39137`)](https://app.codecov.io/gh/hey-api/openapi-ts/commit/3f391375a8cc1533dbc30a2331becbb363c254c2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) to head [(`0806a2e`)](https://app.codecov.io/gh/hey-api/openapi-ts/commit/0806a2eb8a4560cecdbb056b301cc72dcee38e8d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api).
> Report is 8 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #1913      +/-   ##
==========================================
+ Coverage   23.75%   24.15%   +0.40%     
==========================================
  Files         193      193              
  Lines       26842    26851       +9     
  Branches      772      787      +15     
==========================================
+ Hits         6376     6486     +110     
+ Misses      20388    20290      -98     
+ Partials       78       75       -3     
```

| [Flag](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1913/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1913/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api) | `24.15% <100.00%> (+0.40%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/hey-api/openapi-ts/pull/1913?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hey-api).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE