Skip to content

Commit

Permalink
fix(exception-handling): [eclipse-tractusx#841] fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed Aug 2, 2024
1 parent a5453f9 commit 13a23e6
Showing 1 changed file with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,23 @@ public static MappingBuilder postDiscoveryFinder200() {

public static MappingBuilder postDiscoveryFinder200(final String... discoveryFinderUrls) {
return post(urlPathEqualTo(DISCOVERY_FINDER_PATH)).willReturn(
responseWithStatus(STATUS_CODE_OK).withBody(discoveryFinderResponse(edcUrls)));
responseWithStatus(STATUS_CODE_OK).withBody(discoveryFinderResponse(discoveryFinderUrls)));
}

public static String discoveryFinderResponse(final String... discoveryFinderUrls) {

final String endpoints = Arrays.stream(discoveryFinderUrls)
.map(endpointAddress -> {
final String resourceId = UUID.randomUUID().toString();
return """
{
"type": "bpn",
"description": "Service to discover EDC to a particular BPN",
"endpointAddress": "%s",
"documentation": "http://.../swagger/index.html",
"resourceId": "%s"
}
""".formatted(endpointAddress, resourceId);
})
.collect(Collectors.joining(","));
final String endpoints = Arrays.stream(discoveryFinderUrls).map(endpointAddress -> {
final String resourceId = UUID.randomUUID().toString();
return """
{
"type": "bpn",
"description": "Service to discover EDC to a particular BPN",
"endpointAddress": "%s",
"documentation": "http://.../swagger/index.html",
"resourceId": "%s"
}
""".formatted(endpointAddress, resourceId);
}).collect(Collectors.joining(","));

return """
{
Expand Down

0 comments on commit 13a23e6

Please sign in to comment.