How to use the apicurio-data-models.CommandFactory.createAddSecurityRequirementCommand function in apicurio-data-models

To help you get started, we’ve selected a few apicurio-data-models examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / shared / security-requirements-section.component.ts View on Github external
public addSecurityRequirement(event: SecurityRequirementEditorEvent): void {
        console.info("[SecurityRequirementsSectionComponent] Adding security requirement: ", event);
        let requirement: OasSecurityRequirement = this.parent.createSecurityRequirement();
        Library.readNode(event.data, requirement);
        let command: ICommand = CommandFactory.createAddSecurityRequirementCommand(this.parent, requirement);
        this.commandService.emit(command);
    }