How to use the apicurio-data-models.CommandFactory.createNewServerCommand 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 / servers-section.component.ts View on Github external
public addServer(data: ServerData): void {
        console.info("[ServersSectionComponent] Adding a server: %s", data.url);

        let newServer: Oas30Server = this.parent.createServer();

        this.copyServerToModel(data, newServer);

        let command: ICommand = CommandFactory.createNewServerCommand(this.parent, newServer);
        this.commandService.emit(command);
    }