-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Extend url parameters default formatting #1781
Extend url parameters default formatting #1781
Conversation
Should I add some tests using |
I would generally go with the more tests the better approach; this helps to ensure that the change in operation you are adding is both fully tested and that any future changes do not break these changes. |
Alright then, URI query assertion tests were added. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1781 +/- ##
==========================================
- Coverage 87.73% 83.66% -4.08%
==========================================
Files 33 36 +3
Lines 2348 2442 +94
Branches 294 345 +51
==========================================
- Hits 2060 2043 -17
- Misses 208 316 +108
- Partials 80 83 +3 ☔ View full report in Codecov by Sentry. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closes #1775
This PR extends the
DefaultUrlParameterFormatter
with additional formatting options based on parameter type or a combination of request and parameter types. This allows values with noQueryAttribute
format to be custom-formatted without the necessity of fully reimplementingDefaultUrlParameterFormatter
.Example usage:
or
Formatting priority:
QueryAttribute
formatAddFormat<TContainer, TParameter>
(might be suppressed by aQueryAttribute
format)AddFormat<TParameter>
(might be suppressed by aQueryAttribute
format or a container specific format)