openapi-typescript
openapi-typescript copied to clipboard
`defaultPathSerializer` doesn't url-encode its primitive string params
Description
After upgrade from v0.8.2 to v0.9.3 I noticed breaking behavior. When passing raw strings as path params, they don't get url-encoded.
Reproduction
console.log(defaultPathSerializer('/hello/{slug}', {slug: '/foo?bar'}))
// output: /hello//foo?bar
Expected result
"/hello/%2Ffoo%3Fbar"
Checklist
- [ ] I’m willing to open a PR (see CONTRIBUTING.md)