openapi-client-axios icon indicating copy to clipboard operation
openapi-client-axios copied to clipboard

axios update

Open Jsherborne92 opened this issue 2 years ago • 1 comments

Please update the axios peer dependency to the latest.

Jsherborne92 avatar Oct 06 '22 22:10 Jsherborne92

Why? ^0.25.0 is fully compatible with latest. This would just break backwards compatibility

anttiviljami avatar Oct 09 '22 15:10 anttiviljami

Moro moro! 👀 Just to weigh in, I had to change axios version (to the semver-compatible one). Axios has released v1 now.

In order to support the latest version, some things have to be fixed. I ran into the following issue before giving up and downgrading axios:

  • https://github.com/axios/axios/issues/5142

Update: that does seem to be the only breaking issue for me and it can be fixed in app code with:

axiosConfigDefaults: {
  paramsSerializer: {
    serialize: params => {
      return new URLSearchParams(params).toString();
    },
  },
},

jazmon avatar Oct 26 '22 15:10 jazmon

Any chance to get at least beta version wit axios 1+? In our case we've been using axios 1+ for some time, then added openapi-client-axios which is superb when working with external apis. We manage to make it work with 1+ and 0.25 in peer dependency leveraging legacy-peer-deps flag, but that leads to problems with prisma (that some deps/post-scripts are not run properly).

Edit: I found the exact bug that brought me here: https://github.com/axios/axios/issues/4460 It was fixed with axios 0.27.2

Riglanto avatar Nov 03 '22 08:11 Riglanto

Hi guys! [email protected] is now out with support for axios v1. 🤝

anttiviljami avatar Nov 14 '22 18:11 anttiviljami