-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat!: use extractor pattern for request handlers #253
Conversation
8e2c734
to
ebdab62
Compare
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
eab4e0e
to
05c3be4
Compare
This is a massive change and the transition probably isn't even fully done yet. This should be a good starting point, though. The remaining work includes: * Removing more of the `RequestExt` trait * Creating `IntoResponse` trait so that the consumers can return other types than `cot::Result<Response>` * More work on maintaining consistency in the API Note that this is a (quite big) breaking change, mostly because it removes a lot of methods from the `RequestExt` trait. This change is needed to implement automatic OpenAPI spec generation in #159.
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.
At the very end, you should go over the generated tests and remove the pointless comments.
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.
Great work! Hit the Codecov's limit of 81.1% and I'll gladly approve
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.
👌🎉
This is a massive change and the transition probably isn't even fully done yet. This should be a good starting point, though.
The remaining work includes:
RequestExt
traitIntoResponse
trait so that the consumers can return other types thancot::Result<Response>
Note that this is a (quite big) breaking change, mostly because it removes a lot of methods from the
RequestExt
trait.This change is needed to implement automatic OpenAPI spec generation in #159.