dependabot-preview[bot] 2a96f3e553
Bump @types/node from 12.12.21 to 13.1.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.21 to 13.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-24 04:58:03 +00:00
2019-12-23 15:51:55 +01:00
2019-12-23 15:51:55 +01:00
2019-12-23 15:51:55 +01:00
2019-11-19 00:19:33 +01:00
2019-11-23 20:01:29 +01:00
2019-12-11 09:47:07 +01:00
2019-11-05 10:39:26 +01:00
2019-11-05 10:44:14 +01:00
2019-11-23 11:01:12 +01:00
2019-11-05 10:39:26 +01:00
2019-12-20 00:11:56 +01:00
2019-11-23 11:01:12 +01:00
2019-11-05 10:39:26 +01:00

OpenAPI Typescript Codegen

NPM License Build Status Quality

NodeJS library that generates Typescript clients based on the OpenAPI specification.

Why?

  • Frontend ❤️ OpenAPI, but we do not want to use JAVA codegen in our builds.
  • Quick, lightweight, robust and framework agnostic.
  • Supports generation of Typescript clients.
  • Supports generations of fetch and XHR http clients.
  • Supports OpenAPI specification v2.0 and v3.0.
  • Supports JSON and YAML files for input.

Known issues:

  • If you use enums inside your models / definitions then those enums are now inside a namespace with the same name as your model. This is called declaration merging. However Babel 7 now support compiling of Typescript and right now they do not support namespaces.

Installation

npm install openapi-typescript-codegen --save-dev

Example

package.json

{
    "scripts": {
        "generate": "openapi ./api/openapi.json ./dist"
    }
    ...
}

Command line

npm install openapi-typescript-codegen -g

openapi ./api/openapi.json ./dist

NodeJS API:

const OpenAPI = require('openapi-typescript-codegen');

OpenAPI.generate(
    './api/openapi.json',
    './dist'
);
Description
NodeJS library that generates Typescript or Javascript clients based on the OpenAPI specification
Readme 59 MiB
Languages
TypeScript 83.7%
Handlebars 13.9%
JavaScript 2.3%