How to use the apicurio-data-models.CommandFactory.createChangePropertyCommand 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 / path / operation / info-section.component.ts View on Github external
public changeOperationId(newOperationId: string): void {
        console.info("[InfoSectionComponent] User changed the operationId.");
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.operation, "operationId", newOperationId);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / operation / info-section.component.ts View on Github external
public onProducesChange(newValue: string[]): void {
        console.info("[InfoSectionComponent] User changed the produces to: ", newValue);
        if (newValue && newValue.length === 0) {
            newValue = null;
        }
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.operation, "produces", newValue);
        this.commandService.emit(command);
        this._initConsumesProduces();
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / operation / info-section.component.ts View on Github external
public onConsumesChange(newValue: string[]): void {
        console.info("[InfoSectionComponent] User changed the consumes to: ", newValue);
        if (newValue && newValue.length === 0) {
            newValue = null;
        }
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.operation, "consumes", newValue);
        this.commandService.emit(command);
        this._initConsumesProduces();
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / definition / example-section.component.ts View on Github external
public onExampleChange(newExample: string): void {
        console.info("[DefinitionExampleSectionComponent] User changed the data type example.");
        let newValue: any = newExample;
        if (StringUtils.isJSON(newValue)) {
            try {
                newValue = JSON.parse(newValue);
            } catch (e) {
                console.info("[DefinitionExampleSectionComponent] Failed to parse example: ", e);
            }
        }
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.definition,"example", newValue);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / operation / info-section.component.ts View on Github external
public changeSummary(newSummary: string): void {
        console.info("[InfoSectionComponent] User changed the summary.");
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.operation, "summary", newSummary);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / info-section.component.ts View on Github external
public changeSummary(newSummary: string): void {
        console.info("[InfoSectionComponent] User changed the summary.");
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.path, "summary", newSummary);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / operation / info-section.component.ts View on Github external
public changeTags(newTags: string[]): void {
        console.info("[InfoSectionComponent] User changed the tags.");
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.operation, "tags", newTags);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / main / security-scheme-row.component.ts View on Github external
public setDescription(description: string): void {
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.scheme, "description", description);
        this.commandService.emit(command);
        let path = Library.createNodePath(this.scheme);
        path.appendSegment("description", false);
        this.selectionService.select(path.toString());
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / operation / response-tab-30.component.ts View on Github external
public setDescription(description: string): void {
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.response, "description", description);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / main / contact-section.component.ts View on Github external
public changeContactURL(newValue: string): void {
        if (!newValue) { newValue = null; }
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.contact(), "url", newValue);
        this.commandService.emit(command);
    }