-
Notifications
You must be signed in to change notification settings - Fork 99
Enhance plan schemas #665
Enhance plan schemas #665
Conversation
The cosmos DB (Mongo) provides a schema with 'readRegions':
The
I'd like to add missing items, but I don't know what should be added there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use the schemas.EnabledDisabledValues()
in the following files:
- pkg/services/rediscache/plan_schemas.go
- pkg/services/storage/plan_schemas.go
@@ -82,7 +82,11 @@ func generateTopicBindingParamsSchema() service.InputParametersSchema { | |||
Description: "Specifies whether to create a subscription in the topic." + | |||
" Valid values are [\"yes\", \"no\"]. ", | |||
AllowedValues: []string{"yes", "no"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can delete AllowedValues field and adjust the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
pkg/service/schema.go
Outdated
@@ -112,6 +112,7 @@ type StringPropertySchema struct { | |||
AllowedPattern string `json:"pattern,omitempty"` // nolint: lll | |||
CustomPropertyValidator CustomStringPropertyValidator `json:"-"` | |||
DefaultValue string `json:"default,omitempty"` // nolint: lll | |||
OneOf []EnumValue `json:"oneOf,omitempty"` //nolint: lll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add space to the //nolint
comment to align it to the other occurences.
Are the read regions the same set to locations @norshtein? |
No, they are not the same. Allowed values of Cosmos read region can be found here. It is slightly different from location values. |
1fae846
to
a38411b
Compare
I've added read locations to the Cosmos DB Mongo schema |
a38411b
to
5061bcf
Compare
I prefer to keep previous |
I think we don't need to consider backward compatibility in this case. The parsers which leverage React or Angular won't be impacted. On the contrary, with both |
React jsonschema (https://github.com/mozilla-services/react-jsonschema-form) does not work with both. The 'oneOf' field works very nice |
Oh, good to know. Then the old should be removed for sure. @piotrmiskiewicz thanks a lot for nice contribution! I’ll merge it as the CI also passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
When do you plan to do a new release? |
Soon. We are going to release after passing the release pipeline and a quick e2e test :). |
This PR enhance plan schemas by adding titles to enum values.
Related to #651