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

[Bug]: Parameter with - produces invalid uri template #6191

Open
4 tasks done
timotheeguerin opened this issue Feb 27, 2025 · 0 comments
Open
4 tasks done

[Bug]: Parameter with - produces invalid uri template #6191

timotheeguerin opened this issue Feb 27, 2025 · 0 comments
Labels
bug Something isn't working needs-area

Comments

@timotheeguerin
Copy link
Member

Describe the bug

op test(@query("foo-bar") fooBar: string): void;

Produce the following uri template which is invalid (cannot have - in variable names)
https://adidas.gitbook.io/api-guidelines/rest-api-guidelines/evolution/naming-conventions#uri-template-variables

/{?foo-bar}

it should be

/{?foo%2Dbar}

in the same way we encode $. Hyphen is special as it is not encoded by encodeUriComponent so we need to do some additional replacing

Reproduction

Playground

Checklist

@timotheeguerin timotheeguerin added the bug Something isn't working label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

1 participant