1.3.1 • Published 3 years ago

openapi-ts-client-gen v1.3.1

Weekly downloads
234
License
MIT
Repository
github
Last release
3 years ago

Overview

Generate a TypeScript client from a swagger.json file

Install

[yarn add | npm install] openapi-ts-client-gen

Usage

CLI

openapi-ts-client-gen

generate client

Options:
  --help           Show help                                           [boolean]
  --version        Show version number                                 [boolean]
  --namespace, -n  Module namespace                                   [required]
  --url, -u        URL of swagger.json file
  --file, -f       Path of swagger.json file
  --out, -o        Output path (e.g. ./out/swagger.json)              [required]
  --baseUrl, -b    Base URL of API

Programmatic

import { generate } from "openapi-ts-client-gen";

generate({
    destPath: "./api.ts",
    namespace: "Api",
    srcPath: "./swagger.json",
    type: "file",
}).then(() => console.log("success!"))
1.3.1

3 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago