UNPKG

swagger-ts-generator

Version:

Given a swagger.json file, generates a number of TypeScript files which can be used as models and model-driven forms in Angular 2 (and above)

17 lines (16 loc) 1.07 kB
import { GeneratorOptions } from './bootstrap/options'; import { Swagger } from './bootstrap/swagger'; /** * Generate TypeScript files based on the given SwaggerFile and some templates * * @param {string} swaggerInput The fileName of the swagger.json file including path * @param {object} options Options which are used during generation * .modelFolder: the name of the folder (path) to generate the models in. each model class is generated in its own file. * .enumTSFile: the name of the enum TS file including path * .enumI18NHtmlFile: the name of the HTML file including path to generate enum values for translation. * .enumLanguageFiles: array with the names of the enum languages file including path * .modelModuleName: the name of the model module (aka namespace) * .enumModuleName: the name of the enum module (aka namespace) */ export declare function generateTSFiles(swaggerInput: string | Swagger, options: GeneratorOptions): void;