-
Notifications
You must be signed in to change notification settings - Fork 151
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
Support apispec >= 4 #206
Support apispec >= 4 #206
Conversation
1. Rename 'default_in' (marshmallow-code/apispec#526) 2. Dict schema: convert it to object and handle special case 'body', since prior used method no longer exists (marshmallow-code/apispec#581)
Supporting different apispec version requires different logic for each of them. New apispec requires Python >= 3.6
Codecov Report
@@ Coverage Diff @@
## master #206 +/- ##
==========================================
+ Coverage 97.26% 97.86% +0.59%
==========================================
Files 8 8
Lines 366 374 +8
==========================================
+ Hits 356 366 +10
+ Misses 10 8 -2
Continue to review full report at Codecov.
|
Apologies for the delay. I'll try to look at this soon |
apispec no longer supports 3.5
This is released in 0.11.0. Thanks for the PR! |
Thank you for the help! |
* Compatibility with apispec 4 1. Rename 'default_in' (marshmallow-code/apispec#526) 2. Dict schema: convert it to object and handle special case 'body', since prior used method no longer exists (marshmallow-code/apispec#581) * Drop support for apispec < 4, Python < 3.6 Supporting different apispec version requires different logic for each of them. New apispec requires Python >= 3.6 * Remove unused imports * Update tox.ini * Update changelog * Drop Python 3.5 support apispec no longer supports 3.5 Co-authored-by: Steven Loria <sloria1@gmail.com>
This PR introduce support for compatibility-breaking apispec 4.0.0. Since some interface and argument names are changed, I decided to drop support for older apispec. Switching to apispec 4 may require some changes in code (see https://github.com/marshmallow-code/apispec/blob/dev/CHANGELOG.rst).
Behavior of
fields2parameters
is now handled directly by flask-apispec: old method no longer exists and new 'official' way, converting toSchema
, when fields should be inbody
conflicts with flask-apispec behavior (it generates reference to named schema instead of putting just dict with definition and registers new schema every time converted, so output can contain multiple schemas; in addition, there is a problem with names for multiple auto-generated schemas).I strongly recommend making a recovery release with apispec pined to < 4 (PR #204) for those, who would keep on it, before merging my changes.
Fix #202