From 7d7516879ab64e77939f73b5bbff886daf3433f2 Mon Sep 17 00:00:00 2001 From: Carlos Mario Toro <41237977+cmtoro@users.noreply.github.com> Date: Tue, 13 May 2025 13:54:39 -0500 Subject: [PATCH] Update test_openapi_examples.py --- tests/test_openapi_examples.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_openapi_examples.py b/tests/test_openapi_examples.py index b3f83ae23..77d275e97 100644 --- a/tests/test_openapi_examples.py +++ b/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" + }, }