Abstract
Usage:
import routing from '@novice1/routing';import { OpenAPI, BearerUtil} from '@novice1/api-doc-generator';/** * BearerUtil extends BaseAuthUtil extends BaseContextAuthUtil */const bearerAuth = new BearerUtil('bearerName');const openapi = new OpenAPI();// add it to the security schemesopenapi.addSecuritySchemes(bearerAuth);const router = routing() .get({ path: '/admin', auth: true, parameters: { // add security requirement for this route security: bearerAuth } }, function (req, res) { res.json({}) }); Copy
import routing from '@novice1/routing';import { OpenAPI, BearerUtil} from '@novice1/api-doc-generator';/** * BearerUtil extends BaseAuthUtil extends BaseContextAuthUtil */const bearerAuth = new BearerUtil('bearerName');const openapi = new OpenAPI();// add it to the security schemesopenapi.addSecuritySchemes(bearerAuth);const router = routing() .get({ path: '/admin', auth: true, parameters: { // add security requirement for this route security: bearerAuth } }, function (req, res) { res.json({}) });
Protected
Optional
A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
Usage: