Releases: acacode/swagger-typescript-api
Releases · acacode/swagger-typescript-api
5.1.5 Release
5.1.4 Release
Fixes:
- header overwrite in
default
andmodular
API templates (issue #171 by @Styn, thanks @emilecantin for PR with fix)
5.1.3 Release
Fixes:
- Ignored
x-nullable
field - Schema type names which starts with number or special characters
5.1.2 Release
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 | void
hook
Which allows to customize route name without customizingroute-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 eachparseRoutes()
function call - Changed templates:
http-client.eta
procedure-call.eta
api.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
:paramName
path params (issue #154)
Features:
- Ability to provide custom formatting
fetch
response "IMAGE"
content kind for response\request data objectsRequestParams
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 thecancelToken
field
HttpClient
instance now have theabortRequest(cancelToken)
method
BREAKING_CHANGES:
- Fully refactored
http-client.eta
template, 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
any
tovoid
(issue #14)
Internal:
- Changed templates:
http-client.eta
procedure-call.eta
api.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
onCreateRequestParams
which allows modify request params (--extract-request-params
option) 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.eta
templateit.route.response.contentTypes
Internal: