private async onRouteChange()

in src/components/operations/operation-details/ko/runtime/operation-details.ts [179:210]


    private async onRouteChange(): Promise<void> {
        const apiName = this.routeHelper.getApiName();
        const operationName = this.routeHelper.getOperationName();
        const graphName = this.routeHelper.getGraphName();
        const definitionName = this.routeHelper.getDefinitionName();

        if (definitionName) {
            this.scrollToDefinition();
        } else if (this.enableScrollTo && (operationName || graphName)) {
            this.scrollToOperation();
        }

        if (apiName && apiName !== this.selectedApiName()) {
            this.selectedApiName(apiName);
            await this.loadApi(apiName);
        }

        if (apiName === this.selectedApiName() && operationName === this.selectedOperationName()) {
            return;
        }

        if (!operationName) {
            this.selectedOperationName(null);
            this.operation(null);
            return;
        }

        if (apiName && operationName) {
            this.selectedOperationName(operationName);
            await this.loadOperation(apiName, operationName);
        }
    }