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

@ConfigProperty for enum with defaultValue flagged as error in VS code #612

Open
ggallen opened this issue Jun 4, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ggallen
Copy link

ggallen commented Jun 4, 2023

The following code generates an error in the VS Code UI:


    public static enum Profile {
        admin,
        user
    }

    @ConfigProperty(name = "agogos.cli-profile", defaultValue = "user")
    Profile profile;

Although there should be an automatic converter applied for enums, the following error is displayed in the UI:

'user' does not match the expected type of 'Profile'.microprofile-config(DEFAULT_VALUE_IS_WRONG_TYPE)
@datho7561 datho7561 added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants