Releases: acacode/swagger-typescript-api
Releases · acacode/swagger-typescript-api
5.1.1 Release
5.1.0 Release
Fixes:
- Bug with optional nested properties of object schema type (issue #156, thanks @Fabiencdp)
Features:
onCreateRouteName(routeNameInfo: RouteNameInfo, rawRouteInfo: RawRouteInfo): RouteNameInfo | voidhook
Which allows to customize route name without customizingroute-name.etatemplate- Improved content kinds for request infos
--single-http-clientoption which allows to send HttpClient instance to Api constructor and not to create many count of HttpClient instances with--modularapi (issue #155)
Minor:
- A bit improve type declaration file (index.d.ts) for this tool
- make exportable
ApiConfiginterface
Internal:
- clearing
routeNameDuplicatesMapbefore eachparseRoutes()function call - Changed templates:
http-client.etaprocedure-call.etaapi.eta
5.0.0 Release
Fixes:
- Request content types auto substitution
i.e. if request body is form data, then request body content type will bemultipart/form-data - Strange method name (issue #152, thanks @RoXuS)
- Hardcoded Content-Type causes issues with some endpoints (issue #153, thanks @po5i)
- Critical bug with
:paramNamepath params (issue #154)
Features:
- Ability to provide custom formatting
fetchresponse "IMAGE"content kind for response\request data objectsRequestParamsRequestHeaderstypes for--route-types(routeTypes: true) option (issue #150, thanks @Fabiencdp )--default-responseoption. Allows to set default type for empty response schema (default:void) (based on issue #14)- Request cancellation support (issue #96, thanks @ApacheEx)
RequestParamstype now have thecancelTokenfield
HttpClientinstance now have theabortRequest(cancelToken)method
BREAKING_CHANGES:
- Fully refactored
http-client.etatemplate, make it more flexible and simpler.
HttpClient["request"]takes one argument with typeFullRequestParams
(previously it takes many count of arguments which was not flexible) - Changed the default response body type from
anytovoid(issue #14)
Internal:
- Changed templates:
http-client.etaprocedure-call.etaapi.eta
This version works with previous templates.
4.4.0 Release
4.3.0 Release
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:
4.2.0 Release
Features:
- new hook
onCreateRequestParamswhich allows modify request params (--extract-request-paramsoption) before sending it to route info

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 inprocedure-call.etatemplateit.route.response.contentTypes
Internal:
4.1.0 Release
Features:
- Improve
require()function used in ETA templates (using relative path imports) --clean-outputoption.
clean output folder before generate api
Fixes:
- Error:
Unexpected token =(Issue #136, Thanks @jlow-mudbath) - Output folder creation (Issue #137, Thanks @Rinta01)
Create output folder if it is not exist
4.0.5 Release
BREAKING_CHANGE:
- remove
'prettier-plugin-organize-imports'dependency from package
Fixes:
- issue #134 (Thanks @mrfratello)
4.0.4 Release
Features:
- add
require()to templateutilsobject
Docs:
- add information about contributors

