spring-cloud-open-service-broker
spring-cloud-open-service-broker copied to clipboard
Possibility to extend broker responses
In some cases we need to extend OSB specification and add extra fields to responses from service broker. For example it is not possible right now write something like this:
public class MyCreateServiceInstanceResponse extends CreateServiceInstanceResponse {
private final String myCustomField2;
...
}
and after that use this reponse in ServiceInstanceService:
public class MyServiceInstanceService implements ServiceInstanceService {
...
@Override
public Mono<MyCreateServiceInstanceResponse> createServiceInstance(CreateServiceInstanceRequest request) {
...
}
Java compiler throw exception like this in that case:
java: my.package.MyServiceInstanceService is not abstract and does not override abstract method createServiceInstance(org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceRequest) in org.springframework.cloud.servicebroker.service.ServiceInstanceService
This changes are intended to allow this to be done.
I started reviewing this, and at first glance, it will cause some challenges with regard to generic types in method parameters and return types. I'll see where I can get with it, but my preference is to avoid significantly disrupting the API.