Skip to content

Generates models for TypeScript by schema of Swagger

Notifications You must be signed in to change notification settings

kanmu/swagger-ts-gen

 
 

Repository files navigation

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();

About

Generates models for TypeScript by schema of Swagger

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 87.0%
  • HTML 12.8%
  • JavaScript 0.2%