BREAKING_CHANGE: disable support NodeJS 14.x
BREAKING_CHANGE: change swagger-typescript-api NodeJS "generateApi" function return type
BREAKING_CHANGE: remove rawModelTypes
from output api configuration
feat: --custom-config <string>
option (#503)
feat: --sort-routes
option, ability to sort routes;
fix: critical bugs based with extract types and enums
fix: sort types option (sort was not correctly work with nested or extracted types)
fix: problems based with extracting enums;
fix: nullable enum with integer values (#543)
fix: generation enum numbers as strings one (#534)
chore: refactoring the axios imports
fix: non-object custom spec extensions (#500)
fix(docs): input instead of output in readme
internal: remove redundant internal scripts
internal: change process with using custom templates
interface GenerateApiOutput {
...
- files: { name: string; content: string; declaration: { name: string; content: string } | null }[];
+ files: { fileName: string; fileContent: string; fileExtension: string }[];
...
}
internal: refactor schema parser code (preparing it for async code execution)
fix: problem with filtering primitive in complex types (#459)
feat: add discriminator property support (#456)
internal: prepare code + templates for async code execution (next plans)
fix: problems with dot in query params (hard fix) (#460)
feature: ability to send custom Ts output code translator to js. Example:
const { Translator } = require("swagger-typescript-api/src/translators/translator");
const { JavascriptTranslator } = require("swagger-typescript-api/src/translators/javascript");
class MyTranslator extends Translator { // or use extends JavascriptTranslator
translate({ fileName, fileExtension, fileContent }) {
// format ts\js code with using this codeFormatter (prettier + ts import fixer)
this.codeFormatter.format(fileContent)
// config of the code gen process
this.config.
// logger
this.logger.
return [
{
fileName,
fileExtension,
fileContent,
}
]
}
}
Full Changelog: 12.0.4...13.0.0