Skip to content

Releases: acacode/swagger-typescript-api

5.1.5 Release

19 Feb 07:51
683311a
Compare
Choose a tag to compare

Fixes:

  • ContentType.FormData no longer sets the correct boundary (issue #172, thanks @Styn)

5.1.4 Release

18 Feb 08:15
Compare
Choose a tag to compare

Fixes:

  • header overwrite in default and modular API templates (issue #171 by @Styn, thanks @emilecantin for PR with fix)

5.1.3 Release

18 Feb 00:03
45b93bc
Compare
Choose a tag to compare

Fixes:

  • Ignored x-nullable field
  • Schema type names which starts with number or special characters

5.1.2 Release

15 Feb 12:07
5535462
Compare
Choose a tag to compare

Fixes:

  • Linter disable rules is not working (issue #164, thanks @Haritaso)

5.1.1 Release

15 Feb 08:52
798c8e9
Compare
Choose a tag to compare

Fixes:

  • The HttpResponse type is no longer exported from http-client (issue #161, thanks @Styn)

5.1.0 Release

15 Feb 00:44
21c64fd
Compare
Choose a tag to compare

Fixes:

  • Bug with optional nested properties of object schema type (issue #156, thanks @Fabiencdp)

Features:

  • onCreateRouteName(routeNameInfo: RouteNameInfo, rawRouteInfo: RawRouteInfo): RouteNameInfo | void hook
    Which allows to customize route name without customizing route-name.eta template
  • Improved content kinds for request infos
  • --single-http-client option which allows to send HttpClient instance to Api constructor and not to create many count of HttpClient instances with --modular api (issue #155)

Minor:

  • A bit improve type declaration file (index.d.ts) for this tool
  • make exportable ApiConfig interface

Internal:

  • clearing routeNameDuplicatesMap before each parseRoutes() function call
  • Changed templates:
    • http-client.eta
    • procedure-call.eta
    • api.eta

5.0.0 Release

12 Feb 23:39
baf3814
Compare
Choose a tag to compare

Fixes:

  • Request content types auto substitution
    i.e. if request body is form data, then request body content type will be multipart/form-data
  • Strange method name (issue #152, thanks @RoXuS)
  • Hardcoded Content-Type causes issues with some endpoints (issue #153, thanks @po5i)
  • Critical bug with :paramName path params (issue #154)

Features:

  • Ability to provide custom formatting fetch response
  • "IMAGE" content kind for response\request data objects
  • RequestParams RequestHeaders types for --route-types (routeTypes: true) option (issue #150, thanks @Fabiencdp )
  • --default-response option. Allows to set default type for empty response schema (default: void) (based on issue #14)
  • Request cancellation support (issue #96, thanks @ApacheEx)
    RequestParams type now have the cancelToken field
    HttpClient instance now have the abortRequest(cancelToken) method

BREAKING_CHANGES:

  • Fully refactored http-client.eta template, make it more flexible and simpler.
    HttpClient["request"] takes one argument with type FullRequestParams
    (previously it takes many count of arguments which was not flexible)
  • Changed the default response body type from any to void (issue #14)

Internal:

  • Changed templates:
    • http-client.eta
    • procedure-call.eta
    • api.eta

This version works with previous templates.

4.4.0 Release

09 Feb 22:28
0f6a69c
Compare
Choose a tag to compare

Fixes:

  • Client generation for Content-Type: application/x-www-form-urlencoded (issue #146, thanks @Larox)

Internal:

  • Changed templates:
    • http-client.eta
    • procedure-call.eta

4.3.0 Release

08 Feb 10:52
a3d2a82
Compare
Choose a tag to compare

Fixes:

  • enum + nullable: true doesn't compute the good type (issue #145, thanks @RoXuS)
  • Underscores are omitted from enum keys (issue #108, thanks @eolant)
  • CLI silently fails if the directory to put new files in doesn't exist yet (issue #141, thanks @Styn)

Features:

  • Improved type description

Internal:

  • dependencies update:

    • "js-yaml": "^4.0.0" ("^3.14.1")
    • "make-dir": "^3.1.0"
    • "swagger2openapi": "^7.0.5" ("^7.0.4")
  • Difference in templates:

    • data-contracts.eta
      dataContracts430

4.2.0 Release

26 Jan 07:42
ba1a687
Compare
Choose a tag to compare

Features:

  • new hook onCreateRequestParams which allows modify request params (--extract-request-params option) before sending it to route info
    onCreateRequestParams
    How to use:
      generateApi({
        // ... your config,
        hooks: {
          onCreateRequestParams: (rawType) => {
            if (Object.keys(rawType.properties).length > 1) return rawType;
    
            return rawType;
          }
        }
      })
  • response content types (array of string like application/json, image/png) which allows to customize declaration of request response
    Exist in procedure-call.eta template it.route.response.contentTypes

Internal:

  • Difference in templates:
    • procedure-call.eta
      procedureCallEta1