flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

Added ability to customize/override 'consumes'

Open courtarro opened this issue 4 years ago • 2 comments

I have needed the ability to override the Swagger spec to support "consumes" values other than application/json. I added this ability and a test to confirm that it works. It can be used like @app.consumes() or @app.doc(consumes=[]) just like how "produces" works.

courtarro avatar Jun 16 '20 01:06 courtarro

Codecov Report

Merging #155 (76f66c8) into master (88497ce) will increase coverage by 0.06%. The diff coverage is 100.00%.

:exclamation: Current head 76f66c8 differs from pull request most recent head 35502c1. Consider uploading reports for the commit 35502c1 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
+ Coverage   96.86%   96.92%   +0.06%     
==========================================
  Files          20       19       -1     
  Lines        2741     2700      -41     
==========================================
- Hits         2655     2617      -38     
+ Misses         86       83       -3     
Impacted Files Coverage Δ
flask_restx/namespace.py 94.61% <100.00%> (+0.06%) :arrow_up:
flask_restx/swagger.py 96.74% <100.00%> (ø)
flask_restx/resource.py 97.95% <0.00%> (-0.12%) :arrow_down:
flask_restx/model.py 96.94% <0.00%> (-0.10%) :arrow_down:
flask_restx/__init__.py
flask_restx/reqparse.py 98.72% <0.00%> (+<0.01%) :arrow_up:
flask_restx/fields.py 96.59% <0.00%> (+0.13%) :arrow_up:
flask_restx/api.py 97.13% <0.00%> (+0.36%) :arrow_up:

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 88497ce...35502c1. Read the comment docs.

codecov[bot] avatar Jun 16 '20 01:06 codecov[bot]

Would be very nice to get this merged and released.

zsuhor avatar Apr 18 '23 08:04 zsuhor