-
Notifications
You must be signed in to change notification settings - Fork 76
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
Fix parameter_sensitivities checking the values instead of the keys #357
base: main
Are you sure you want to change the base?
Fix parameter_sensitivities checking the values instead of the keys #357
Conversation
Hold on with this... I do still see a case where NiFi returns with It seems to happen when calling the ValueError: Invalid values in EDIT: I've noticed something wrong with the Swagger API docs for the The docs states that the reply is a
However, the This causes the parsing of the reply to fail. |
… what NiFi returns when the value is not yet set
I had to add NiFI does return On Swagger 3.0, the following should be possible, but when running the codegen here, it doesn't update the models.
I'm not sure how to proceed here. |
I've created a ticket at the NiFi Jira here: https://issues.apache.org/jira/browse/NIFI-13419 |
@@ -101,10 +101,10 @@ class {{classname}}(object): | |||
) | |||
{{/isListContainer}} | |||
{{#isMapContainer}} | |||
if not set({{{name}}}.keys()).issubset(set(allowed_values)): | |||
if not set({{{name}}}.values()).issubset(set(allowed_values)): |
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.
Could this have an or None
to satisfy the response from NiFi without breaking the codebase?
+1 |
This PR fixes creation of ParameterContexts.
The swagger-codegen package adds a validation on the keys instead of the values. See swagger-api/swagger-codegen#9138.
Luckily, the default templates from the
swagger-codegen
package are overridden in this repo, so we can make the change here. Looking at the age of the issue, it doesn't seem they are interested in changing their default templates.