Skip to content

Releases: acacode/swagger-typescript-api

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

6.3.0 Release

04 Mar 21:55
7d38f20
Compare
Choose a tag to compare

Features:

  • --type-suffix option. Allows to set suffix for data contract name. (issue #191, thanks @the-ult)
  • --type-prefix option. Allows to set prefix for data contract name. (issue #191, thanks @the-ult)
    Examples here
  • onFormatTypeName(usageTypeName, rawTypeName) hook. Allow to format data contract names as you want.

Internal:

  • rename and split checkAndRenameModelName -> formatModelName, fixModelName

6.2.1 Release

04 Mar 09:13
c9753aa
Compare
Choose a tag to compare

Fixes:

  • missing generateUnionEnums?: boolean; in index.d.ts file (thanks @artsaban)
  • missing default params to axios http client (--axios) (issue #192, thanks @Nihisil)

6.2.0 Release

03 Mar 15:12
93ec745
Compare
Choose a tag to compare

Features:

  • --module-name-first-tag option. Splits routes based on the first tag (thanks @jnpoyser)

6.1.2 Release (bugfix)

02 Mar 19:27
49666e8
Compare
Choose a tag to compare

Fixes (critical):

  • Problems with using both --axios and --modular options together (TS, organizeImports crashed the codegeneration)

6.1.1 Release (bugfix)

02 Mar 18:56
b5d3d50
Compare
Choose a tag to compare

Fixes:

  • Problems with --axios option
    • ignoring path, format, type payload properties in request() method of HttpClient
  • Missing format property for requests in --modular option

6.1.0 Release

02 Mar 11:04
9621fed
Compare
Choose a tag to compare

Features:

  • --silent option. Output only errors to console (default: false)

Fixes:

  • Bug with kebab-case path params (issue #184, thanks @Mr-sgreen)
  • Typings for --js option