openapi-typescript
openapi-typescript copied to clipboard
Improve querySerializer
Changes
Added filtering after forming query parameters in querySerialize.
How to Review
Currently, if there is any key in queryParams with an empty object, the result of the generation will include a double ampersand.
For example:
{
a: 1,
b: {},
c: 3,
}
will return => example.com?a=1&&c=3 Because Serialize creates an array with an empty string.
After the improvement, it will be example.com?a=1&c=3
Checklist
- [ ] Unit tests updated
- [ ]
docs/updated (if necessary) - [ ]
pnpm run update:examplesrun (only applicable for openapi-typescript)