Skip to content

Releases: teobler/swr-request-generator

1.2.2

24 Mar 09:09
Compare
Choose a tag to compare

fixes

  • should only update variable from openAPI when it is an invalid variable name #16

chore

  • make project esm

1.2.1

21 Feb 03:04
Compare
Choose a tag to compare

fixes

  • generate nested response type error #14

example

  • add full example #13

chore

  • add toc for readme

1.2.0

11 Feb 01:50
Compare
Choose a tag to compare

Breaking changes

  • remove useless prefix 'I' for generated interface #10

Feature & Fix

  • fix creating excess definitions for top-level enum
    schemas #9 @lorissikora
  • make console warning and error more focusable #5
  • support default fields for response schema, and support application/json; charset=UTF-8.schema media query for it #7

Source Code

Thanks for @lorissikora help!

1.1.0

10 Jan 07:16
Compare
Choose a tag to compare
  • add support for yaml file
  • add generate default request hook and default request client options
  • add warning when input swagger file does not have operation id for a uniq request

1.0.0

17 Nov 09:19
Compare
Choose a tag to compare

Breaking changes

  • support useSWRMutation for mutation request
    • previous: use axios.request for mutation request
    • now: use useSWRMutation hook as a wrapper, use axios as request client
  • rename useSWR wrapper from useRequest to useGetRequest
  • support oneOf/anyOf/allOf in openAPI spec

Other changes

  • add new wrapper function demo useMutationRequest in example/src/request/useMutationRequest
  • fix wrong rewrite behavior for request/response
    • previous version will rewrite all the key in request and response to camelCase, this version fixed this wrong behavior, all the variables will follow backend definition
  • clean up any types in source code
  • rewrite example folder as a independent project, can be easily understand how to use this lib

0.7.4

24 Oct 09:43
Compare
Choose a tag to compare

upgrade all dependencyies

0.7.3

30 Sep 01:11
Compare
Choose a tag to compare
  • (new feature) support nullable schema
  • (minor change) remove useless keyof typeof keyword for enum type
    • previous: { someField: keyof typeof EnumType }
    • now: { someField: EnumType }
  • (bug fix) fix cannot generate enum type in definition issue

0.7.2

20 Feb 08:18
Compare
Choose a tag to compare

upgrade axios to fix security issue