Skip to content
This repository was archived by the owner on Feb 19, 2023. It is now read-only.

Conversation

@dependabot-preview
Copy link
Contributor

@dependabot-preview dependabot-preview bot commented Nov 30, 2020

Bumps fastapi from 0.54.1 to 0.62.0.

Release notes

Sourced from fastapi's releases.

0.62.0

Features

  • ✨ Add support for shared/top-level parameters (dependencies, tags, etc). PR #2434 by @tiangolo.

Up to now, for several options, the only way to apply them to a group of path operations was in include_router. That works well, but the call to app.include_router() or router.include_router() is normally done in another file.

That means that, for example, to apply authentication to all the path operations in a router it would end up being done in a different file, instead of keeping related logic together.

Setting options in include_router still makes sense in some cases, for example, to override or increase configurations from a third party router included in an app. But in a router that is part of a bigger application, it would probably make more sense to add those settings when creating the APIRouter.

In FastAPI

This allows setting the (mostly new) parameters (additionally to the already existing parameters):

  • default_response_class: updated to handle defaults in APIRouter and include_router.
  • dependencies: to include ✨ top-level dependencies ✨ that apply to the whole application. E.g. to add global authentication.
  • callbacks: OpenAPI callbacks that apply to all the path operations.
  • deprecated: to mark all the path operations as deprecated. 🤷
  • include_in_schema: to allow excluding all the path operations from the OpenAPI schema.
  • responses: OpenAPI responses that apply to all the path operations.

For example:

from fastapi import FastAPI, Depends
async def some_dependency():
return
app = FastAPI(dependencies=[Depends(some_dependency)])

In APIRouter

This allows setting the (mostly new) parameters (additionally to the already existing parameters):

  • default_response_class: updated to handle defaults in APIRouter and include_router. For example, it's not needed to set it explicitly when creating callbacks.
  • dependencies: to include ✨ router-level dependencies ✨ that apply to all the path operations in a router. Up to now, this was only possible with include_router.
  • callbacks: OpenAPI callbacks that apply to all the path operations in this router.
  • deprecated: to mark all the path operations in a router as deprecated.
  • include_in_schema: to allow excluding all the path operations in a router from the OpenAPI schema.
  • responses: OpenAPI responses that apply to all the path operations in a router.
  • prefix: to set the path prefix for a router. Up to now, this was only possible when calling include_router.
  • tags: OpenAPI tags to apply to all the path operations in this router.

For example:

Commits
  • 51e920e 🔖 Release version 0.62.0
  • c27b9dc 📝 Update release notes, add breaking changes details
  • c7e137c 📝 Update release notes
  • 7e4d7fe 📝 Update release notes
  • 2c57ea5 🔧 Update TestDriven link to course in sponsors (#2435)
  • be7d15c 📝 Update release notes
  • afc2bb0 📝 Update release notes
  • 313bbe8 ✨ Add support for shared/top-level parameters (dependencies, tags, etc) (#2434)
  • d550738 📝 Update release notes
  • cc99e23 🌐 Add Japanese translation for Advanced - Custom Response (#2193)
  • 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 use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.54.1 to 0.62.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.54.1...0.62.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot force-pushed the dependabot/pip/fastapi-0.62.0 branch from 9bf0a03 to a84d485 Compare December 18, 2020 04:18
@pull-request-size pull-request-size bot added size/L and removed size/S labels Dec 18, 2020
@dependabot-preview
Copy link
Contributor Author

Superseded by #392.

@dependabot-preview dependabot-preview bot deleted the dependabot/pip/fastapi-0.62.0 branch December 21, 2020 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant