Skip to content

Generate the API Client for Fetch or Axios from an OpenAPI Specification

License

Notifications You must be signed in to change notification settings

acacode/swagger-typescript-api

Folders and files

NameName
Last commit message
Last commit date
Mar 26, 2025
Mar 27, 2025
Mar 26, 2025
Feb 12, 2025
Mar 26, 2025
Mar 26, 2025
Sep 13, 2024
Jan 13, 2025
Mar 27, 2025
Oct 18, 2024
Aug 11, 2024
Mar 25, 2025
Jun 15, 2024
Mar 27, 2025
Mar 2, 2020
Sep 13, 2024
Mar 26, 2025
Apr 7, 2025
Oct 4, 2024
Mar 28, 2025
Nov 4, 2024
Apr 7, 2025

Repository files navigation

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.

About

Generate the API Client for Fetch or Axios from an OpenAPI Specification

Resources

License

Stars

Watchers

Forks

Sponsor this project