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
allows parameter types to be case-insensitive #599
Conversation
The error message when failing to parse a spec is improved to include the name of the spec. fixes openshift#592
|
Changes Unknown when pulling 30e6ad3 on mhrivnak:lowercase-param-types into ** on openshift:master**. |
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.
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.
I know that we don't have great test coverage but this is a case where we could add one.
| @@ -196,7 +197,7 @@ func createUIFormItem(pd apb.ParameterDescriptor, paramIndex int) (interface{}, | |||
|
|
|||
| // getType transforms an apb parameter type to a JSON Schema type | |||
| func getType(paramType string) (schema.PrimitiveTypes, error) { | |||
| switch paramType { | |||
| switch strings.ToLower(paramType) { | |||
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.
Can we add a test case for this? util_test.go:371 should be the test cases to add to?
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.
Do you have something in mind that's more than what I already 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.
...
{"number", schema.NumberType},
{"NUMBER", schema.NumberType},
{"nil", schema.NullType},
...Add that to line 385ish in pkg/broker/util_test.go
|
@mhrivnak I am re-running the Gate test after the apb base fix that we merged yesterday. |
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.
Apparently, I cant read. sorry @mhrivnak
The error message when failing to parse a spec is improved to include the name
of the spec.
fixes #592