Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Update Instance / Create Binding Service Schemas #238

Merged
merged 2 commits into from
Sep 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions helpers/services/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ type PlanSchemas struct {
Create struct {
Parameters map[string]interface{} `json:"parameters"`
} `json:"create"`
Update struct {
Parameters map[string]interface{} `json:"parameters"`
} `json:"update"`
} `json:"service_instance"`
ServiceBinding struct {
Create struct {
Parameters map[string]interface{} `json:"parameters"`
} `json:"create"`
} `json:"service_binding"`
}

type ServiceBroker struct {
Expand Down
16 changes: 15 additions & 1 deletion services/service_broker_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ var _ = ServicesDescribe("Service Broker Lifecycle", func() {

var emptySchemas PlanSchemas
emptySchemas.ServiceInstance.Create.Parameters = map[string]interface{}{}
emptySchemas.ServiceInstance.Update.Parameters = map[string]interface{}{}
emptySchemas.ServiceBinding.Create.Parameters = map[string]interface{}{}

Expect(plansResponse.Resources[0].Entity.Schemas).To(Equal(emptySchemas))

Expand All @@ -80,7 +82,19 @@ var _ = ServicesDescribe("Service Broker Lifecycle", func() {

var basicSchema PlanSchemas
basicSchema.ServiceInstance.Create.Parameters = map[string]interface{}{
"$schema": "http://json-schema.org/draft-04/schema#", "type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "create instance schema",
}
basicSchema.ServiceInstance.Update.Parameters = map[string]interface{}{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "update instance schema",
}
basicSchema.ServiceBinding.Create.Parameters = map[string]interface{}{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "create binding schema",
}
broker.SyncPlans[0].Schemas = basicSchema

Expand Down