Carlos Mario Toro
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
10 additions and
1 deletions
-
tests/test_openapi_examples.py
|
|
@ -5,7 +5,12 @@ from fastapi import Body, Cookie, FastAPI, Header, Path, Query |
|
|
|
from fastapi.testclient import TestClient |
|
|
|
from pydantic import BaseModel |
|
|
|
|
|
|
|
app = FastAPI() |
|
|
|
external_docs = { |
|
|
|
"description": "External API documentation.", |
|
|
|
"url": "https://docs.example.com/api-general" |
|
|
|
} |
|
|
|
|
|
|
|
app = FastAPI(external_docs=external_docs) |
|
|
|
|
|
|
|
|
|
|
|
class Item(BaseModel): |
|
|
@ -468,4 +473,8 @@ def test_openapi_schema(): |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
"externalDocs": { |
|
|
|
"description": "External API documentation.", |
|
|
|
"url": "https://docs.example.com/api-general" |
|
|
|
}, |
|
|
|
} |
|
|
|