Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public openEditor(content: any): void {
this.apiDef = new ApiDefinition();
this.apiDef.createdBy = 'user';
this.apiDef.createdOn = new Date();
this.apiDef.tags = [];
this.apiDef.description = '';
this.apiDef.id = 'api-1';
this.apiDef.spec = content;
this.apiDef.type = "OpenAPI30";
if (content && content.swagger && content.swagger == "2.0") {
this.apiDef.type = "OpenAPI20";
}
}
}