openapi-express-codegen
v1.0.8
Published
Library that generates express Typescript types based on the OpenAPI specification.
Maintainers
Readme
OpenAPI Express Codegen
Node.js library that generates express Typescript types based on the OpenAPI specification.
Install
npm install openapi-express-codegen --save-devUsage
$ express-gen --help
Usage: express-gen [options]
Options:
-V, --version output the version number
-i, --input <value> OpenAPI specification, can be a path, url or string content (required)
-o, --output <value> Output directory (required)
--useUnionTypes Use union types instead of enums
--exportInterfaces <value> Write interfaces to disk (default: true)
--exportModels <value> Write models to disk (default: true)
--exportSchemas <value> Write schemas to disk (default: false)
--indent <value> Indentation options [4, 2, tab] (default: "4")
--postfix <value> Interface name postfix (default: "Generated")
-h, --help display help for command
Examples
$ express-gen --input ./spec.json --output ./generatedDocumentation
References
This project is based on: openapi-typescript-codegen
