edgedb / edgedb-examples

EdgeDB example projects for different stacks
62 stars 22 forks source link

Bump fastapi from 0.77.1 to 0.78.0 #40

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps fastapi from 0.77.1 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)