Client - Deep objects are sent as empty string in query parameters
mezannic opened this issue · 1 comments
mezannic commented
Describe the bug
The OpenAPI specification allows objects in query, but they do not appear to be supported by feTS client at the serialization step (typings are fine).
To Reproduce Steps to reproduce the behavior:
const client = createClient({
endpoint: 'https://postman-echo.com'
});
const response = await client['/get'].get({
query: {
foo: {
bar: 'baz',
},
},
});
const json = await response.json();
console.log(json.url);
// Expected: 'https://postman-echo.com/get?foo%5Bbar%5D=baz'
// Actual: 'https://postman-echo.com/get?foo='
Expected behavior
Environment:
- OS: macOS
- Package version: 0.4.12:
- Environment: browser extension