Skip to content

Releases: yhnavein/swaggie

v0.6.8

14 Nov 11:53

Choose a tag to compare

  • fix: handle comments for inherited types correctly
  • improvement: render comments (descriptions) in more consistent and better way
  • chore: Remove dead code

v0.6.7

03 Oct 12:31

Choose a tag to compare

  • fix: exclude blob types from adding toString (#23)

v0.6.6

03 Oct 09:17

Choose a tag to compare

  • CHANGE: Drop support for node < 12. At this point node 14 is LTS.
  • fix: Handle non-string form data parameters correctly (#22)
  • chore: Upgrade dependencies
  • impr: Use nanocolors instead of chalk

v0.6.5

14 Jun 18:27

Choose a tag to compare

  • fix: accept 2xx status codes as success
  • chore: regen dependencies

v0.6.4

01 May 20:55

Choose a tag to compare

  • chore: Upgrade deps
  • chore: Replaced esbuild with sucrase as it's more applicable to such a project

v0.6.3

01 Mar 08:15

Choose a tag to compare

  • chore: even smaller package size

v0.6.2

28 Feb 19:19

Choose a tag to compare

  • fix: wrong type used for FormData type in axios template
  • chore: upgrade deps

v0.6.1

28 Feb 19:17

Choose a tag to compare

  • chore: Upgrade deps

v0.6.0

22 Nov 20:45

Choose a tag to compare

  • feat: No longer clients generated as classes. They were quite cumbersome and in this version they are replaced by simple objects.
  • feat: Simpler client's usage and support for tree-shaking
  • feat: Allows easily to use axios-extensions or more advanced axios settings
  • breaking change: Removed reactHooks option. It's no longer necessary.
  • breaking change: axios and fetch templates changed to accomodate new method of clients export.

How to migrate:

  • Remove all occurences of useClient hook and import each of clients directly
-import { useClient } from '../../client';
+import { authClient, productClient } from '../../client';
const Component = () => {
-const { authClient, productClient } = useClient();
  • Same goes to each usage of clients or ClientContext

  • Remove all class imports from generated client

-import { AuthClient, ProductClient } from '../../client';
+import { authClient, productClient } from '../../client';
const Component = () => {
-const authClient = new AuthClient();
-const productClient = new ProductClient();
  • Look out for all Interceptors (or other code that reffers to global Axios instance) and replace global Axios instance with the one that is used in generated client.
-import Axios, { AxiosRequestConfig, AxiosError} from 'axios';
+import { AxiosRequestConfig, AxiosError, AxiosInstance } from 'axios';

-export function useAuthInterceptor() {
-  Axios.interceptors.request.use([...]
+export function useAuthInterceptor(axios: AxiosInstance) {
+  axios.interceptors.request.use(

-  Axios.interceptors.response.use(
+  axios.interceptors.response.use(

Axios instance is exposed in the client generated code:

+import { axios } from '../client';

-useAuthInterceptor();
+useAuthInterceptor(axios);

v0.5.3

07 Nov 23:46

Choose a tag to compare

  • chore: upgrade deps