Skip to content

Releases: acacode/swagger-typescript-api

9.0.0 Release

29 Apr 06:39
b4b11eb
Compare
Choose a tag to compare

NOTE: This version is not compatible with previous templates (removed route.request.params, apiConfig.props, apiConfig.generic, apiConfig.description, apiConfig.hasDescription)

Fixes:

  • Consider 2xx a successful status (thanks @wyozi)
  • GET method query option bug (thanks @rhkdgns95, @SaschaGalley)
  • silent property missed in .d.ts file (thanks @mastermatt)
  • axios file upload formData type (thanks @guhyeon)
  • make property instance to public in axios http client (It can be helpful in #226)
  • variable name "params" doesn't uniq (thanks @mixalbl4-127 )

Features:

  • --disableProxy option (thanks @kel666)
  • --extract-request-body option. Allows to extract request body type to data contract
  • Add TSDoc tag for deprecated route (thanks @wyozi)

8.0.3 Release

08 Apr 08:22
Compare
Choose a tag to compare
  • Fixes encoding array query params in fetch http templates (thanks @prog13)

8.0.2 Release

05 Apr 07:43
31e63c2
Compare
Choose a tag to compare

Fixes:

  • Wrong working the format option in fetch http client

8.0.1 Release

05 Apr 07:36
b226db3
Compare
Choose a tag to compare

Fixes:

  • Not working customFetch
    Error: Failed to execute 'fetch' on 'Window': Illegal invocation

8.0.0 Release

04 Apr 22:54
4b809f3
Compare
Choose a tag to compare

BREAKING_CHANGES:

  • remove default json format of the response type (both for axios and fetch http clients) (issue #213, thanks @po5i)

Features:

  • Allow passing custom fetch function (fetch http client only)
  • Allow to set global response type format through HttpClient constructor
    Example:
    const httpClient = new HttpClient({ format: 'json' });
    // all request responses will been formatted as json  

Fixes:

  • Missing schema.$ref in inline enum schemas
  • Array query param values are serialized with the (non-default) comma separated style (issue #222, thanks @Styn, PR #223)
  • TypeScript error "TS6133: 'E' is declared but its value is never read." (axios http client) (issue #220, thanks @pmbednarczyk )

7.0.1 Release

28 Mar 21:26
8329c4b
Compare
Choose a tag to compare

Fixes:

  • "securityWorker" is only used if "secure" option is specified on each request (issue #212, thanks @dkamyshov)
    NOTE: added global secure option for axios http client
  • index.d.ts file (add rawModelTypes)

7.0.0 Release

19 Mar 08:28
44c6f54
Compare
Choose a tag to compare

BREAKING_CHANGES:

  • format namespace name in --route-types as camelCase with upper first capitalized letter
    foo_bar -> FooBar

Fixes:

  • Incorrect working the --route-types option with --modular option (route types should be splitted on files)
  • Fix critical bug linked with enums with boolean type (thanks @haedaal)

Features:

  • Ability to return false in onCreateRoute hook, it allow to ignore route
  • Add output util functions
  createFile: (params: {
    path: string;
    fileName: string;
    content: string;
    withPrefix?: boolean;
  }) => void;
  renderTemplate: (
    templateContent: string,
    data: Record<string, unknown>,
    etaOptions?: import("eta/dist/types/config").PartialConfig
  ) => string;
  getTemplate: (params: {
    fileName?: string;
    name?: string;
    path?: string;
  }) => string
  formatTSContent: (content: string) => string;


  // ...

  generateApi({ /* ... */ }).then(({ createFile, renderTemplate, getTemplate }) => {
    // do something
  })

6.4.2 Release (bugfix)

09 Mar 21:41
888249b
Compare
Choose a tag to compare

Fixes:

  • Bug with missing name property in in-path requests parameters
  • Problem with usage --route-types with --modular option (mising import data contracts)

6.4.1 Release

07 Mar 22:09
8354a4f
Compare
Choose a tag to compare

Fixes:

  • Bug with axios headers (thanks @mutoe, issue #203)

6.4.0 Release

05 Mar 23:39
a975971
Compare
Choose a tag to compare

Features:

  • onFormatRouteName(routeInfo: RawRouteInfo, templateRouteName: string) hook. Allows to format route name, as you like :)

Fixes:

  • Bug with wrong complex types (anyOf, oneOf, allOf) when some child schema contains only description
    example
  • Bug with number enums which have x-enumNames
  • Problem with not existing title property in info

Minor:

  • Improve description for complex types
  • Improve description in single api file