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

swagger-axios-codegen

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-axios-codegen

require node > v8.0.0

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.4K
increased by66.25%
Maintainers
1
Weekly downloads
 
Created
Source

swagger-axios-codegen

require node > v8.0.0

swagger client to use axios and typescript

Get Started

  yarn add swagger-axios-codegen

export interface ISwaggerOptions {
  className: string
  methodMode: 'operationId' | 'path',
  type: 'ts' | 'js',  // just create to ts
  outputDir: string,
  fileName: string
}


const defaultOptions = {
  className: 'Service',
  methodMode: 'path',
  type: 'ts',
  outputDir: './service',
  fileName: 'api.ts'
}

Example

use local swagger api json

const { codegen } = require('swagger-axios-codegen')
codegen({
  methodMode: 'path',
  source:require('./swagger.json')
})


use remote swagger api json

const { codegen } = require('swagger-axios-codegen')
codegen({
  methodMode: 'path',
  remoteUrl:'You remote Url'
})


FAQs

Package last updated on 15 Apr 2018

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