-
Notifications
You must be signed in to change notification settings - Fork 259
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
fix: add support to list type arguments #2008
Conversation
- convert list based args correctly.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2008 +/- ##
==========================================
+ Coverage 82.60% 82.73% +0.12%
==========================================
Files 174 174
Lines 17930 18034 +104
==========================================
+ Hits 14811 14920 +109
+ Misses 3119 3114 -5 ☔ View full report in Codecov by Sentry. |
Bencher
🚨 4 ALERTS: Threshold Boundary Limits exceeded!
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Action required: PR inactive for 2 days. |
```yml @mock | ||
- request: | ||
method: GET | ||
url: http://localhost:3000/api?q=1,2,3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are multiple ways to encode this —
# Option 1
/api?q=1,2,3
# Option 2
/api?q=1&q=2&q=3
# Option 3
/api?q[]=1&q[]=2&q[]=3
I think default should be option 2, but the user should be able to decide which option to use for encoding lists in the url.
This setting should be specified in upstream
however it can be overridden in @http
if required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main problem that I see here, is that this way of handling lists is very different from how we handle lists in Bulk APIs.
@@ -386,6 +386,9 @@ pub struct Arg { | |||
pub modify: Option<Modify>, | |||
#[serde(default, skip_serializing_if = "is_default")] | |||
pub default_value: Option<Value>, | |||
/// Flag to indicate if the type inside the list is required. | |||
#[serde(default, skip_serializing_if = "is_default")] | |||
pub list_type_required: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop these changes if they aren't working from this PR. Reduce reviewer overhead :)
@@ -48,6 +48,21 @@ impl Mustache { | |||
} | |||
} | |||
|
|||
pub fn render_http(&self, value: &impl RequestString, method: &reqwest::Method) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mustache doesn't care about HTTP. We shouldn't have this a dependency to this function. Mustache doesn't even care it being a URL.
Action required: PR inactive for 2 days. |
PR closed after 5 days of inactivity. |
Summary:
Issue Reference(s):
Fixes #1991
Build & Testing:
cargo test
successfully../lint.sh --mode=fix
to fix all linting issues raised by./lint.sh --mode=check
.Checklist:
<type>(<optional scope>): <title>