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

MicroProfile Rest Client - Support wildcard in URL/URI properties key #9536

Open
tvallin opened this issue Nov 27, 2024 · 0 comments
Open

MicroProfile Rest Client - Support wildcard in URL/URI properties key #9536

tvallin opened this issue Nov 27, 2024 · 0 comments
Labels
4.x Version 4.x enhancement New feature or request microprofile rest-client

Comments

@tvallin
Copy link
Member

tvallin commented Nov 27, 2024

Environment Details

  • Helidon Version: 4.x
  • Helidon MP
  • JDK version: 21
  • OS: n/a
  • Docker version (if applicable): n/a

Problem Description

Currently, Helidon users can set URL by setting $restClient/mp-rest/url property where restClient is the client alias or the class name.

The spec mentions */mp-rest/url property to set the client baseUrl and we currently don't support it.
It is not required so this issue is an enhancement proposal.

(Same applies for URI)

Steps to reproduce

Example of how it could looks like from the MP quickstart:

Add a rest client

@Path("/greet")
@RegisterRestClient(configKey="client", baseUri = "http://localhost:8080")
public interface MyRestClient {

    @GET
    GreetingMessage getDefaultMessage();
}

Add this test class

@HelidonTest
@AddConfig(key = "*/mp-rest/url", value = "http://localhost:8000")
public class MpRestClientConfigTest {

    @Inject
    @RestClient
    MyRestClient client;

    @Test
    void test() {
        client.getDefaultMessage();
    }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x enhancement New feature or request microprofile rest-client
Projects
Status: Triage
Development

No branches or pull requests

1 participant