Module: Middlewares/Swagger

Swagger Middleware

This middleware handles Swagger logic which means

  • It takes care of routing, and calls Swagger controllers (/api/controllers) for each route;
  • It validates both the request and the response, enforcing type checks on both ends;
  • It documents the API
  • It serves as a nice UI for manual testing
Source:

Methods

(static) factory(context) → {Promise.<Array>}

Initialize Swagger Middleware

Parameters:
Name Type Description
context Object

Current context

Source:
Returns:

Swagger Middleware functions list

Type
Promise.<Array>