-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
[config] Changed 'ConfigDescriptionParameterDTO' field serialization 'defaultValue' -> 'default' #2383
[config] Changed 'ConfigDescriptionParameterDTO' field serialization 'defaultValue' -> 'default' #2383
Conversation
…ault' Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
@@ -29,6 +30,7 @@ | |||
public class ConfigDescriptionParameterDTO { | |||
|
|||
public String context; | |||
@SerializedName(value = "default") |
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.
As mentioned in #2376 (comment) we can use the following syntax to allow both names for parsing.
@SerializedName(value = "default") | |
@SerializedName(value = "default", alternate = "defaultValue") |
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.
Sounds like the safer option in any case. Shall we use this one? What is your preference?
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'd prefer adding the fallback. We are backwards compatible against parsing then and can remove it after 3.1 has been released.
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
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, thank you!
I'll wait with merging it until after the 3.1.0.M5 build - just to make sure that we do not introduce any regression that we might have overlooked.
…alue' -> 'default' (#1077) Related to openhab/openhab-core#2383. Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/solar-plant-with-battery-widget/130502/8 |
…'defaultValue' -> 'default' (openhab#2383) * Changed ConfigParameterDTO field serialization 'defaultValue' -> 'default' Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de> GitOrigin-RevId: 585e870
ConfigDescriptionParameterDTO
field serialization: "defaultValue" -> "default"ConfigDescriptionDTOMapper
for field "unit"ConfigDescriptionDTOMapper
,ConfigDescriptionResource
andAutomationIntegrationJsonTest
Supersedes #2376
Related to #2148
Signed-off-by: Christoph Weitkamp github@christophweitkamp.de