Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielgek/openapi-ts
OpenApi/Swagger to Typescript defenitions!
https://github.com/danielgek/openapi-ts
openapi swagger typescript
Last synced: 23 days ago
JSON representation
OpenApi/Swagger to Typescript defenitions!
- Host: GitHub
- URL: https://github.com/danielgek/openapi-ts
- Owner: danielgek
- License: apache-2.0
- Created: 2019-10-25T16:17:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-11T18:52:52.000Z (over 2 years ago)
- Last Synced: 2024-10-04T21:51:25.685Z (about 1 month ago)
- Topics: openapi, swagger, typescript
- Language: TypeScript
- Size: 72.3 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenApi/Swagger to TypeScript definitions!
This tool generates TypeScript interfaces/Enums to all entities that you specified on swagger/openapi spec.
**Note:** this generates **only** interfaces and Enums
## Installation
```
npm install --save-dev openapi-ts
```## Generating types (CLI)
```bash
npx openapi-ts -i ./src/api-docs.json -o ./gen.d.ts
```## Generating types (javascript module)
```javascript
const { generate } = require('openapi-ts');generate(openAPISpecPath, outputPath);
```