Skip to content

Commit

Permalink
fix(data-plane-selector-control-api): getAllDataPlaneInstances endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
timdah committed Jun 19, 2024
1 parent 8c47051 commit 8b44ec6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

import java.time.Clock;

import static jakarta.json.Json.createBuilderFactory;
import static org.eclipse.edc.connector.dataplane.selector.control.api.DataplaneSelectorControlApiExtension.NAME;
import static org.eclipse.edc.connector.dataplane.selector.spi.instance.DataPlaneInstance.DATAPLANE_INSTANCE_TYPE;
import static org.eclipse.edc.spi.constants.CoreConstants.JSON_LD;

@Extension(NAME)
public class DataplaneSelectorControlApiExtension implements ServiceExtension {
Expand Down Expand Up @@ -60,6 +62,7 @@ public void initialize(ServiceExtensionContext context) {
validatorRegistry.register(DATAPLANE_INSTANCE_TYPE, DataPlaneInstanceValidator.instance());

typeTransformerRegistry.register(new JsonObjectToDataPlaneInstanceTransformer());
typeTransformerRegistry.register(new JsonObjectFromDataPlaneInstanceTransformer(createBuilderFactory(Map.of()), typeManager.getMapper(JSON_LD)));

var controller = new DataplaneSelectorControlApiController(validatorRegistry, typeTransformerRegistry, dataPlaneSelectorService, clock);
webService.registerResource(ApiContext.CONTROL, controller);
Expand Down

0 comments on commit 8b44ec6

Please sign in to comment.