docs: add FastAPI integration lifecycle sequence diagrams - #128
Open
tmchow wants to merge 1 commit into
Open
Conversation
Add mermaid sequence diagrams to the FastAPI integration page showing: 1. App lifecycle: container creation, setup, route injection, and teardown 2. Per-request lifecycle: scope creation, dependency resolution, handler execution, and cleanup Closes maldoinc#120
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two mermaid sequence diagrams to the FastAPI integration docs page, covering the app lifecycle and per-request lifecycle.
Fixes #120
Why this matters
Issue #120 identified that the FastAPI integration page lacked visual documentation of what happens under the hood. The
setup()call wires together lifespan management, route injection, and container teardown, but the existing docs only show the Quick Start code. These diagrams trace the actual call flow throughwireup/integration/fastapi.pyso users can see how container creation, route injection, scope handling, and cleanup connect.Changes
Added a
## Lifecyclesection todocs/pages/integrations/fastapi/index.mdbetween Quick Start and Detailed Guides:create_async_container->setup()-> lifespan enter (route injection, class-based handler instantiation) -> app runs -> lifespan exit (container.close())Injected[T]resolved -> handler called -> scope exits -> response returnedBoth diagrams render via the existing mermaid fence configured in
mkdocs.yml(line 143-146).Testing
docs/mkdocs.ymlwireup/integration/fastapi.py