public void executeGetExternalRegistryApiWithoutParameters()

in src/main/java/platform/qa/steps/RestApiStepDefinitions.java [164:189]


    public void executeGetExternalRegistryApiWithoutParameters(@NonNull String userName,
                                                               @NonNull String path,
                                                               @NonNull String registryName) {
        var context = convertToRequestsContext(testContext.getScenarioContext().getContext(API_RESULTS));
        var pathWithIds = getRequestPathWithIds(path, context);

        if (pathWithIds.contains("{")) return;

        masterConfig.setNamespaces(singletonList(registryName));
        var externalRegConfig = masterConfig.getRegistryConfig(registryName);

        var responseObj = new RestApiClient(externalRegConfig.getDataFactory(userName))
                .get(pathWithIds)
                .then()
                .extract()
                .response()
                .jsonPath()
                .get("");
        var result = convertToListMap(responseObj);

        var pathContext = pathWithIds.contains("/") ? pathWithIds.substring(0, path.lastIndexOf("/")) : pathWithIds;
        var request = new Request(pathContext, Collections.emptyMap(), result, new Timestamp(currentTimeMillis()));
        context.add(request);

        testContext.getScenarioContext().setContext(API_RESULTS, context);
    }