Socket
Socket
Sign inDemoInstall

@imnotjames/koa-openapi-router

Package Overview
Dependencies
78
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @imnotjames/koa-openapi-router

An OpenAPI Router for Koa


Version published
Weekly downloads
2
Maintainers
1
Install size
6.61 MB
Created
Weekly downloads
 

Readme

Source

Koa OpenAPI Router

Creates a Koa Router from an OpenAPI document via the OpenAPI Framework Package.

This sets up the routes, body parsing, request validation, response validation, security, and default parameters.

Installation

Install using npm or [yarn][yarn]

# npm
npm install @imnotjames/koa-openapi-router

# yarn
yarn add @imnotjames/koa-openapi-router

Getting Started

WIP

Start with an OpenAPI Document

Create Operations - similar to standard koa middleware

Define the application.

const app = new Koa();

const router = getRouter({ apiDoc, operations });

app
  .use(router.routes())
  .use(router.allowedMethods());

app.listen(8080);

Keywords

FAQs

Last updated on 09 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc