diff --git a/extensions/data-plane-selector/data-plane-selector-control-api/src/main/java/org/eclipse/edc/connector/dataplane/selector/control/api/DataplaneSelectorControlApiExtension.java b/extensions/data-plane-selector/data-plane-selector-control-api/src/main/java/org/eclipse/edc/connector/dataplane/selector/control/api/DataplaneSelectorControlApiExtension.java index f53450af5bb..48cee775ca1 100644 --- a/extensions/data-plane-selector/data-plane-selector-control-api/src/main/java/org/eclipse/edc/connector/dataplane/selector/control/api/DataplaneSelectorControlApiExtension.java +++ b/extensions/data-plane-selector/data-plane-selector-control-api/src/main/java/org/eclipse/edc/connector/dataplane/selector/control/api/DataplaneSelectorControlApiExtension.java @@ -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 { @@ -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);