Releases: acacode/swagger-typescript-api
Releases · acacode/swagger-typescript-api
8.0.1 Release
Fixes:
- Not working
customFetch
Error:Failed to execute 'fetch' on 'Window': Illegal invocation
8.0.0 Release
BREAKING_CHANGES:
- remove default
jsonformat of the response type (both foraxiosandfetchhttp clients) (issue #213, thanks @po5i)
Features:
- Allow passing custom fetch function (
fetchhttp client only) - Allow to set global response type format through
HttpClientconstructor
Example:
const httpClient = new HttpClient({ format: 'json' });
// all request responses will been formatted as json Fixes:
- Missing
schema.$refin 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." (
axioshttp client) (issue #220, thanks @pmbednarczyk )
7.0.1 Release
Fixes:
- "securityWorker" is only used if "secure" option is specified on each request (issue #212, thanks @dkamyshov)
NOTE: added globalsecureoption foraxioshttp client index.d.tsfile (addrawModelTypes)
7.0.0 Release
BREAKING_CHANGES:
- format
namespacename in--route-typesas camelCase with upper first capitalized letter
foo_bar->FooBar
Fixes:
- Incorrect working the
--route-typesoption with--modularoption (route types should be splitted on files) - Fix critical bug linked with enums with boolean type (thanks @haedaal)
Features:
- Ability to return
falseinonCreateRoutehook, 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)
Fixes:
- Bug with missing
nameproperty in in-path requests parameters - Problem with usage
--route-typeswith--modularoption (mising import data contracts)
6.4.1 Release
6.4.0 Release
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

- Bug with number enums which have
x-enumNames - Problem with not existing
titleproperty ininfo
Minor:
- Improve description for complex types
- Improve description in single api file
6.3.0 Release
Features:
--type-suffixoption. Allows to set suffix for data contract name. (issue #191, thanks @the-ult)--type-prefixoption. Allows to set prefix for data contract name. (issue #191, thanks @the-ult)
Examples hereonFormatTypeName(usageTypeName, rawTypeName)hook. Allow to format data contract names as you want.
Internal:
- rename and split
checkAndRenameModelName->formatModelName,fixModelName
6.2.1 Release
6.2.0 Release
Features:
--module-name-first-tagoption. Splits routes based on the first tag (thanks @jnpoyser)