Usage (OpenAPI):
import { OpenAPI, BasicAuthUtil, BearerUtil, GroupAuthUtil} from '@novice1/api-doc-generator';const basicAuth = new BasicAuthUtil('basicAuthName');const bearerAuth = new BearerUtil('bearerName');const groupAuth = new GroupAuthUtil([ basicAuth, bearerAuth]);// add it to OpenAPI security schemesconst openapi = new OpenAPI();openapi.addSecuritySchemes(groupAuth); Copy
import { OpenAPI, BasicAuthUtil, BearerUtil, GroupAuthUtil} from '@novice1/api-doc-generator';const basicAuth = new BasicAuthUtil('basicAuthName');const bearerAuth = new BearerUtil('bearerName');const groupAuth = new GroupAuthUtil([ basicAuth, bearerAuth]);// add it to OpenAPI security schemesconst openapi = new OpenAPI();openapi.addSecuritySchemes(groupAuth);
Usage (Postman):
import { Postman, BasicAuthUtil, BearerUtil, GroupAuthUtil} from '@novice1/api-doc-generator';const basicAuth = new BasicAuthUtil('basicAuthName');const bearerAuth = new BearerUtil('bearerName');const groupAuth = new GroupAuthUtil([ basicAuth, bearerAuth]);// add it to Postman global authenticationconst postman = new Postman();postman.setAuth(groupAuth); Copy
import { Postman, BasicAuthUtil, BearerUtil, GroupAuthUtil} from '@novice1/api-doc-generator';const basicAuth = new BasicAuthUtil('basicAuthName');const bearerAuth = new BearerUtil('bearerName');const groupAuth = new GroupAuthUtil([ basicAuth, bearerAuth]);// add it to Postman global authenticationconst postman = new Postman();postman.setAuth(groupAuth);
Protected
Usage (OpenAPI):
Usage (Postman):