Socket
Socket
Sign inDemoInstall

@sigodenjs/openapize

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sigodenjs/openapize

Mount rest api depends on OpenAPI doc file for express app.


Version published
Maintainers
1
Created
Source

Openapize

Mount rest api depends on OpenAPI doc file for express app.

Getting started

const openapize = require("@sigodenjs/openapize");
const express = require("express");
const bodyParser = require("body-parser");

const app = express();

app.use(bodyParser.json());

openapize(app, {
  // openapi file
  api: require("./fixtures/defs/pets.json"),
  // handler funcs
  handlers: require("./handlers"),
  // security middleware funcs
  security: require("./security"),
  // hook to modify api
  mapAPI: function(api) {
    return api;
  },
  // no handler for api
  noHandlerAPI: function(api) {

  }
});

Limit

  • ParameterObject does not support content
  • RequestBodyObject.content has at most one MeidaObject
  • OperationObject.security has at most one securitySchemes

Licese

Copyright (c) 2018 sigoden

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 12 Nov 2019

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