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
Added custom params serializer support; #5113
Added custom params serializer support; #5113
Conversation
@DigitalBrainJS is this duplicative effort of #5108 ? EDIT: I also found a bug with null values being included in the serialized params list and resolved those in the PR. TDD FTW |
5e55932
to
03c8b08
Compare
Fixed allowUnknown option;
03c8b08
to
aa332dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks 👍
Hi, |
Interestingly this PR overlooks a couple of bugs
I already had a fix for this exact thing (see #5108) but it still sits open. It allowed custom params serialzers based on a boolean flag and made use of the existing encode field. Even added unit tests for all these behaviors. Not sure why we're duplicating effort here. 🤷 EDIT: PR updated with bug fixes after merging this in |
Hey! This feature made a breaking change on |
@Roriz No, the |
As you can see on issue #5142, from this PR forward we can't use the old interface for |
@@ -57,6 +57,13 @@ class Axios { | |||
}, false); | |||
} | |||
|
|||
if (paramsSerializer !== undefined) { | |||
validator.assertOptions(paramsSerializer, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this new validations creates a breaking change
Yes, the old interface has been refactored in v1.0.0-alpha.1, in other words, the old interface is not supported since v1.0.0-alpha.1. Please check the index.d.ts file to see the new paramsSerializer interface definition. |
Ok, we changed the interface on alpha.1, but we don't add any warning about the change in the runtime. And now we put a validation check in runtime, any application that uses this config will break without alarm. |
I see three problems here. |
Added
paramsSerializer.serialize
option to support custom params serializer as a workaround for #5094