Browse Source
Update fastapi/applications.py
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
pull/13713/head
Carlos Mario Toro
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
6 deletions
-
fastapi/applications.py
|
@ -826,18 +826,13 @@ class FastAPI(Starlette): |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
|
from fastapi import FastAPI |
|
|
from fastapi import FastAPI |
|
|
from typing import Dict, Any |
|
|
|
|
|
from typing import Optional |
|
|
|
|
|
from fastapi.openapi.models import Doc |
|
|
|
|
|
from typing_extensions import Annotated |
|
|
|
|
|
|
|
|
|
|
|
external_docs: Annotated[Optional[Dict[str, Any]], Doc()] = { |
|
|
external_docs = { |
|
|
"description": "Detailed API Reference", |
|
|
"description": "Detailed API Reference", |
|
|
"url": "https://example.com/api-docs", |
|
|
"url": "https://example.com/api-docs", |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
app = FastAPI(openapi_external_docs=external_docs) |
|
|
app = FastAPI(openapi_external_docs=external_docs) |
|
|
|
|
|
|
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### Explanation: |
|
|
### Explanation: |
|
|