Library that generates Typescript clients based on the OpenAPI specification.
npm install pi-openapi-typescript-codegen[![NPM][npm-image]][npm-url]
[![License][license-image]][license-url]
[![Coverage][coverage-image]][coverage-url]
[![Coverage][coverage-image]][coverage-url]
[![Downloads][downloads-image]][downloads-url]
[![Build][build-image]][build-url]
> Node.js library that generates Typescript clients based on the OpenAPI specification.
```
npm install openapi-typescript-codegen --save-dev
`
$ openapi --help
Usage: openapi [options]
Options:
-V, --version output the version number
-i, --input
-o, --output
-c, --client
--name
--useOptions Use options instead of arguments
--useUnionTypes Use union types instead of enums
--exportCore
--exportServices
--exportModels
--exportSchemas
--indent
--postfixServices Service name postfix (default: "Service")
--postfixModels Model name postfix
--request
-h, --help display help for command
Examples
$ openapi --input ./spec.json --output ./generated
$ openapi --input ./spec.json --output ./generated --client xhr
``
Documentation
===
The main documentation can be found in the openapi-typescript-codegen/wiki
Sponsors
===
If you or your company use the OpenAPI Typescript Codegen, please consider supporting me. By sponsoring I can free up time to give this project some love! Details can be found here: https://github.com/sponsors/ferdikoomen
If you're from an enterprise looking for a fully managed SDK generation, please consider our sponsor:
[npm-url]: https://npmjs.org/package/openapi-typescript-codegen
[npm-image]: https://img.shields.io/npm/v/openapi-typescript-codegen.svg
[license-url]: LICENSE
[license-image]: http://img.shields.io/npm/l/openapi-typescript-codegen.svg
[coverage-url]: https://codecov.io/gh/ferdikoomen/openapi-typescript-codegen
[coverage-image]: https://img.shields.io/codecov/c/github/ferdikoomen/openapi-typescript-codegen.svg
[downloads-url]: http://npm-stat.com/charts.html?package=openapi-typescript-codegen
[downloads-image]: http://img.shields.io/npm/dm/openapi-typescript-codegen.svg
[build-url]: https://circleci.com/gh/ferdikoomen/openapi-typescript-codegen/tree/master
[build-image]: https://circleci.com/gh/ferdikoomen/openapi-typescript-codegen/tree/master.svg?style=svg