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

filipeue-swagger-js-codegen

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filipeue-swagger-js-codegen

A Swagger codegen for TypeScript and JavaScript

  • 1.13.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Swagger to JS & Typescript Codegen

This package generates a typescript or javascript class from a swagger specification url. The code is generated using mustache templates and beautified by prettier.

Installation

npm install https://github.com/bart-sk/swagger-js-codegen

or

yarn add https://github.com/bart-sk/swagger-js-codegen

Example

CLI

npx swagger2js generate {swaggerUrl} --type javascript > api.js

SwaggerUrl should be absolute url. Resulting class can be retrieved on stdout.

-t, --type
Either "javascript" or "typescript" (default: typescript)

--tags
Filter tags in swagger spec

-c --class
Class name (default: Api)

In package.json

  "scripts": {
    ...
    "generate-api": "npx swagger2js generate {swaggerUrl} > api.ts",
    ...
  },

Keywords

FAQs

Package last updated on 13 Dec 2020

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