in src/main/java/platform/qa/steps/RestApiStepDefinitions.java [112:137]
public void executeGetExternalRegistryApiWithParameters(@NonNull String userName,
@NonNull String path,
@NonNull String registryName,
@NonNull Map<String, String> queryParams) {
var context = convertToRequestsContext(testContext.getScenarioContext().getContext(API_RESULTS));
var parametersWithIds = getQueryParamsWithIds(queryParams, context);
if (hasCurlyBracketsInQueryParameters(parametersWithIds)) {
log.info("parameters and ids don't match, GET request {} couldn't be send", path);
return;
}
masterConfig.setNamespaces(singletonList(registryName));
var externalRegConfig = masterConfig.getRegistryConfig(registryName);
var result = new RestApiClient(externalRegConfig.getDataFactory(userName))
.sendGetWithParams(path, parametersWithIds)
.extract()
.response()
.jsonPath()
.getList("", Map.class);
var request = new Request(path, queryParams, result, new Timestamp(currentTimeMillis()));
context.add(request);
testContext.getScenarioContext().setContext(API_RESULTS, context);
}