New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@swagger-dir/core

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swagger-dir/core

A Swagger.io Directory Browser

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

@swagger-dir/core

A Swagger.io Directory Browser

Please read the documentation on the official site: https://github.com/VdustR/swagger-dir/tree/master/packages/core

More info

Install

npm i @swagger-dir/core
// or use yarn
yarn add @swagger-dir/core

Usage

const app = express();
const SwaggerDir = require('@swagger-dir/core');
const swaggerDir = new SwaggerDir(dir, options);
swaggerDir.start();

app.use(swaggerDir.fn);
app.use('subPath', swaggerDir.fn);

const server = app.listen(port);

const close = async () => {
  console.log('Service is closing...');
  await Promise.all([server.close(), swaggerDir.stop()]);
  console.log('Service is closed!');
};

Or you can check how the Swagger DIR CLI works for reference.

Options

const options = {
  mode = 'production',
  logLevel, // debug: 0, info: 1, warn: 2, error: 3, none: 4. Default: info
  formatDate, // Default: date => date.toISOString()
  swaggerUiOptions = {},
  id, // id for log
}

Keywords

swagger

FAQs

Package last updated on 05 Apr 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