-
Notifications
You must be signed in to change notification settings - Fork 126
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
✨ Feature: Omit Response in service #545
✨ Feature: Omit Response in service #545
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #545 +/- ##
===========================================
+ Coverage 94.06% 94.17% +0.11%
===========================================
Files 10 11 +1
Lines 472 481 +9
===========================================
+ Hits 444 453 +9
Misses 28 28 ☔ View full report in Codecov by Sentry. |
Nice addition! What's the plan for APIs that don't return anything, i.e. a @Delete(path: 'items/{id}')
Future<void> deleteItem(@Path() String id); Like this ⬆️? |
When the service has Added a extra tests for Not completly sure though. |
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.
LGTM
Do you plan to update the docs in this PR? |
Was thinking on doing separate separate PR for updating docs and include some more information on creating chopper services. |
Added the possibility to omit Response when creating a service to reduce some boilerplate if the Response object is not really needed.
This give the developer the choice to make use of the Response and its meta data is needed. This might not always be case because a error converter deals with the error logic.
TODO:
Update documentation for this feature
Previously a
ChopperService
was created like this (still valid):Which creates:
Now its also possible to specify a service like this:
Which creates this: