fix(generator): codegen typing fixes for #298, #299, #300#301
Merged
Conversation
- #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.
Contributor
Fallow audit reportFound 5 findings. Dependencies (2)
Duplication (3)
Generated by fallow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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$refindirection.Changes
propertiesare expanded to typed objects (wasRecord<string, unknown>). Referenced component schemas are imported from./models.js.ids[]) are typednumber[]/string[]and serialized via repeatedappend()instead of a flatString().$ref-to-component indirection. The react-query hooks generator derives path-param types from the client function (Parameters<typeof fn>[i]) to stay in sync.Generated showcase output and snapshots were updated accordingly.
Closes