openapistack / openapi-client-axios

JavaScript client library for consuming OpenAPI-enabled APIs with axios
https://openapistack.co
MIT License
550 stars 67 forks source link

axios update #130

Closed Jsherborne92 closed 1 year ago

Jsherborne92 commented 1 year ago

Please update the axios peer dependency to the latest.

anttiviljami commented 1 year ago

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

jazmon commented 1 year ago

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:

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();
    },
  },
},
Riglanto commented 1 year ago

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

anttiviljami commented 1 year ago

Hi guys! openapi-client-axios@6.0.0 is now out with support for axios v1. 🤝