Results of 1 - 10 of about 13 for ReDoc (0.002 sec.)
- Custom Docs UI Static Assets (Self-Hosting) 14146
- Custom Docs UI Static Assets (Self-Hosting) Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . The API docs use Swagger UI and ReDoc , and each of those need some Jav
...RLs to None when creating your FastAPI app: Python 3.8+ from fastapi import FastAPI from fastapi.openapi.docs import ( get_redoc_html , get_swagger_ui_html , get_swagger_ui_oauth2_redirect_html , ) app = FastAPI ( docs_url = None , redoc_url = None )...include_in_schema = False ) async def swagger_ui_redirect (): return get_swagger_ui_oauth2_redirect_html () @app . get ( "/redoc" , include_in_schema = False ) async def redoc_html (): return get_redoc_html ( openapi_url = app . openapi_url , title =...app . title + " - ReDoc" , redoc_js_url = "https://unpkg.com/redoc@next/bundles/redoc.standalone.js" , ) @app . get ( "/users/ {username} " ) asyn... - https://man.mtool.work/fastapi/0.115/how-to/custom-docs-ui-assets/
- Configure Swagger UI 10574
- Configure Swagger UI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can configure some extra Swagger UI parameters . To configure them, pass the swagger_ui_pa
...( jsonable_encoder ( init_oauth )) } ) """ html += """ </script> </body> </html> """ return HTMLResponse ( html ) def get_redoc_html ( * , openapi_url : Annotated [ str , Doc ( """ The OpenAPI URL that ReDoc should load and use. This is normally done...n`. """ ), ], title : Annotated [ str , Doc ( """ The HTML `<title>` content, normally shown in the browser tab. """ ), ], redoc_js_url : Annotated [ str , Doc ( """ The URL to use to load the ReDoc JavaScript. It is normally set to a CDN URL. """ ),...] = "https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js" , redoc_favicon_url : Annotated [ str , Doc ( """ The URL of the favicon to use. It is n... - https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
- OpenAPI docs 9624
- OpenAPI docs Utilities to handle OpenAPI automatic UI documentation, including Swagger UI (by default at /docs ) and ReDoc (by default at /redoc ). ::: fastapi.openapi.docs.get_swagger_ui_html ::: fastapi.openapi.docs.get_redoc_html ::: fas
... - https://man.mtool.work/fastapi/0.115/reference/openapi/docs/
- メタデータとドキュメントのURL 8885
- メタデータとドキュメントのURL FastAPI アプリケーションのいくつかのメタデータの設定をカスタマイズできます。 タイトル、説明文、バージョン 以下を設定できます: タイトル : OpenAPIおよび自動APIドキュメントUIでAPIのタイトル/名前として使用される。
...gger UI : /docs で提供されます。 URL はパラメータ docs_url で設定できます。 docs_url=None を設定することで無効にできます。 ReDoc: /redoc で提供されます。 URL はパラメータ redoc_url で設定できます。 redoc_url=None を設定することで無効にできます。 たとえ...ば、 /documentation でSwagger UIが提供されるように設定し、ReDocを無効にするには: Python 3.8+ from fastapi import FastAPI app = FastAPI ( docs_url = "/documentation" , redoc_url = None ) @... - https://man.mtool.work/fastapi/0.115/tutorial/metadata/
- Extending OpenAPI 8287
- Extending OpenAPI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . There are some cases where you might need to modify the generated OpenAPI schema. In this section
...use the same utility function to generate the OpenAPI schema and override each part that you need. For example, let's add ReDoc's OpenAPI extension to include a custom logo . Normal FastAPI First, write all your FastAPI application as normally: Pytho...= openapi_schema return app . openapi_schema app . openapi = custom_openapi Modify the OpenAPI schema Now you can add the ReDoc extension, adding a custom x-logo to the info "object" in the OpenAPI schema: Python 3.8+ from fastapi import FastAPI from...= openapi_schema return app . openapi_schema app . openapi = custom_openapi Check it Once you go to http://127.0.0.1:8000/redoc you will see that you are using your custom logo (in this example, FastAPI 's logo):... - https://man.mtool.work/fastapi/0.115/how-to/extending-openapi/
- FastAPI 8164
- FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production ドキュメント : https://fastapi.tiangolo.com ソースコード : https://github.com/fastapi/fastapi FastAPI は、Pythonの標準である型ヒントに基づいてPyt
...動対話型の API ドキュメントが表示されます。 ( Swagger UI が提供しています。): 代替の API ドキュメント http://127.0.0.1:8000/redoc にアクセスしてみてください。 代替の自動ドキュメントが表示されます。( ReDoc が提供しています。): アップグレード例 PUT リクエ...と通信し、パラメータを送信し、結果を取得して画面に表示します: 代替の API ドキュメントのアップグレード http://127.0.0.1:8000/redoc にアクセスしましょう。 代替の API ドキュメントにも新しいクエリパラメータやボディが反映されます。 まとめ 要約すると、関数の...データベースモデル ...などなど 2 つの代替ユーザーインターフェースを含む自動インタラクティブ API ドキュメント: Swagger UI. ReDoc. コード例に戻りましょう、 FastAPI は次のようになります: GET および PUT リクエストのパスに item_id があることを検証します。... - https://man.mtool.work/fastapi/0.115/
- 最初のステップ 7882
- 最初のステップ 最もシンプルなFastAPIファイルは以下のようになります: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/" ) async def root (): return { "message" : "Hello World" } これを main.py にコピーします。 ライブサ
...。 自動生成された対話的APIドキュメントが表示されます ( Swagger UI で提供): 他のAPIドキュメント 次に、 http://127.0.0.1:8000/redoc にアクセスします。 先ほどとは異なる、自動生成された対話的APIドキュメントが表示されます ( ReDoc によって提供): OpenAPI Fast... - https://man.mtool.work/fastapi/0.115/tutorial/first-steps/
- パスパラメータ 7882
- パスパラメータ Pythonのformat文字列と同様のシンタックスで「パスパラメータ」や「パス変数」を宣言できます: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/items/ {item_id} " ) async def read_item ( item_id ): return {
...enAPI 標準に従っているので、互換性のあるツールが多数あります。 このため、 FastAPI 自体が代替のAPIドキュメントを提供します(ReDocを使用)。これは、 http://127.0.0.1:8000/redoc にアクセスすると確認できます。 同様に、互換性のあるツールが多数あります(多く... - https://man.mtool.work/fastapi/0.115/tutorial/path-params/
- 条件付き OpenAPI 7847
- 条件付き OpenAPI 必要であれば、設定と環境変数を利用して、環境に応じて条件付きでOpenAPIを構成することが可能です。また、完全にOpenAPIを無効にすることもできます。 セキュリティとAPI、およびドキュメントについて 本番環境においてドキュメントのUIを
...INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) すると、以下のように /openapi.json , /docs , /redoc のどのURLにアクセスしても、 404 Not Found エラーが返ってくるようになります。 { "detail" : "Not Found" }... - https://man.mtool.work/fastapi/0.115/how-to/conditional-openapi/
- コンテナ内のFastAPI - Docker 7812
- コンテナ内のFastAPI - Docker FastAPIアプリケーションをデプロイする場合、一般的なアプローチは Linuxコンテナ・イメージ をビルドすることです。 基本的には Docker を用いて行われます。生成されたコンテナ・イメージは、いくつかの方法のいずれかでデプ
...スすると、自動対話型APIドキュメント( Swagger UI が提供)が表示されます: 代替のAPIドキュメント また、 http://192.168.99.100/redoc や http://127.0.0.1/redoc (またはそれに相当するDockerホストを使用したもの)にもアクセスできます。 代替の自動ドキュメント(...ReDoc によって提供される)が表示されます: 単一ファイルのFastAPIでDockerイメージをビルドする FastAPI が単一のファイル、例えば ./a... - https://man.mtool.work/fastapi/0.115/deployment/docker/