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

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

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`: