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
Ignore unknown properties on deserialisation of DDI-API model classes #881
Ignore unknown properties on deserialisation of DDI-API model classes #881
Conversation
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
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.
Thanks for adding this in order to make our API more robust 👍
.../hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionFeedbackTest.java
Show resolved
Hide resolved
...t/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionHistoryTest.java
Show resolved
Hide resolved
...st/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHashTest.java
Show resolved
Hide resolved
...t-rest/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactTest.java
Show resolved
Hide resolved
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
@@ -25,7 +28,8 @@ | |||
@NotNull | |||
private final String value; | |||
|
|||
public DdiMetadata(final String key, final String value) { | |||
@JsonCreator | |||
public DdiMetadata(@JsonProperty("key") final String key, @JsonProperty("value")final String value) { |
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.
...api/src/test/java/org/eclipse/hawkbit/ddi/json/model/JsonIgnorePropertiesAnnotationTest.java
Show resolved
Hide resolved
...bit-rest/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiStatusTest.java
Outdated
Show resolved
Hide resolved
.../hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionFeedbackTest.java
Outdated
Show resolved
Hide resolved
3bfdb4a
to
170d21e
Compare
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
170d21e
to
9e430fa
Compare
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
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.
Looks good. Thanks Robert.
…es (eclipse#881) * added missing JsonIgnoreProperties annotation for DDI model classes * added Copyright Headers & serialization tests for all Ddi model classes * fixed typo in test * fixed review findings * added missing test descriptions Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
Added JsonIgnoreProperties annotation to DDI Api model classes to ignore unknown properties on deserialisation
Signed-off-by: Robert Sing Robert.Sing@bosch-si.com