adriangb / xpresso

A composable Python ASGI web framework
https://xpresso-api.dev/
MIT License
176 stars 4 forks source link

refactor!: change binder API to modify OpenAPI schema in place #94

Closed adriangb closed 2 years ago

adriangb commented 2 years ago

This paves the path for more OpenAPI generation (security models and such) without bloating the API, at the cost of shifting some responsibilies to each implementer instead of centralizing them in the OpenAPI generation infra

codecov-commenter commented 2 years ago

Codecov Report

Merging #94 (d87e91e) into main (b15dcc1) will increase coverage by 0.16%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   98.35%   98.51%   +0.16%     
==========================================
  Files         125      125              
  Lines        4194     4186       -8     
  Branches      599      591       -8     
==========================================
- Hits         4125     4124       -1     
+ Misses         32       29       -3     
+ Partials       37       33       -4     
Impacted Files Coverage Δ
...st_docs/advanced/dependencies/test_tutorial_002.py 100.00% <ø> (ø)
tests/test_docs/advanced/test_root_path.py 100.00% <ø> (ø)
tests/test_docs/advanced/test_body_union.py 100.00% <100.00%> (ø)
xpresso/binders/_binders/file_body.py 100.00% <100.00%> (ø)
xpresso/binders/_binders/form_body.py 100.00% <100.00%> (ø)
xpresso/binders/_binders/json_body.py 100.00% <100.00%> (ø)
xpresso/binders/_binders/param_openapi.py 100.00% <100.00%> (ø)
xpresso/binders/_binders/union.py 89.58% <100.00%> (+4.83%) :arrow_up:
xpresso/binders/api.py 100.00% <100.00%> (ø)
xpresso/openapi/_builder.py 91.94% <100.00%> (+1.68%) :arrow_up:
... and 1 more