]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Add `routes=routes` to schemas documentation (#1241)
authorJu <soasme@users.noreply.github.com>
Sat, 18 Sep 2021 13:35:28 +0000 (01:35 +1200)
committerGitHub <noreply@github.com>
Sat, 18 Sep 2021 13:35:28 +0000 (15:35 +0200)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
docs/schemas.md

index 2530ba8d1fd14ce4779386a24a9748ef329c6a54..275e7b296855597ea2b224fbd305245d2cf83821 100644 (file)
@@ -51,7 +51,7 @@ routes = [
     Route("/schema", endpoint=openapi_schema, include_in_schema=False)
 ]
 
-app = Starlette()
+app = Starlette(routes=routes)
 ```
 
 We can now access an OpenAPI schema at the "/schema" endpoint.