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

Preserve unknown fields in presence of JsonAnyGetter or JsonAnySetter #3691

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

andreaTP
Copy link
Member

@andreaTP andreaTP commented Dec 24, 2021

Description

This builds on top of #3684 I'll rebase on master as soon as the other gets merged.
Fix #3683

In presence of a class containing a "catch everything" field annotated with JsonAnyGetter or JsonAnySetter, we should produce x-kubernetes-preserve-unknown-fields as well.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@centos-ci
Copy link

Can one of the admins verify this patch?

@andreaTP
Copy link
Member Author

cc. @metacosm

@andreaTP andreaTP changed the title Preserve unknown any Preserve unknown fields in presence of JsonAnyGetter or JsonAnySetter Dec 24, 2021
@manusa manusa added this to the 5.12.0 milestone Dec 24, 2021
@metacosm metacosm self-requested a review December 24, 2021 11:21
@sonarcloud
Copy link

sonarcloud bot commented Jan 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

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

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRD generator doesn't handle correctly JsonNode type
5 participants