Skip to content

fix(generator): codegen typing fixes for #298, #299, #300#301

Merged
benjamineckstein merged 1 commit into
mainfrom
fix/codegen-typing-298-299-300
Jun 15, 2026
Merged

fix(generator): codegen typing fixes for #298, #299, #300#301
benjamineckstein merged 1 commit into
mainfrom
fix/codegen-typing-298-299-300

Conversation

@benjamineckstein

Copy link
Copy Markdown
Contributor

Summary

Resolves three critical codegen typing defects. Inline object schemas are now expanded to typed objects instead of Record<string, unknown>, array query params with bracket notation are properly typed, and path parameters derive their types from component schemas including via $ref indirection.

Changes

Generated showcase output and snapshots were updated accordingly.

Closes

- #298: expand inline object response/request schemas with properties
  instead of collapsing to Record<string, unknown>; collect referenced
  component schema names so they are imported from ./models.js
- #299: type bracket-notation array query params (ids[]) as number[]/string[]
  and serialize via repeated append() instead of a single flat String()
- #300: type path params from their schema (integer -> number) including
  $ref-to-component indirection; derive hooks path-param types from the
  client function (Parameters<typeof fn>[i]) so they stay in sync

Updates generated showcase output and snapshots accordingly.
@github-actions

Copy link
Copy Markdown
Contributor

Fallow audit report

Found 5 findings.

Dependencies (2)
Severity Rule Location Description
minor fallow/unused-dev-dependency examples/package.json:15 Package '@tanstack/react-query' is in devDependencies but never imported; imported in other workspaces: packages/integration
minor fallow/unused-dev-dependency examples/package.json:17 Package 'react' is in devDependencies but never imported; imported in other workspaces: packages/integration
Duplication (3)
Severity Rule Location Description
minor fallow/code-duplication packages/openapi-react-query/src/\_\_tests\_\_/hooks.test.ts:2028 Code clone group 2 (6 lines, 3 instances)
minor fallow/code-duplication packages/openapi-zod-ts/src/\_\_tests\_\_/codegen-typing-298-299-300.test.ts:78 Code clone group 6 (15 lines, 2 instances)
minor fallow/code-duplication packages/openapi-zod-ts/src/\_\_tests\_\_/codegen-typing-298-299-300.test.ts:303 Code clone group 6 (15 lines, 2 instances)

Generated by fallow.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallow audit report

3 inline findings selected for GitHub review.

Comment thread packages/openapi-react-query/src/__tests__/hooks.test.ts
@benjamineckstein benjamineckstein merged commit 42d2f66 into main Jun 15, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant