swagger-typescript-api
TypeScript icon, indicating that this package has built-in type declarations

13.2.7 • Public • Published

Swagger TypeScript API

  • Support for OpenAPI 3.0, 2.0, JSON and YAML
  • Generate the API Client for Fetch or Axios from an OpenAPI Specification

Any questions you can ask here

Examples

All examples you can find here

Usage

You can use this package in two ways:

CLI

npx swagger-typescript-api generate --path ./swagger.json

Or install locally in your project:

npm install --save-dev swagger-typescript-api
npx swagger-typescript-api generate --path ./swagger.json

Library

npm install --save-dev swagger-typescript-api
import * as path from "node:path";
import * as process from "node:process";
import { generateApi } from "swagger-typescript-api";

await generateApi({ input: path.resolve(process.cwd(), "./swagger.json") });

For more detailed configuration options, please consult the documentation.

Mass media

License

Licensed under the MIT License.

/swagger-typescript-api/

    Package Sidebar

    Install

    npm i swagger-typescript-api

    Weekly Downloads

    329,572

    Version

    13.2.7

    License

    MIT

    Unpacked Size

    1 MB

    Total Files

    41

    Last publish

    Collaborators

    • acacode
    • smorimoto