-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Added MethodViewResolver #847
Conversation
By subclassing RestyResolver and modifying its `resolve_function_from_operation_id` method, it is now possible to use automatic routing functionality with Flask's MethodView together with MethodViewResolver.
Thanks @smn-snkl ! I think the next steps are:
Do you have bandwidth to take that on? |
can I suggest a change on line 163
|
@Bengreen can you explain the reasoning behind this? The reason I'm asking this is that I changed the implementation yesterday (and just committed it) to work with camelCase resources and still support the standard operationId keys for manual routing |
@dtkav Don't have the resources right now. May be able to do it in a few days. If anyone else wants to take it on, I'd be happy as well |
I am trying out some examples of how I use MethodView in past against this Resolver and trying to work out suggestions to allow it to work across standard ways of using MethodView. |
@Bengreen cool, thanks! Make sure to check the latest commit as I fixed some use cases as well |
@smn-snkl I made a PR to your patch to add an example for MethodViewResolver. |
Add methodview example
Just merged @Bengreen 's example into this PR. Thanks! |
I just made a PR for @smn-snkl patch to add tests. |
Add methodview tests
Thanks @Bengreen. Just merged your tests into this PR as well. Have to admit though I didn't carefully review this last merge |
@Bengreen : CI fails for latest Python version. Do you mind fixing the issue? I invited you to my fork. I think it's just the order of the imports. |
PR for this Merge with @smn-snkl to correct isort issues and correct example |
…ace in inheritence model. Simply implementation and add some documentation into coe
Can we get a review from @dtkav |
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.
Code has been cleaned up, examples added and tests added. It follows similar concept to RestyResolver.
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.
Please update the docs here: https://github.com/zalando/connexion/blob/master/docs/routing.rst
Otherwise this is looking great. Nice work!
@dtkav Docs added. |
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.
Awesome, thank you!
I made a merge of most recent master to this branch |
👍 |
This PR proposes a solution for #359
By subclassing RestyResolver and modifying its
resolve_function_from_operation_id
method, it is now possible to use automatic routing functionality with Flask's MethodView together with MethodViewResolver.Changes proposed in this pull request:
resolve_function_from_operation_id
to return Flask's MethodView functions