-
Notifications
You must be signed in to change notification settings - Fork 53
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
constructors of classes derived from VersionCreateRequest and VersionLoadRequest broken #150
Comments
This is quite possibly a problem in the swagger definition that spring exports for thingsboard. I have not seen anything that explicitly speaks against it, but this doesn't seem correct:
Is it okay to have the branch, type, and versionName properties duplicated in the parent and child classes? At least the swagger api spec doesn't have it like that in their examples. |
a random find, SmsTwoFaAccountConfig also has this problem with the use_by_default parameter, which is probably much harder to actually notice is not working |
AlarmNotificationRuleTriggerConfig as well. It's probably a good idea to just go through every mention of "allOf" in the swagger definition json and check the constructors for this pattern |
Perhaps you are using an older version of swagger-api/swagger-codegen#11968 which at least now passes all the arguments to the superclass constructor and that should fix this issue |
The commit 80b249b introduced this change to the end of the constructor of SingleEntityVersionCreateRequest and ComplexVersionCreateRequest:
This is at the end of the constructors of these classes. The first thing the superclass constructor does here is to set _branch, _type, and _version_name to None, and since these are not in args or in kwargs, they don't get set to the values they are meant to be (this is what the subclass constructor did just a few lines earlier).
The same problem is also in the VersionLoadRequest superclass and its derived classes.
The text was updated successfully, but these errors were encountered: