✨ Add mermaid.js support in Markdown fenced blocks for diagrams (#985)

This commit is contained in:
Sebastián Ramírez authored and GitHub committed 2020-02-16 19:48:20 +01:00
1 parent 26c345b766
commit 25e94d6344
5 files changed
+133 -1

No files matched your search

+2
View File
@@ -469,6 +469,8 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in
This way we make sure the database session is always closed after the request. Even if there was an exception while processing the request.
But you can't raise another exception from the exit code (after `yield`). See more in [Dependencies with `yield` and `HTTPException`](./dependencies/dependencies-with-yield.md#dependencies-with-yield-and-httpexception){.internal-link target=_blank}
And then, when using the dependency in a *path operation function*, we declare it with the type `Session` we imported directly from SQLAlchemy.
This will then give us better editor support inside the *path operation function*, because the editor will know that the `db` parameter is of type `Session`: