Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected initModel(scheme?: SecurityScheme): void {
this.schemeExists = false;
let schemeNames: string[] = [];
VisitorUtil.visitTree(this.context.ownerDocument(), new class extends CombinedVisitorAdapter {
public visitSecurityScheme(node: SecurityScheme): void {
schemeNames.push(node.getName());
}
}, TraverserDirection.down);
this.schemeNames = schemeNames;
if (this.context.ownerDocument().getDocumentType() == DocumentType.openapi2) {
this.model = {
schemeName: null,
description: null,
type: null,
name: null,
in: null,
flow: null,
authorizationUrl: null,
tokenUrl: null,