fastapi-realworld-example-app icon indicating copy to clipboard operation
fastapi-realworld-example-app copied to clipboard

Bump fastapi from 0.73.0 to 0.78.0

Open dependabot[bot] opened this issue 3 years ago • 1 comments

Bumps fastapi from 0.73.0 to 0.78.0.

Release notes

Sourced from fastapi's releases.

0.78.0

Features

  • ✨ Add support for omitting ... as default value when declaring required parameters with:

  • Path()

  • Query()

  • Header()

  • Cookie()

  • Body()

  • Form()

  • File()

New docs at Tutorial - Query Parameters and String Validations - Make it required. PR #4906 by @​tiangolo.

Up to now, declaring a required parameter while adding additional validation or metadata needed using ... (Ellipsis).

For example:

from fastapi import Cookie, FastAPI, Header, Path, Query

app = FastAPI()

@​app.get("/items/{item_id}") def main( item_id: int = Path(default=..., gt=0), query: str = Query(default=..., max_length=10), session: str = Cookie(default=..., min_length=3), x_trace: str = Header(default=..., title="Tracing header"), ): return {"message": "Hello World"}

...all these parameters are required because the default value is ... (Ellipsis).

But now it's possible and supported to just omit the default value, as would be done with Pydantic fields, and the parameters would still be required.

✨ For example, this is now supported:

from fastapi import Cookie, FastAPI, Header, Path, Query

app = FastAPI()

@​app.get("/items/{item_id}") def main( item_id: int = Path(gt=0), </tr></table>

... (truncated)

Commits
  • 1876ebc 🔖 Release version 0.78.0
  • 1673b3e 📝 Update release notes
  • 1711403 📝 Update release notes
  • acab64b ✅ Add tests for required nonable parameters and body fields (#4907)
  • 0a8d687 📝 Update release notes
  • ca437cd 📝 Add docs recommending Union over Optional and migrate source examples (...
  • c5be1b0 📝 Update release notes
  • 9262fa8 ✨ Add support for not needing ... as default value in required Query(), Pat...
  • 31690dd 📝 Update release notes
  • 8b66b9c 🎨 Fix default value as set in tutorial for Path Operations Advanced Configura...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

dependabot[bot] avatar Jun 01 '22 12:06 dependabot[bot]

Codecov Report

Merging #282 (84e3616) into master (dc1aa66) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #282   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           69        69           
  Lines         1478      1478           
  Branches       121       121           
=========================================
  Hits          1478      1478           

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 dc1aa66...84e3616. Read the comment docs.

codecov-commenter avatar Jun 01 '22 12:06 codecov-commenter

Superseded by #288.

dependabot[bot] avatar Aug 01 '22 12:08 dependabot[bot]