swagger-to-typescript2
v0.1.32
Published

Readme
Generate typescript code from swagger spec.

Example
const res = fs.readFileSync("../spec.json").toString();
const doc = getDoc(JSON.parse(res));
if (!doc) {
throw "Document cannot be null";
}
const tsCode = swaggerToTypescript(doc);
writeTsToFile(`src/api.generated.ts`, tsCode);