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

Override items from super classes when generating config documentation #41979

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

radcortez
Copy link
Member

@radcortez radcortez commented Jul 18, 2024

The fix could be better by using a Map instead of a dumb List search, but we don't want to change the code too much due to some significant refactorings coming.

Copy link

quarkus-bot bot commented Jul 18, 2024

/cc @brunobat (opentelemetry)

This comment has been minimized.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I added two small non-blocking comments. Feel free to either edit the commit or merge it as is :).

import io.smallrye.config.WithDefault;
import io.smallrye.config.WithName;

@ConfigGroup
Copy link
Member

Choose a reason for hiding this comment

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

I know it's not mandatory but I would say it's a good practice to keep the annotation, given the annotation processor is annotation driven.
They get discovered anyway when analyzing the config but this makes it discovered right away by the AP.

Copy link
Member Author

@radcortez radcortez Jul 22, 2024

Choose a reason for hiding this comment

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

When this annotation is present in a super class relative to the mapping class, we do generate duplicate entries of the configuration, because we handle @ConfigGroup as a nested element and not as an inherited element.

We could also fix that in the code, but I think that super classes are not config groups, so it is a bit misleading to add that annotation.

…enerate_doc/ConfigDocItemFinder.java

Co-authored-by: Guillaume Smet <guillaume.smet@gmail.com>
Copy link

quarkus-bot bot commented Jul 22, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 4a88da1.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@radcortez radcortez merged commit 65e7336 into quarkusio:main Jul 22, 2024
52 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 22, 2024
@gsmet gsmet modified the milestones: 3.14 - main, 3.13.0 Jul 23, 2024
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.

Config docs generation error when inheritance is used
3 participants