public void executeGetApiWithoutParameters()

in src/main/java/platform/qa/steps/RestApiStepDefinitions.java [140:161]


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

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

        var responseObj = new RestApiClient(registryConfig.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);
    }