Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Exclude unexported fields from JSON schema #3191

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

ryantse
Copy link
Contributor

@ryantse ryantse commented May 28, 2021

Description

Fixes #3190 by ignoring fields contained in structs with JSON name "-" from the generated JSON schema.

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?

Ignore fields contained in structs with JSON name "-" from the generated JSON schema.
@ryantse ryantse force-pushed the fix-generator-json branch from a775d33 to a0072a7 Compare May 28, 2021 19:54
@ryantse ryantse marked this pull request as ready for review May 28, 2021 19:54
@ryantse
Copy link
Contributor Author

ryantse commented May 31, 2021

@oscerd / @rohanKanojia: Can we get this merged?

@rohanKanojia
Copy link
Member

I think it'll get merged soon. Let's wait for Marc's approval.

@ryantse
Copy link
Contributor Author

ryantse commented Jun 1, 2021

@manusa: Could you take a look at this patch? Thanks in advance.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2021

Kudos, SonarCloud Quality Gate passed!

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@ryantse
Copy link
Contributor Author

ryantse commented Jun 2, 2021

@manusa / @rohanKanojia: Sorry to keep pinging, but I am waiting for this to merge to use internally for my project. Any chance we can get this merged ASAP?

@manusa
Copy link
Member

manusa commented Jun 2, 2021

Hi, we are going to run the extensions generator to see if there's any direct impact on our currently generated classes.

@rohanKanojia
Copy link
Member

I checked and this change doesn't affect our current schema. It's safe to merge. I've created #3203 to add extension generators to generateModel.sh

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit 0bc87c2 into fabric8io:master Jun 2, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRD Schema Generator - Ignore Non-Exported Fields
5 participants