How to use the apicurio-data-models.CommandFactory.createChangeTitleCommand 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 / title-bar.component.ts View on Github external
public save(): void {
        this.editMode = false;
        console.info("[EditorTitleBarComponent] User changed the title to: " + this.newTitle);
        let command: ICommand = CommandFactory.createChangeTitleCommand(this.newTitle);
        this.commandService.emit(command);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / copy / copy.page.ts View on Github external
public cloneApi(): string {
        let sourceDoc: Document = this.document;
        CommandFactory.createChangeTitleCommand(this.title).execute(sourceDoc);
        if (sourceDoc.getDocumentType() == DocumentType.openapi2 && this.convertApi) {
            console.info("[CopyPageComponent] Converting API from 2.0 to 3.0.x!");
            sourceDoc = this.transformDocument(sourceDoc as Oas20Document);
        }
        let sourceJs: any = Library.writeNode(sourceDoc);
        let sourceStr: string = JSON.stringify(sourceJs);
        let sourceB64: string = Base64.encode(sourceStr);
        return sourceB64;
    }