-
Notifications
You must be signed in to change notification settings - Fork 494
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
RequestAdaptor support all fields template #910
Conversation
hi @hhhcj , thanks for the PRs. the best practice would be analysis the problem and make a careful design before coding. |
Codecov ReportBase: 73.16% // Head: 73.07% // Decreases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #910 +/- ##
==========================================
- Coverage 73.16% 73.07% -0.10%
==========================================
Files 131 131
Lines 15007 15055 +48
==========================================
+ Hits 10980 11001 +21
- Misses 3403 3427 +24
- Partials 624 627 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
A new commit with template support for |
2. move the requestadaptor and responseadaptor out from their own folder
hi @hhhcj , |
merge setRequest and setRequest in builder unittest
add another pa in template spec
|
hi @hhhcj , please do not just solve the problem, we should try to solve it in the better or best way.
and
|
I get your point now. For the path, we could use another field eg. But if we define that template to complete replace the static word, changing one of the field name to another or adding a new field that static field doesn't own may confuse the user that someone think the template field may work, but after trying, he found that the field has been renamed to another. We designed it to be straightforward and user-friendly but result to be unstraightforward and user-unfriendly. Is it worth to do this? Though we support the whole pathadaptor.Spec in template, but users can simply use pathadaptor.Spec.replace to modify the path by theirselves. @localvar
|
I called to @samanhappy last thursday, and knew that there will be two definitions on template, one is defining a glabal uniform structure for template or filter differenced template structure. If the latter one we choosed, the template should realize all of the static field directly. |
hi @hhhcj , after think it twice, I think your comments make sense. |
Co-authored-by: samanhappy <[email protected]>
Co-authored-by: samanhappy <[email protected]>
Another way to solve #903 , besides #905, #907