diff --git a/docs/installation.md b/docs/installation.md index 5e82ae85..87810693 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -84,7 +84,7 @@ go run cmd/broker/main.go Now you can test the Broker using the **/v2/catalog** endpoint. ```bash -curl -H "X-Broker-API-Version: 2.14" localhost:8080/cluster/v2/catalog +curl -H "X-Broker-API-Version: 2.13" localhost:8080/cluster/v2/catalog ``` 5. Start the Controller: diff --git a/go.mod b/go.mod index 0defaa99..dc1b448c 100644 --- a/go.mod +++ b/go.mod @@ -22,9 +22,8 @@ require ( github.com/hashicorp/go-getter v1.4.1 github.com/hashicorp/go-multierror v1.1.0 github.com/huandu/xstrings v1.3.1 // indirect - github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect github.com/imdario/mergo v0.3.9 - github.com/kubernetes-sigs/go-open-service-broker-client v0.0.0-20200527163240-4406bd2cb6b8 + github.com/kubernetes-sigs/go-open-service-broker-client v0.0.0-20190909175253-906fa5f9c249 github.com/kubernetes-sigs/service-catalog v0.3.0 github.com/kyma-project/kyma v0.5.1-0.20200317154738-0bb20217c2cb github.com/kyma-project/rafter v0.0.0-20200413150919-1a89277ac3d8 diff --git a/go.sum b/go.sum index 5d6e741d..3417d74e 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,6 @@ github.com/SpectoLabs/hoverfly v1.1.5/go.mod h1:vRr0EmJr3iSlHUcW6M0dXNrJJlBngdKF github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/jsonschema v0.0.0-20200123075451-43663a393755 h1:+xHAcx6b5TS1DiY+StyK2CrNvD0nQ97G7w45x4ljJFs= github.com/alecthomas/jsonschema v0.0.0-20200123075451-43663a393755/go.mod h1:Juc2PrI3wtNfUwptSvAIeNx+HrETwHQs6nf+TkOJlOA= -github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921 h1:T3+cD5fYvuH36h7EZq+TDpm+d8a6FSD4pQsbmuGGQ8o= -github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -291,8 +289,6 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= @@ -328,9 +324,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kubernetes-sigs/go-open-service-broker-client v0.0.0-20190909175253-906fa5f9c249 h1:nQkW5khoOU4DC5ORWqvOlVh4oGxYPT6j6134cPIVm5Q= github.com/kubernetes-sigs/go-open-service-broker-client v0.0.0-20190909175253-906fa5f9c249/go.mod h1:s8wBC55/DEkNa3YMY1WLgpT33Ghpmw7v+waIxh15dYI= -github.com/kubernetes-sigs/go-open-service-broker-client v0.0.0-20200527163240-4406bd2cb6b8 h1:37JsHMAiuoyIFPyYUJ6jOTXznsmcDZec6tkPod+Tqto= -github.com/kubernetes-sigs/go-open-service-broker-client v0.0.0-20200527163240-4406bd2cb6b8/go.mod h1:5VFrdwwxqkzCF3pL7MY5Om1btQ6UsxO87DyjZFO0s5M= github.com/kubernetes-sigs/service-catalog v0.3.0 h1:uQaQcWnJf2qJ0ODaKHktOMN0daF+hi3inqrXzACyI1Y= github.com/kubernetes-sigs/service-catalog v0.3.0/go.mod h1:zRfgMd1T9HuXR24Qj4GOu/TGWABVGw62MGlyHVcpWnU= github.com/kyma-project/kyma v0.5.1-0.20200317154738-0bb20217c2cb h1:hxOth4M0qtQk7DmLkjosR1nwRdv5izgTtsBTZSbkIVU= diff --git a/internal/broker/catalog.go b/internal/broker/catalog.go index ee83bffb..02fd337e 100644 --- a/internal/broker/catalog.go +++ b/internal/broker/catalog.go @@ -104,8 +104,10 @@ func (f *addonToServiceConverter) mapToParametersSchemas(planSchemas map[interna } if schema, exists := planSchemas[internal.SchemaTypeBind]; exists { out.ServiceBinding = &osb.ServiceBindingSchema{ - Create: &osb.InputParametersSchema{ - Parameters: schema, + Create: &osb.RequestResponseSchema{ + InputParametersSchema: osb.InputParametersSchema{ + Parameters: schema, + }, }, } } diff --git a/internal/broker/ctx.go b/internal/broker/ctx.go index b1b7cccc..00981570 100644 --- a/internal/broker/ctx.go +++ b/internal/broker/ctx.go @@ -12,7 +12,7 @@ import ( type contextKey int const ( - osbAPIVersion = "2.14" + osbAPIVersion = "2.13" osbContextKey contextKey = 5001 ) diff --git a/internal/broker/dto.go b/internal/broker/dto.go index b6516717..e6288920 100644 --- a/internal/broker/dto.go +++ b/internal/broker/dto.go @@ -5,7 +5,7 @@ import ( "github.com/pkg/errors" ) -// DTOs for Open Service Broker v2.14 API +// DTOs for Open Service Broker v2.13 API type contextDTO struct { Platform string `json:"platform"` diff --git a/internal/broker/server.go b/internal/broker/server.go index b1ade433..9bb01db1 100644 --- a/internal/broker/server.go +++ b/internal/broker/server.go @@ -575,11 +575,11 @@ func (srv *Server) writeErrorResponse(w http.ResponseWriter, code int, errorMsg, func writeErrorResponse(w http.ResponseWriter, code int, errorMsg, desc string) { dto := struct { // Error is a machine readable info on an error. - // As of 2.14 Open Broker API spec it's NOT passed to entity querying the catalog. + // As of 2.13 Open Broker API spec it's NOT passed to entity querying the catalog. Error string `json:"error,optional"` // Desc is a meaningful error message explaining why the request failed. - // see: https://github.com/openservicebrokerapi/servicebroker/blob/v2.14/spec.md#broker-errors + // see: https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md#broker-errors Desc string `json:"description,optional"` }{}