jmcarp / flask-apispec

MIT License
655 stars 156 forks source link

Fix serialisation problem with return codes when used with flask-restful #168

Closed AdamLeyshon closed 4 years ago

AdamLeyshon commented 5 years ago

by using the unpacked status in the tuple tuple or default to 200.

Then return a tuple consisting only of the response object allowing flask-restful to unpack and serialise the response properly.

I believe this will still work for people without flask-restful too. All the tests in the suite passed.

AdamLeyshon commented 5 years ago

Should fix #98 and #93

westhyena commented 4 years ago

merge this please!

thuitaw commented 4 years ago

@jmcarp , @sloria any chance we can get this merged?

codecov-io commented 4 years ago

Codecov Report

Merging #168 into master will decrease coverage by 0.27%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
- Coverage   97.72%   97.45%   -0.28%     
==========================================
  Files           8        8              
  Lines         352      353       +1     
==========================================
  Hits          344      344              
- Misses          8        9       +1
Impacted Files Coverage Δ
flask_apispec/wrapper.py 96.66% <100%> (-1.58%) :arrow_down:
flask_apispec/apidoc.py 97.26% <0%> (-0.08%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 55255f5...d19b5d0. Read the comment docs.