Define the "value" in a Variable Query Parameter which is defined on the interface
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
I've defined a query parameter on an interface like this:
``` C#
public interface IApi
{
[Query("api-version")]
string ApiVersion { get; set; }
[Get("users")]
Task> GetUsersAsync();
}
```
What I would to do is set the **value** for this Query Parameter like this:
``` C#
public interface IApi
{
[Query("api-version", "abc")]
string ApiVersion { get; set; }
[Get("users")]
Task> GetUsersAsync();
}
```
This makes the code more clean then just adding `?api-version=abc` to every method like described here: https://github.com/canton7/RestEase#constant-query-parameters
**Version Info**
- RestEase version: [1.5.5]
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the constant query parameters documentation linked in the issue and trace how the Query attribute is handled for interface properties and methods. The change is done when a query parameter declared on an interface can express a constant value as shown, with the existing behavior preserved for parameters without one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100