Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ruleVersionName(docType: DocumentType): string {
if (docType == DocumentType.openapi2) {
return "OpenAPI 2.0";
}
if (docType == DocumentType.openapi3) {
return "OpenAPI 3.x";
}
if (docType == DocumentType.asyncapi2) {
return "AsyncAPI 2.x";
}
}
public isOAI30(): boolean {
return this.document.getDocumentType() === DocumentType.openapi3;
}
public is3x(): boolean {
return this.context.ownerDocument().getDocumentType() == DocumentType.openapi3;
}