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)

18 lines (17 loc) 1.2 kB
import { SwaggerSchema } from '../bootstrap/swagger'; import { GeneratorOptions } from '../bootstrap/options'; export declare const ENCODING = "utf8"; export declare function readAndCompileTemplateFile(templatePath: string): HandlebarsTemplateDelegate<any>; export declare function writeFileIfContentsIsChanged(outputFileName: string, contents: string): boolean; export declare function ensureFile(outputFileName: string, contents: string): void; export declare function ensureFolder(folder: string): void; export declare function getDirectories(srcpath: string): string[]; export declare function getFiles(srcpath: string): string[]; export declare function removeFolder(folder: string): void; export declare function getPathToRoot(namespace: string): string; export declare function convertNamespaceToPath(namespace: string): string; export declare function getSortedObjectProperties(object: Object): Object; export declare function isInTypesToFilter(item: SwaggerSchema, key: string, options: GeneratorOptions): boolean; export declare function removeExtension(file: string): string; export declare function log(message: string): void; export declare function logError(message: string): void;