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({}) });
Optional
Usage: