Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-client-axios

Package Overview
Dependencies
Maintainers
1
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-client-axios - npm Package Compare versions

Comparing version 7.3.3 to 7.3.4

4

package.json
{
"name": "openapi-client-axios",
"description": "JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included.",
"version": "7.3.3",
"version": "7.3.4",
"license": "MIT",

@@ -77,3 +77,3 @@ "keywords": [

},
"gitHead": "fdd867307f9422c9d2d9fd52b6686572798b8df7"
"gitHead": "20cce9ebc81b10fbabc4bbd26e47354c75e065eb"
}

@@ -173,24 +173,12 @@ <h1 align="center"><img alt="openapi-client-axios" src="https://github.com/anttiviljami/openapi-client-axios/raw/master/header.png?raw=true" style="max-width:50rem"></h1>

## Generating type files (.d.ts)
## Typesafe Clients
![TypeScript IntelliSense](https://github.com/anttiviljami/openapi-client-axios/blob/master/packages/typegen/intellisense.gif)
`openapi-client-axios` comes with a tool called `typegen` to generate typescript type files (.d.ts) for
OpenAPIClient instances using an OpenAPI definition file.
`openapi-client-axios` comes with a CLI command `openapicmd typegen` to generate Typescript types for type safety and code autocomplete.
```
$ npm install -g openapi-client-axios-typegen
npx openapicmd typegen ./openapi.yaml > src/types/openapi.d.ts
```
```
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`.

@@ -207,7 +195,7 @@

`typegen` supports using both local and remote URLs for OpenAPI definition files.
`openapicmd typegen` supports using both local and remote URLs for OpenAPI definition files.
```
$ typegen ./petstore.yaml
$ typegen https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
$ npx openapicmd typegen ./petstore.yaml
$ npx openapicmd typegen https://petstore3.swagger.io/api/v3/openapi.json
```

@@ -214,0 +202,0 @@

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