openapi-typescript icon indicating copy to clipboard operation
openapi-typescript copied to clipboard

`defaultPathSerializer` doesn't url-encode its primitive string params

Open maslennikov opened this issue 1 year ago • 0 comments

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

maslennikov avatar Mar 22 '24 16:03 maslennikov