-
Notifications
You must be signed in to change notification settings - Fork 41
feat: Add flask-restx support #48
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
Conversation
@jstasiak Tests are failing due to the |
Hmm, ok, I'll take care of it in a bit. In the meantime do you want to mention |
Alright. |
@jstasiak For the werkzeug you might have to lock the version to |
flask_injector/__init__.py
Outdated
import flask_restx as flask_restplus | ||
from flask_restx.utils import unpack as flask_response_unpack # noqa | ||
except ImportError: | ||
flask_restplus = None |
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.
ok, so I suspected that the name flask_restplus
can't be reused here because of this block https://github.com/alecthomas/flask_injector/blob/master/flask_injector/__init__.py#L116 but the tests were actually passing. :>
Turns out that block could actually be removed (I didn't, it's needed) because it wasn't actually being tested. I added a test in 717a12b so, if you rerun your tests now, you'll find they'll fail and need to be modified.
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.
Rerun after rebasing on current master, that is.
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.
Okay. On it.
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.
The restplus
and restx
tests are now failing appropriately. Are you working on this fix?
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.
Well, I expect they'll be failing because of your patch now, so... :)
What are the failures?
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.
Nevermind. Got it working.
@@ -329,6 +330,29 @@ def get(self): | |||
eq_(data, {'int': 0}) | |||
|
|||
|
|||
def test_flask_restx_integration_works(): |
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 modify this test following 717a12b
@jstasiak I've resolved the issue. |
@jstasiak It seems adding the |
That's fine, it's just a number. |
Nice job! |
This has just been released in version 0.12.2. |
This PR handles issue #47