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
|
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 |
| } | ||
|
|
||
| if (paramsSerializer !== undefined) { | ||
| validator.assertOptions(paramsSerializer, { |
There was a problem hiding this comment.
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. |
originally added in axios#5113
originally added in axios#5113
originally added in axios#5113
originally implemented in axios#5113
Added
paramsSerializer.serializeoption to support custom params serializer as a workaround for #5094