-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(type-safe-api): fix syntax error for python runtime request param…
…eters with descriptions Descriptions in Python request parameters would previously render invalid python syntax as quotes were escaped as ". Use triple curly braces to ensure these are rendered correctly. Additionally, field references can only be used once per field in a pydantic model, and since fields with descriptions include the field in the type annotation these would fail at runtime when another field is used in the assignment (ie foo: Annotated[StrictStr, Field(..., description="...")] = Field(alias='foo') ). We therefore remove the assignment of a Field value, which is ok since the alias is not required as the handler wrapper already constructs a dict with the "paramName"s as keys rather than the "baseName"s which are in the raw request. Fixes #609
- Loading branch information
Showing
6 changed files
with
120 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
74 changes: 43 additions & 31 deletions
74
packages/type-safe-api/test/scripts/generators/__snapshots__/docs.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.