New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-client-axios-typegen

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-client-axios-typegen

Typescript type generator for openapi-client-axios

  • 7.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.9K
decreased by-13.35%
Maintainers
1
Weekly downloads
 
Created
Source

OpenAPI Client Axios Typegen

CI npm version License

Type generator for openapi-client-axios

Tip: It's recommended to use openapicmd typegen to generate types instead of directly installing the openapi-client-axios-typegen package.

Documentation

New! OpenAPI Client Axios documentation is now found on openapistack.co

https://openapistack.co/docs/openapi-client-axios/intro

Usage

Usage: typegen [file]

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Examples:
  typegen ./openapi.yml > client.d.ts  - generate a type definition file

The output of typegen exports a type called Client, which can be used for instances created with OpenAPIClientAxios.

Both the api.getClient() and api.init() methods support passing in a Client type.

import { Client as PetStoreClient } from './client.d.ts';

const client = await api.init<PetStoreClient>();
const client = await api.getClient<PetStoreClient>();

typegen supports using both local and remote URLs for OpenAPI definition files.

$ typegen ./petstore.yaml
$ typegen https://petstore3.swagger.io/api/v3/openapi.json

Contributing

OpenAPI Client Axios Typegen is Free and Open Source Software. Issues and pull requests are more than welcome!

Keywords

FAQs

Package last updated on 10 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc