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 3.0.0 to 3.0.1

bin/typegen

3

package.json
{
"name": "openapi-client-axios",
"description": "JavaScript client library for consuming OpenAPI-enabled APIs with axios",
"version": "3.0.0",
"version": "3.0.1",
"author": "Viljami Kuosmanen <viljami@avoinsorsa.fi>",

@@ -35,2 +35,3 @@ "license": "MIT",

"**/*.d.ts",
"bin/*",
"!*.test.*",

@@ -37,0 +38,0 @@ "!**/*.test.*",

@@ -79,3 +79,3 @@ # OpenAPI Client Axios

Alternatively, you can explicitly specify parameters in array form. This method allows you to set custom parameters not defined
Alternatively, you can explicitly specify parameters in array form. This method allows you to set custom parameters not defined
in the OpenAPI spec.

@@ -124,8 +124,14 @@

## Generating types for clients
## Generating type files (.d.ts)
`openapi-client-axios` comes with a tool called `typegen` to generate typescript type files (.d.ts) for
OpenAPIClient instances using an OpenAPI definition.
![TypeScript IntelliSense](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.
```
$ npm install -g openapi-client-axios
```
```
Usage: typegen [file]

@@ -143,8 +149,2 @@

```typescript
import { Client } from './client.d.ts';
const client = await api.init<Client>();
```
Both the `api.getClient()` and `api.init()` methods support passing in a Client type.

@@ -159,2 +159,9 @@

`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
````
## Contributing

@@ -161,0 +168,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