Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: path parametrs of type number #4866

Merged

Conversation

czabaj
Copy link
Contributor

@czabaj czabaj commented Oct 23, 2024

path parameters generated with expand_slashed_path_patterns are of type number, should be a string

References to other Issues or PRs

Closes #4865
Relates #4784

Have you read the Contributing Guidelines?

Yes

Brief description of what is fixed or changed

All path parameters generated with expand_slashed_path_patterns have a type string.

Other comments

I fixed that by explicitly setting the type of the newly generated parameter to string. I tested that manually with my real API. I tried to write a test for this, but it turned out to be quite complicated

path parameters generated with
`expand_slashed_path_patterns`
are of type `number`, should be
a `string`
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

Doh, that makes sense! Is there a test we can use to assert that this is always a string?

@johanbrandhorst johanbrandhorst merged commit a31015c into grpc-ecosystem:main Nov 1, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Path params generated with expand_slashed_path_patterns=true have type number
2 participants