@groton/swagger-spec-ts
v0.1.1
Published
Translation of Swagger specification to TypeScript objects
Readme
swagger-spec-ts
Translation of Swagger specification to TypeScript objects
Currently supprts Swagger v1.2
Install
npm install swagger-spec-tsUsage
import * as SwaggerSpec from 'swagger-pec-ts';
import fs from 'node:fs'
const spec = JSON.parse(fs.readFileSync('path/to/spec.json').toString()) as SwaggerSpec.v1p2.ApiDeclaration;