Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 376 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 376 Bytes

swagger-ts-gen

A generator for typescript from Swagger

Installation

npm install -D swagger-ts-gen

Usage

import { Generator } from "swagger-ts-gen";

const content = fs.readFileSync("path to swagger", "utf-8");
const generator = new CodeGenerator(JSON.parse(content), {
  dist: path.resolve(process.cwd(), "dist")
});
generator.generate();