Usage:
import routing from '@novice1/routing';import { OpenAPI, Postman, BasicAuthUtil} from '@novice1/api-doc-generator';const basicAuth = new BasicAuthUtil('basicAuth'); // add it to OpenAPI security schemesconst openapi = new OpenAPI();openapi.addSecuritySchemes(basicAuth);// add it to Postman global authenticationconst postman = new Postman();postman.setAuth(basicAuth);// routerconst router = routing() .get({ path: '/something', auth: true, parameters: { // add security requirements for this route security: basicAuth } }, function (req, res) { // do something ... }); Copy
import routing from '@novice1/routing';import { OpenAPI, Postman, BasicAuthUtil} from '@novice1/api-doc-generator';const basicAuth = new BasicAuthUtil('basicAuth'); // add it to OpenAPI security schemesconst openapi = new OpenAPI();openapi.addSecuritySchemes(basicAuth);// add it to Postman global authenticationconst postman = new Postman();postman.setAuth(basicAuth);// routerconst router = routing() .get({ path: '/something', auth: true, parameters: { // add security requirements for this route security: basicAuth } }, function (req, res) { // do something ... });
Protected
Optional
A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
Usage: