Skip to content

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

@ggallen

Description

@ggallen

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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions