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

Validate defaultValue of @ConfigProperty #90

Closed
angelozerr opened this issue Oct 1, 2020 · 1 comment · Fixed by #155
Closed

Validate defaultValue of @ConfigProperty #90

angelozerr opened this issue Oct 1, 2020 · 1 comment · Fixed by #155
Assignees
Labels
enhancement New feature or request java-files Features supported in Java files validation
Milestone

Comments

@angelozerr
Copy link

angelozerr commented Oct 1, 2020

Validate defaultValue of @ConfigProperty according the field type.

Given this sample:

@ConfigProperty(name = "greeting.message" defaultValue="XXXXXXXXXXXXXXX")
Integer intValue;

We should have XXXXXXXXXXXXXXX which is highlighted as error because the expected value is an Integer.

This feature must be implemented on JDT LS side with the com.redhat.microprofile.jdt.core.javaFeatureParticipants diagnostics extension point.

As we have validation for value type in MicroProfile LS for application.properties, it should be good to move all possible validator features in the org.eclipse.lsp4mp.microprofile.commons package.

@angelozerr angelozerr added enhancement New feature or request java-files Features supported in Java files validation labels Oct 1, 2020
@angelozerr angelozerr self-assigned this Nov 20, 2020
@angelozerr angelozerr added this to the 0.2.0 milestone Nov 20, 2020
@angelozerr angelozerr modified the milestones: 0.2.0, 0.3.0 Mar 31, 2021
@rgrunber
Copy link
Contributor

Relevant document on what is supported for defaultValue : https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/converters.asciidoc .

rgrunber added a commit to rgrunber/lsp4mp that referenced this issue Jul 22, 2021
- Use documentation from org.eclipse.microprofile.config.spi.Converter
- Fixes eclipse#90

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/lsp4mp that referenced this issue Jul 23, 2021
- Use documentation from org.eclipse.microprofile.config.spi.Converter
- Fixes eclipse#90

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/lsp4mp that referenced this issue Jul 23, 2021
- Use documentation from org.eclipse.microprofile.config.spi.Converter
- Fixes eclipse#90

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/lsp4mp that referenced this issue Jul 26, 2021
- Use documentation from org.eclipse.microprofile.config.spi.Converter
- Fixes eclipse#90
- Add testcase

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/lsp4mp that referenced this issue Jul 26, 2021
- Use documentation from org.eclipse.microprofile.config.spi.Converter
- Fixes eclipse#90
- Add testcase

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
angelozerr pushed a commit that referenced this issue Jul 28, 2021
- Use documentation from org.eclipse.microprofile.config.spi.Converter
- Fixes #90
- Add testcase

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@angelozerr angelozerr modified the milestones: 0.3.0, 0.4.0 Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java-files Features supported in Java files validation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants