How to use the apicurio-data-models.NodePath 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 / _services / selection.service.ts View on Github external
public select(path: string): void {
        // Clear previous selection
        this.clearCurrentSelection();

        // Select the new thing
        let doc: Document = this.documentService.currentDocument();
        let visitor: MainSelectionVisitor = new MainSelectionVisitor();
        let npath: NodePath = new NodePath(path);
        npath.resolveWithVisitor(doc, visitor);

        // Fire an event with the new selection path
        this._selectionTopic.send(path);
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _services / selection.service.ts View on Github external
private clearCurrentSelection(): void {
        let previousSelection: string = this.currentSelection();
        if (previousSelection) {
            let doc: Document = this.documentService.currentDocument();
            if (doc) {
                let visitor: MainSelectionVisitor = new MainSelectionVisitor(true);
                let npath: NodePath = new NodePath(previousSelection);
                npath.resolveWithVisitor(doc, visitor);
            }
        }
    }
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
navigateToDefinition(): void {
        let path: NodePath = new NodePath(this.responseDefPathPrefix());
        path.appendSegment(this.definitionName(), true);
        this.selectionService.select(path.toString());
    }