aiohttp-swagger icon indicating copy to clipboard operation
aiohttp-swagger copied to clipboard

Swagger schema partial patching. Swagger schema validation.

Open trezorg opened this issue 6 years ago • 2 comments

It would be useful to redefine or update global swagger schema by endpoint swagger definition. Also it is possible to validate swagger schema. Also dropped 3.4 support.

trezorg avatar Feb 28 '18 09:02 trezorg

Codecov Report

Merging #43 into master will increase coverage by 2.31%. The diff coverage is 95.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
+ Coverage   92.98%   95.29%   +2.31%     
==========================================
  Files           4        5       +1     
  Lines         114      319     +205     
==========================================
+ Hits          106      304     +198     
- Misses          8       15       +7
Impacted Files Coverage Δ
aiohttp_swagger/helpers/__init__.py 100% <100%> (ø) :arrow_up:
aiohttp_swagger/helpers/decorators.py 100% <100%> (ø) :arrow_up:
aiohttp_swagger/__init__.py 100% <100%> (+2.63%) :arrow_up:
aiohttp_swagger/helpers/validation.py 94.87% <94.87%> (ø)
aiohttp_swagger/helpers/builders.py 92.47% <97.22%> (+2.76%) :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 8af93ac...2548a9c. Read the comment docs.

codecov-io avatar Feb 28 '18 10:02 codecov-io

@trezorg Thank you! I used the code from your PR, and it saved my time! May be some changes need:

  • Draft4Validator to Draft7Validator
  • if issubclass(handler, web.View) and route.method == METH_ANY: to if inspect.isclass(handler) and issubclass(handler, web.View) and route.method == METH_ANY:

P.S.: Very cool PR, but I don’t understand why this PR hasn't been accepted until now

CyberLight avatar May 15 '19 06:05 CyberLight