-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
proposalProposed Specification or API changeProposed Specification or API change
Description
Problem
Let's say I have a request template that looks like this:
@RequestLine("GET /{env}/{resource}")
void getResource(@Param("env") String env, @Param("resource") String resource);In the application that defines this template, env is configured at startup and will only ever have 1 value (e.g. "production" or "qa") during the application's lifespan. It would make sense to not have to pass this same value into each call of getResource().
Default methods are of no help here because env still needs to be dynamically set.
Proposal
Support on-time configuration of expression parameters via configuration methods on the client interface:
@Configuration
void setEnv(@Param("env") String env);
@RequestLine("GET /{env}/{resource}")
void getResource(@Param("resource") String resource);Implementing this is pretty easy (~150 lines).
N.B. this proposal is somewhat similar to #1359.
rage-shadowman
Metadata
Metadata
Assignees
Labels
proposalProposed Specification or API changeProposed Specification or API change