Socket
Book a DemoInstallSign in
Socket

@imnotjames/koa-openapi-router

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imnotjames/koa-openapi-router

An OpenAPI Router for Koa

0.0.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
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

openapi

FAQs

Package last updated on 09 Aug 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.