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

encoded path params are not parsed correctly #436

Closed
squishy-kf opened this issue Feb 2, 2024 · 1 comment
Closed

encoded path params are not parsed correctly #436

squishy-kf opened this issue Feb 2, 2024 · 1 comment

Comments

@squishy-kf
Copy link

squishy-kf commented Feb 2, 2024

First of all thanks for creating this, it's removed alot of difficult convo's when moving to trpc first api.

Now for the bug.
I have a path param that that is url encoded but when i try and pass it into my openAPI route it treats both parts of the param (either side of the encoded slack) as different path params.

this will error if called with an id of 'hello%2Fworld'
export const test = trpc.procedure .meta({ openapi: { method: 'GET', path: '/test/{id}' } }) .input( z.object({ id: z.string(), }), ) .output(z.string()) .query(async ({ input }) => { return input.id; });

@squishy-kf
Copy link
Author

spent far too long staring at the same problem. this is not an issue with this package but with aws SAM. sorry for the noise.

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

No branches or pull requests

1 participant