Skip to content
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

Merged

Conversation

singrob
Copy link
Contributor

@singrob singrob commented Aug 9, 2019

Added JsonIgnoreProperties annotation to DDI Api model classes to ignore unknown properties on deserialisation

Signed-off-by: Robert Sing Robert.Sing@bosch-si.com

Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
@schabdo schabdo added this to the 0.3.0M6 milestone Aug 9, 2019
Copy link
Contributor

@laverman laverman left a 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 👍

Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
@singrob singrob marked this pull request as ready for review August 12, 2019 14:19
@@ -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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Document this public constructor by adding an explicit description. rule

@hawkbit-bot
Copy link

SonarQube analysis reported 1 issue

  • MINOR 1 minor

Watch the comments in this conversation to review them.

@singrob singrob force-pushed the feature-improve_robustness_of_api_models branch from 3bfdb4a to 170d21e Compare August 22, 2019 12:50
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
@singrob singrob force-pushed the feature-improve_robustness_of_api_models branch from 170d21e to 9e430fa Compare August 22, 2019 12:53
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
@stefbehl stefbehl self-requested a review August 27, 2019 07:23
Copy link
Contributor

@stefbehl stefbehl left a 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.

@stefbehl stefbehl merged commit 9f76f6c into eclipse:master Aug 27, 2019
@stefbehl stefbehl deleted the feature-improve_robustness_of_api_models branch August 27, 2019 07:27
@schabdo schabdo changed the title added missing JsonIgnoreProperties annotation for DDI Api model classes Ignore unknown properties on deserialisation of DDI-API model classes Jan 16, 2020
AmmarBikic pushed a commit to bosch-io/hawkbit that referenced this pull request Oct 2, 2020
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants