FastAPI で OpenAPI 定義を生成する¶
FastAPI と Pydantic を使って OpenAPI 定義を生成できる。ReDoc のなかに OpenAPI の UI を埋め込むというのもやってみた。
[引用](https://python.plainenglish.io/fastapi-redoc-with-try-it-out-a597c8702bb9)
書いたコード
- fastapi-openapi-demo/main.py at master · nishikoh-sandbox/fastapi-openapi-demo · GitHub
- fastapi-openapi-demo/router.py at master · nishikoh-sandbox/fastapi-openapi-demo · GitHub
参考