How to use the apicurio-data-models.Library.createNodePath 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 / main / info-section.component.ts View on Github external
public onProducesChange(newValue: string[]): void {
        console.info("[InfoSectionComponent] User changed the produces to: ", newValue);
        let command: ICommand = CommandFactory.createChangePropertyCommand(this.document, "produces", newValue);
        this.commandService.emit(command);
        let path = Library.createNodePath(this.document);
        path.appendSegment("produces", false);
        this.selectionService.select(path.toString());
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / path / operation / content.component.ts View on Github external
public addMediaType(mediaType: string): void {
        let command: ICommand = CommandFactory.createNewMediaTypeCommand(this.parent, mediaType);
        this.commandService.emit(command);
        let nodePath = Library.createNodePath(this.parent);
        nodePath.appendSegment("content", false);
        nodePath.appendSegment(mediaType, true);
        this.selectionService.select(nodePath.toString());
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / shared / media-type-row.component.ts View on Github external
public addExample(exampleData: any): void {
        let command: ICommand = CommandFactory.createAddExampleCommand(this.item,
            exampleData.value, exampleData.name, null, null);
        this.commandService.emit(command);
        let nodePath = Library.createNodePath(this.item);
        nodePath.appendSegment("examples", false);
        this.__selectionService.select(nodePath.toString());
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / forms / main / license-section.component.ts View on Github external
public setLicense(licenseInfo: any): void {
        let command: ICommand = CommandFactory.createChangeLicenseCommand(licenseInfo.name, licenseInfo.url);
        this.commandService.emit(command);
        let path = Library.createNodePath(this.document);
        path.appendSegment("info", false);
        path.appendSegment("license", false);
        this.selectionService.select(path.toString());
    }
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 / _util / model.util.ts View on Github external
public static nodeToPath(node: Node): string {
        if (node) {
            return Library.createNodePath(node).toString();
        } else {
            return null;
        }
    }