From d50bbb487d03851a6cbbb99dcbdf04c7f43e395a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:24:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/encoders.py | 6 +- fastapi/security/http.py | 2 + fastapi/security/oauth2.py | 4 +- tests/test_application.py | 4 +- tests/test_infer_param_optionality.py | 8 +- tests/test_multi_query_errors.py | 4 +- tests/test_openapi_examples.py | 12 +- tests/test_regex_deprecated_params.py | 4 +- .../test_cookie/test_optional_str.py | 104 ++++++++-------- .../test_cookie/test_required_str.py | 72 ++++++----- .../test_header/test_list.py | 92 ++++++++------ .../test_header/test_optional_list.py | 116 ++++++++++-------- .../test_header/test_optional_str.py | 104 ++++++++-------- .../test_header/test_required_str.py | 72 ++++++----- .../test_query/test_list.py | 92 ++++++++------ .../test_query/test_optional_list.py | 116 ++++++++++-------- .../test_query/test_optional_str.py | 104 ++++++++-------- .../test_query/test_required_str.py | 72 ++++++----- tests/test_schema_extra_examples.py | 36 ++++-- tests/test_sub_callbacks.py | 4 +- .../test_tutorial002.py | 4 +- .../test_tutorial004.py | 4 +- .../test_body/test_tutorial004.py | 4 +- .../test_tutorial001.py | 8 +- .../test_tutorial004.py | 4 +- .../test_tutorial001.py | 20 ++- .../test_tutorial002.py | 20 ++- .../test_cookie_params/test_tutorial001.py | 4 +- .../test_tutorial001_tutorial001_02.py | 8 +- ...est_tutorial002_tutorial003_tutorial004.py | 4 +- .../test_dependencies/test_tutorial005.py | 8 +- .../test_tutorial001.py | 28 +++-- .../test_tutorial002.py | 28 +++-- .../test_tutorial003.py | 28 +++-- .../test_header_params/test_tutorial001.py | 4 +- .../test_header_params/test_tutorial002.py | 4 +- .../test_header_params/test_tutorial003.py | 4 +- .../test_tutorial001.py | 4 +- .../test_tutorial001.py | 4 +- .../test_tutorial001.py | 16 ++- .../test_tutorial002.py | 16 ++- .../test_query_params/test_tutorial002.py | 4 +- .../test_query_params/test_tutorial003.py | 4 +- .../test_query_params/test_tutorial004.py | 4 +- .../test_query_params/test_tutorial006.py | 4 +- .../test_tutorial001.py | 4 +- .../test_tutorial002.py | 4 +- .../test_tutorial003.py | 4 +- .../test_tutorial004.py | 4 +- .../test_tutorial007.py | 4 +- .../test_tutorial008.py | 4 +- .../test_tutorial009.py | 4 +- .../test_tutorial011.py | 4 +- .../test_tutorial015.py | 4 +- .../test_tutorial004.py | 4 +- 55 files changed, 801 insertions(+), 507 deletions(-) diff --git a/fastapi/encoders.py b/fastapi/encoders.py index dacd88d1cb..09653fd0e0 100644 --- a/fastapi/encoders.py +++ b/fastapi/encoders.py @@ -235,7 +235,11 @@ def jsonable_encoder( ) if sqlalchemy_safe: - result = {k: v for k, v in result.items() if not (isinstance(k, str) and k.startswith("_sa"))} + result = { + k: v + for k, v in result.items() + if not (isinstance(k, str) and k.startswith("_sa")) + } return result if dataclasses.is_dataclass(obj): assert not isinstance(obj, type) diff --git a/fastapi/security/http.py b/fastapi/security/http.py index c09a4d8b3e..f22079cbe6 100644 --- a/fastapi/security/http.py +++ b/fastapi/security/http.py @@ -315,6 +315,7 @@ class HTTPBearer(HTTPBase): return None return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials) + class HTTPCookieBearer(SecurityBase): """ Bearer token authentication via a named cookie (e.g. `access_token`). @@ -363,6 +364,7 @@ class HTTPCookieBearer(SecurityBase): return None return HTTPAuthorizationCredentials(scheme="Bearer", credentials=token) + class HTTPDigest(HTTPBase): """ HTTP Digest authentication. diff --git a/fastapi/security/oauth2.py b/fastapi/security/oauth2.py index 8af352bf7a..7f384c2ea4 100644 --- a/fastapi/security/oauth2.py +++ b/fastapi/security/oauth2.py @@ -1,3 +1,4 @@ +import secrets from typing import Annotated, Any, cast from annotated_doc import Doc @@ -8,9 +9,8 @@ from fastapi.param_functions import Form from fastapi.security.base import SecurityBase from fastapi.security.utils import get_authorization_scheme_param from starlette.requests import Request -from starlette.status import HTTP_401_UNAUTHORIZED from starlette.responses import RedirectResponse -import secrets +from starlette.status import HTTP_401_UNAUTHORIZED class OAuth2PasswordRequestForm: diff --git a/tests/test_application.py b/tests/test_application.py index 323fa9bae3..a83a67fdd5 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -982,7 +982,9 @@ def test_openapi_schema(): "in": "query", "required": False, "schema": { - "anyOf": [{"type": "integer"}, {"type": "null"}], "default": None, "title": "Query", + "anyOf": [{"type": "integer"}, {"type": "null"}], + "default": None, + "title": "Query", }, } ], diff --git a/tests/test_infer_param_optionality.py b/tests/test_infer_param_optionality.py index f8d9f0d8aa..1ba76f32f2 100644 --- a/tests/test_infer_param_optionality.py +++ b/tests/test_infer_param_optionality.py @@ -163,7 +163,9 @@ def test_openapi_schema(): "name": "user_id", "in": "query", "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "User Id", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "User Id", }, } ], @@ -201,7 +203,9 @@ def test_openapi_schema(): "name": "user_id", "in": "query", "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "User Id", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "User Id", }, }, ], diff --git a/tests/test_multi_query_errors.py b/tests/test_multi_query_errors.py index e716ac772d..9a33ac64d1 100644 --- a/tests/test_multi_query_errors.py +++ b/tests/test_multi_query_errors.py @@ -73,7 +73,9 @@ def test_openapi_schema(): "required": False, "schema": { "title": "Q", - "type": "array", "default": None, "items": {"type": "integer"}, + "type": "array", + "default": None, + "items": {"type": "integer"}, }, "name": "q", "in": "query", diff --git a/tests/test_openapi_examples.py b/tests/test_openapi_examples.py index d517794340..7ce5eb2dbe 100644 --- a/tests/test_openapi_examples.py +++ b/tests/test_openapi_examples.py @@ -255,7 +255,9 @@ def test_openapi_schema(): "examples": [ "json_schema_query1", "json_schema_query2", - ], "default": None, "title": "Data", + ], + "default": None, + "title": "Data", }, "examples": { "Query One": { @@ -299,7 +301,9 @@ def test_openapi_schema(): "examples": [ "json_schema_header1", "json_schema_header2", - ], "default": None, "title": "Data", + ], + "default": None, + "title": "Data", }, "examples": { "Header One": { @@ -343,7 +347,9 @@ def test_openapi_schema(): "examples": [ "json_schema_cookie1", "json_schema_cookie2", - ], "default": None, "title": "Data", + ], + "default": None, + "title": "Data", }, "examples": { "Cookie One": { diff --git a/tests/test_regex_deprecated_params.py b/tests/test_regex_deprecated_params.py index 56ee82d351..f87ed99640 100644 --- a/tests/test_regex_deprecated_params.py +++ b/tests/test_regex_deprecated_params.py @@ -83,7 +83,9 @@ def test_openapi_schema(): "anyOf": [ {"type": "string", "pattern": "^fixedquery$"}, {"type": "null"}, - ], "default": None, "title": "Q", + ], + "default": None, + "title": "Q", }, } ], diff --git a/tests/test_request_params/test_cookie/test_optional_str.py b/tests/test_request_params/test_cookie/test_optional_str.py index af78be9380..f53b821bdd 100644 --- a/tests/test_request_params/test_cookie/test_optional_str.py +++ b/tests/test_request_params/test_cookie/test_optional_str.py @@ -31,18 +31,20 @@ async def read_model_optional_str(p: Annotated[CookieModelOptionalStr, Cookie()] ["/optional-str", "/model-optional-str"], ) def test_optional_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "cookie", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "cookie", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P", + }, + } + ] + ) @pytest.mark.parametrize( @@ -93,18 +95,20 @@ async def read_model_optional_alias(p: Annotated[CookieModelOptionalAlias, Cooki ["/optional-alias", "/model-optional-alias"], ) def test_optional_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "cookie", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "cookie", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -172,18 +176,20 @@ def read_model_optional_validation_alias( ["/optional-validation-alias", "/model-optional-validation-alias"], ) def test_optional_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "cookie", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "cookie", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -259,18 +265,20 @@ def read_model_optional_alias_and_validation_alias( ], ) def test_optional_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "cookie", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "cookie", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_cookie/test_required_str.py b/tests/test_request_params/test_cookie/test_required_str.py index d40677a4de..16372c24b7 100644 --- a/tests/test_request_params/test_cookie/test_required_str.py +++ b/tests/test_request_params/test_cookie/test_required_str.py @@ -32,14 +32,16 @@ async def read_model_required_str(p: Annotated[CookieModelRequiredStr, Cookie()] ["/required-str", "/model-required-str"], ) def test_required_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "cookie", - "required": True, - "schema": {"type": "string", "title": "P"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "cookie", + "required": True, + "schema": {"type": "string", "title": "P"}, + } + ] + ) @pytest.mark.parametrize( @@ -97,14 +99,16 @@ async def read_model_required_alias(p: Annotated[CookieModelRequiredAlias, Cooki ["/required-alias", "/model-required-alias"], ) def test_required_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "cookie", - "required": True, - "schema": {"type": "string", "title": "P Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "cookie", + "required": True, + "schema": {"type": "string", "title": "P Alias"}, + } + ] + ) @pytest.mark.parametrize( @@ -196,14 +200,16 @@ def read_model_required_validation_alias( ["/required-validation-alias", "/model-required-validation-alias"], ) def test_required_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "cookie", - "required": True, - "schema": {"type": "string", "title": "P Val Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "cookie", + "required": True, + "schema": {"type": "string", "title": "P Val Alias"}, + } + ] + ) @pytest.mark.parametrize( @@ -303,14 +309,16 @@ def read_model_required_alias_and_validation_alias( ], ) def test_required_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "cookie", - "required": True, - "schema": {"type": "string", "title": "P Val Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "cookie", + "required": True, + "schema": {"type": "string", "title": "P Val Alias"}, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_header/test_list.py b/tests/test_request_params/test_header/test_list.py index 6e5f8a7b08..60413b68de 100644 --- a/tests/test_request_params/test_header/test_list.py +++ b/tests/test_request_params/test_header/test_list.py @@ -32,14 +32,16 @@ def read_model_required_list_str(p: Annotated[HeaderModelRequiredListStr, Header ["/required-list-str", "/model-required-list-str"], ) def test_required_list_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "header", - "required": True, - "schema": {"type": "array", "items": {"type": "string"}, "title": "P"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "header", + "required": True, + "schema": {"type": "array", "items": {"type": "string"}, "title": "P"}, + } + ] + ) @pytest.mark.parametrize( @@ -98,14 +100,20 @@ async def read_model_required_list_alias( ["/required-list-alias", "/model-required-list-alias"], ) def test_required_list_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "header", - "required": True, - "schema": {"type": "array", "items": {"type": "string"}, "title": "P Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "header", + "required": True, + "schema": { + "type": "array", + "items": {"type": "string"}, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -192,18 +200,20 @@ async def read_model_required_list_validation_alias( ["/required-list-validation-alias", "/model-required-list-validation-alias"], ) def test_required_list_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": True, - "schema": { - "type": "array", - "items": {"type": "string"}, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": True, + "schema": { + "type": "array", + "items": {"type": "string"}, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -300,18 +310,20 @@ def read_model_required_list_alias_and_validation_alias( ], ) def test_required_list_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": True, - "schema": { - "type": "array", - "items": {"type": "string"}, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": True, + "schema": { + "type": "array", + "items": {"type": "string"}, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_header/test_optional_list.py b/tests/test_request_params/test_header/test_optional_list.py index 9f0a5e4473..1d12dc70cd 100644 --- a/tests/test_request_params/test_header/test_optional_list.py +++ b/tests/test_request_params/test_header/test_optional_list.py @@ -35,18 +35,23 @@ async def read_model_optional_list_str( ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "header", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P", + }, + } + ] + ) @pytest.mark.parametrize( @@ -98,18 +103,23 @@ async def read_model_optional_list_alias( ["/optional-list-alias", "/model-optional-list-alias"], ) def test_optional_list_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "header", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -175,18 +185,23 @@ def read_model_optional_list_validation_alias( ["/optional-list-validation-alias", "/model-optional-list-validation-alias"], ) def test_optional_list_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -259,18 +274,23 @@ def read_model_optional_list_alias_and_validation_alias( ], ) def test_optional_list_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_header/test_optional_str.py b/tests/test_request_params/test_header/test_optional_str.py index 1914d6a6bd..8e4305884d 100644 --- a/tests/test_request_params/test_header/test_optional_str.py +++ b/tests/test_request_params/test_header/test_optional_str.py @@ -31,18 +31,20 @@ async def read_model_optional_str(p: Annotated[HeaderModelOptionalStr, Header()] ["/optional-str", "/model-optional-str"], ) def test_optional_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "header", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P", + }, + } + ] + ) @pytest.mark.parametrize( @@ -92,18 +94,20 @@ async def read_model_optional_alias(p: Annotated[HeaderModelOptionalAlias, Heade ["/optional-alias", "/model-optional-alias"], ) def test_optional_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "header", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -169,18 +173,20 @@ def read_model_optional_validation_alias( ["/optional-validation-alias", "/model-optional-validation-alias"], ) def test_optional_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -254,18 +260,20 @@ def read_model_optional_alias_and_validation_alias( ], ) def test_optional_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_header/test_required_str.py b/tests/test_request_params/test_header/test_required_str.py index 1863f9c6e8..0cb75bc7d5 100644 --- a/tests/test_request_params/test_header/test_required_str.py +++ b/tests/test_request_params/test_header/test_required_str.py @@ -32,14 +32,16 @@ async def read_model_required_str(p: Annotated[HeaderModelRequiredStr, Header()] ["/required-str", "/model-required-str"], ) def test_required_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "header", - "required": True, - "schema": {"type": "string", "title": "P"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "header", + "required": True, + "schema": {"type": "string", "title": "P"}, + } + ] + ) @pytest.mark.parametrize( @@ -96,14 +98,16 @@ async def read_model_required_alias(p: Annotated[HeaderModelRequiredAlias, Heade ["/required-alias", "/model-required-alias"], ) def test_required_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "header", - "required": True, - "schema": {"type": "string", "title": "P Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "header", + "required": True, + "schema": {"type": "string", "title": "P Alias"}, + } + ] + ) @pytest.mark.parametrize( @@ -190,14 +194,16 @@ def read_model_required_validation_alias( ["/required-validation-alias", "/model-required-validation-alias"], ) def test_required_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": True, - "schema": {"type": "string", "title": "P Val Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": True, + "schema": {"type": "string", "title": "P Val Alias"}, + } + ] + ) @pytest.mark.parametrize( @@ -295,14 +301,16 @@ def read_model_required_alias_and_validation_alias( ], ) def test_required_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "header", - "required": True, - "schema": {"type": "string", "title": "P Val Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "header", + "required": True, + "schema": {"type": "string", "title": "P Val Alias"}, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_query/test_list.py b/tests/test_request_params/test_query/test_list.py index 78821f5e49..c766f29d7d 100644 --- a/tests/test_request_params/test_query/test_list.py +++ b/tests/test_request_params/test_query/test_list.py @@ -32,14 +32,16 @@ def read_model_required_list_str(p: Annotated[QueryModelRequiredListStr, Query() ["/required-list-str", "/model-required-list-str"], ) def test_required_list_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "query", - "required": True, - "schema": {"type": "array", "items": {"type": "string"}, "title": "P"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "query", + "required": True, + "schema": {"type": "array", "items": {"type": "string"}, "title": "P"}, + } + ] + ) @pytest.mark.parametrize( @@ -98,14 +100,20 @@ async def read_model_required_list_alias( ["/required-list-alias", "/model-required-list-alias"], ) def test_required_list_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "query", - "required": True, - "schema": {"type": "array", "items": {"type": "string"}, "title": "P Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "query", + "required": True, + "schema": { + "type": "array", + "items": {"type": "string"}, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -192,18 +200,20 @@ async def read_model_required_list_validation_alias( ["/required-list-validation-alias", "/model-required-list-validation-alias"], ) def test_required_list_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": True, - "schema": { - "type": "array", - "items": {"type": "string"}, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": True, + "schema": { + "type": "array", + "items": {"type": "string"}, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -298,18 +308,20 @@ def read_model_required_list_alias_and_validation_alias( ], ) def test_required_list_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": True, - "schema": { - "type": "array", - "items": {"type": "string"}, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": True, + "schema": { + "type": "array", + "items": {"type": "string"}, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_query/test_optional_list.py b/tests/test_request_params/test_query/test_optional_list.py index e02d3256db..42aef2f639 100644 --- a/tests/test_request_params/test_query/test_optional_list.py +++ b/tests/test_request_params/test_query/test_optional_list.py @@ -35,18 +35,23 @@ async def read_model_optional_list_str( ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "query", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P", + }, + } + ] + ) @pytest.mark.parametrize( @@ -98,18 +103,23 @@ async def read_model_optional_list_alias( ["/optional-list-alias", "/model-optional-list-alias"], ) def test_optional_list_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "query", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -175,18 +185,23 @@ def read_model_optional_list_validation_alias( ["/optional-list-validation-alias", "/model-optional-list-validation-alias"], ) def test_optional_list_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -257,18 +272,23 @@ def read_model_optional_list_alias_and_validation_alias( ], ) def test_optional_list_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": False, + "schema": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "null"}, + ], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_query/test_optional_str.py b/tests/test_request_params/test_query/test_optional_str.py index b4e4f23b29..883c42529b 100644 --- a/tests/test_request_params/test_query/test_optional_str.py +++ b/tests/test_request_params/test_query/test_optional_str.py @@ -31,18 +31,20 @@ async def read_model_optional_str(p: Annotated[QueryModelOptionalStr, Query()]): ["/optional-str", "/model-optional-str"], ) def test_optional_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "query", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P", + }, + } + ] + ) @pytest.mark.parametrize( @@ -92,18 +94,20 @@ async def read_model_optional_alias(p: Annotated[QueryModelOptionalAlias, Query( ["/optional-alias", "/model-optional-alias"], ) def test_optional_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "query", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -169,18 +173,20 @@ def read_model_optional_validation_alias( ["/optional-validation-alias", "/model-optional-validation-alias"], ) def test_optional_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( @@ -254,18 +260,20 @@ def read_model_optional_alias_and_validation_alias( ], ) def test_optional_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": False, - "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], - "default": None, - "title": "P Val Alias", - }, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": False, + "schema": { + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "P Val Alias", + }, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_request_params/test_query/test_required_str.py b/tests/test_request_params/test_query/test_required_str.py index 2e0d6993ad..2426118010 100644 --- a/tests/test_request_params/test_query/test_required_str.py +++ b/tests/test_request_params/test_query/test_required_str.py @@ -32,14 +32,16 @@ async def read_model_required_str(p: Annotated[QueryModelRequiredStr, Query()]): ["/required-str", "/model-required-str"], ) def test_required_str_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p", - "in": "query", - "required": True, - "schema": {"type": "string", "title": "P"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p", + "in": "query", + "required": True, + "schema": {"type": "string", "title": "P"}, + } + ] + ) @pytest.mark.parametrize( @@ -96,14 +98,16 @@ async def read_model_required_alias(p: Annotated[QueryModelRequiredAlias, Query( ["/required-alias", "/model-required-alias"], ) def test_required_str_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_alias", - "in": "query", - "required": True, - "schema": {"type": "string", "title": "P Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_alias", + "in": "query", + "required": True, + "schema": {"type": "string", "title": "P Alias"}, + } + ] + ) @pytest.mark.parametrize( @@ -193,14 +197,16 @@ def read_model_required_validation_alias( ["/required-validation-alias", "/model-required-validation-alias"], ) def test_required_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": True, - "schema": {"type": "string", "title": "P Val Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": True, + "schema": {"type": "string", "title": "P Val Alias"}, + } + ] + ) @pytest.mark.parametrize( @@ -298,14 +304,16 @@ def read_model_required_alias_and_validation_alias( ], ) def test_required_alias_and_validation_alias_schema(path: str): - assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot([ - { - "name": "p_val_alias", - "in": "query", - "required": True, - "schema": {"type": "string", "title": "P Val Alias"}, - } -]) + assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot( + [ + { + "name": "p_val_alias", + "in": "query", + "required": True, + "schema": {"type": "string", "title": "P Val Alias"}, + } + ] + ) @pytest.mark.parametrize( diff --git a/tests/test_schema_extra_examples.py b/tests/test_schema_extra_examples.py index ae055c2b54..5d93086287 100644 --- a/tests/test_schema_extra_examples.py +++ b/tests/test_schema_extra_examples.py @@ -509,7 +509,9 @@ def test_openapi_schema(): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Data", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Data", }, "example": "query1", "name": "data", @@ -543,7 +545,9 @@ def test_openapi_schema(): "required": False, "schema": { "anyOf": [{"type": "string"}, {"type": "null"}], - "title": "Data", "default": None, "examples": ["query1", "query2"], + "title": "Data", + "default": None, + "examples": ["query1", "query2"], }, "name": "data", "in": "query", @@ -576,7 +580,9 @@ def test_openapi_schema(): "required": False, "schema": { "anyOf": [{"type": "string"}, {"type": "null"}], - "title": "Data", "default": None, "examples": ["query1", "query2"], + "title": "Data", + "default": None, + "examples": ["query1", "query2"], }, "example": "query_overridden", "name": "data", @@ -609,7 +615,9 @@ def test_openapi_schema(): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Data", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Data", }, "example": "header1", "name": "data", @@ -643,7 +651,9 @@ def test_openapi_schema(): "required": False, "schema": { "anyOf": [{"type": "string"}, {"type": "null"}], - "title": "Data", "default": None, "examples": ["header1", "header2"], + "title": "Data", + "default": None, + "examples": ["header1", "header2"], }, "name": "data", "in": "header", @@ -676,7 +686,9 @@ def test_openapi_schema(): "required": False, "schema": { "anyOf": [{"type": "string"}, {"type": "null"}], - "title": "Data", "default": None, "examples": ["header1", "header2"], + "title": "Data", + "default": None, + "examples": ["header1", "header2"], }, "example": "header_overridden", "name": "data", @@ -709,7 +721,9 @@ def test_openapi_schema(): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Data", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Data", }, "example": "cookie1", "name": "data", @@ -743,7 +757,9 @@ def test_openapi_schema(): "required": False, "schema": { "anyOf": [{"type": "string"}, {"type": "null"}], - "title": "Data", "default": None, "examples": ["cookie1", "cookie2"], + "title": "Data", + "default": None, + "examples": ["cookie1", "cookie2"], }, "name": "data", "in": "cookie", @@ -776,7 +792,9 @@ def test_openapi_schema(): "required": False, "schema": { "anyOf": [{"type": "string"}, {"type": "null"}], - "title": "Data", "default": None, "examples": ["cookie1", "cookie2"], + "title": "Data", + "default": None, + "examples": ["cookie1", "cookie2"], }, "example": "cookie_overridden", "name": "data", diff --git a/tests/test_sub_callbacks.py b/tests/test_sub_callbacks.py index 5f37ca2d5a..3169e50c1c 100644 --- a/tests/test_sub_callbacks.py +++ b/tests/test_sub_callbacks.py @@ -113,7 +113,9 @@ And this path operation will: { "required": False, "schema": { - "title": "Callback Url", "default": None, "anyOf": [ + "title": "Callback Url", + "default": None, + "anyOf": [ { "type": "string", "format": "uri", diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial002.py b/tests/test_tutorial/test_additional_responses/test_tutorial002.py index b2015c310f..6365eb041f 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial002.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial002.py @@ -82,7 +82,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "boolean"}, {"type": "null"}], "default": None, "title": "Img", + "anyOf": [{"type": "boolean"}, {"type": "null"}], + "default": None, + "title": "Img", }, "name": "img", "in": "query", diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial004.py b/tests/test_tutorial/test_additional_responses/test_tutorial004.py index eaba2232a7..0b96c41c65 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial004.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial004.py @@ -85,7 +85,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "boolean"}, {"type": "null"}], "default": None, "title": "Img", + "anyOf": [{"type": "boolean"}, {"type": "null"}], + "default": None, + "title": "Img", }, "name": "img", "in": "query", diff --git a/tests/test_tutorial/test_body/test_tutorial004.py b/tests/test_tutorial/test_body/test_tutorial004.py index 689e11d8d2..d77364574d 100644 --- a/tests/test_tutorial/test_body/test_tutorial004.py +++ b/tests/test_tutorial/test_body/test_tutorial004.py @@ -96,7 +96,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py b/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py index 485487fd3e..c399cb7ed5 100644 --- a/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py +++ b/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py @@ -106,7 +106,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", @@ -119,7 +121,9 @@ def test_openapi_schema(client: TestClient): "anyOf": [ {"$ref": "#/components/schemas/Item"}, {"type": "null"}, - ], "default": None, "title": "Item", + ], + "default": None, + "title": "Item", } } } diff --git a/tests/test_tutorial/test_body_multiple_params/test_tutorial004.py b/tests/test_tutorial/test_body_multiple_params/test_tutorial004.py index a3a94e518b..2bd905e59e 100644 --- a/tests/test_tutorial/test_body_multiple_params/test_tutorial004.py +++ b/tests/test_tutorial/test_body_multiple_params/test_tutorial004.py @@ -193,7 +193,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_cookie_param_models/test_tutorial001.py b/tests/test_tutorial/test_cookie_param_models/test_tutorial001.py index d23d2d7f8b..b44abe4392 100644 --- a/tests/test_tutorial/test_cookie_param_models/test_tutorial001.py +++ b/tests/test_tutorial/test_cookie_param_models/test_tutorial001.py @@ -92,21 +92,31 @@ def test_openapi_schema(client: TestClient): "name": "session_id", "in": "cookie", "required": True, - "schema": {"type": "string", "title": "Session Id"}, "example": None}, + "schema": {"type": "string", "title": "Session Id"}, + "example": None, + }, { "name": "fatebook_tracker", "in": "cookie", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Fatebook Tracker", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Fatebook Tracker", + }, + "example": None, + }, { "name": "googall_tracker", "in": "cookie", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Googall Tracker", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Googall Tracker", + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_cookie_param_models/test_tutorial002.py b/tests/test_tutorial/test_cookie_param_models/test_tutorial002.py index f644490e73..7afefc77ec 100644 --- a/tests/test_tutorial/test_cookie_param_models/test_tutorial002.py +++ b/tests/test_tutorial/test_cookie_param_models/test_tutorial002.py @@ -99,7 +99,9 @@ def test_openapi_schema(client: TestClient): "name": "session_id", "in": "cookie", "required": True, - "schema": {"type": "string", "title": "Session Id"}, "example": None}, + "schema": {"type": "string", "title": "Session Id"}, + "example": None, + }, { "name": "fatebook_tracker", "in": "cookie", @@ -108,15 +110,23 @@ def test_openapi_schema(client: TestClient): "anyOf": [ {"type": "string"}, {"type": "null"}, - ], "default": None, "title": "Fatebook Tracker", - }, "example": None}, + ], + "default": None, + "title": "Fatebook Tracker", + }, + "example": None, + }, { "name": "googall_tracker", "in": "cookie", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Googall Tracker", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Googall Tracker", + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_cookie_params/test_tutorial001.py b/tests/test_tutorial/test_cookie_params/test_tutorial001.py index 61bc9085d7..8a07327685 100644 --- a/tests/test_tutorial/test_cookie_params/test_tutorial001.py +++ b/tests/test_tutorial/test_cookie_params/test_tutorial001.py @@ -75,7 +75,9 @@ def test_openapi_schema(mod: ModuleType): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Ads Id", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Ads Id", }, "name": "ads_id", "in": "cookie", diff --git a/tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py b/tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py index 5bcb095fb2..64aa595824 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py @@ -70,7 +70,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", @@ -122,7 +124,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py b/tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py index 6ecdf9bc8c..59cc85d9c5 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py @@ -111,7 +111,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_dependencies/test_tutorial005.py b/tests/test_tutorial/test_dependencies/test_tutorial005.py index 70d97d7c9e..44270d941d 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial005.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial005.py @@ -86,7 +86,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Q", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Q", }, "name": "q", "in": "query", @@ -94,7 +96,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Last Query", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Last Query", }, "name": "last_query", "in": "cookie", diff --git a/tests/test_tutorial/test_header_param_models/test_tutorial001.py b/tests/test_tutorial/test_header_param_models/test_tutorial001.py index b4535b5c87..375d1fbb66 100644 --- a/tests/test_tutorial/test_header_param_models/test_tutorial001.py +++ b/tests/test_tutorial/test_header_param_models/test_tutorial001.py @@ -111,26 +111,38 @@ def test_openapi_schema(client: TestClient): "name": "host", "in": "header", "required": True, - "schema": {"type": "string", "title": "Host"}, "example": None}, + "schema": {"type": "string", "title": "Host"}, + "example": None, + }, { "name": "save-data", "in": "header", "required": True, - "schema": {"type": "boolean", "title": "Save Data"}, "example": None}, + "schema": {"type": "boolean", "title": "Save Data"}, + "example": None, + }, { "name": "if-modified-since", "in": "header", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "If Modified Since", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "If Modified Since", + }, + "example": None, + }, { "name": "traceparent", "in": "header", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Traceparent", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Traceparent", + }, + "example": None, + }, { "name": "x-tag", "in": "header", @@ -140,7 +152,9 @@ def test_openapi_schema(client: TestClient): "items": {"type": "string"}, "default": [], "title": "X Tag", - }, "example": None}, + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_header_param_models/test_tutorial002.py b/tests/test_tutorial/test_header_param_models/test_tutorial002.py index 58f3985de8..4eee936d72 100644 --- a/tests/test_tutorial/test_header_param_models/test_tutorial002.py +++ b/tests/test_tutorial/test_header_param_models/test_tutorial002.py @@ -108,26 +108,38 @@ def test_openapi_schema(client: TestClient): "name": "host", "in": "header", "required": True, - "schema": {"type": "string", "title": "Host"}, "example": None}, + "schema": {"type": "string", "title": "Host"}, + "example": None, + }, { "name": "save-data", "in": "header", "required": True, - "schema": {"type": "boolean", "title": "Save Data"}, "example": None}, + "schema": {"type": "boolean", "title": "Save Data"}, + "example": None, + }, { "name": "if-modified-since", "in": "header", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "If Modified Since", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "If Modified Since", + }, + "example": None, + }, { "name": "traceparent", "in": "header", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Traceparent", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Traceparent", + }, + "example": None, + }, { "name": "x-tag", "in": "header", @@ -137,7 +149,9 @@ def test_openapi_schema(client: TestClient): "items": {"type": "string"}, "default": [], "title": "X Tag", - }, "example": None}, + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_header_param_models/test_tutorial003.py b/tests/test_tutorial/test_header_param_models/test_tutorial003.py index 8298030503..74db15141a 100644 --- a/tests/test_tutorial/test_header_param_models/test_tutorial003.py +++ b/tests/test_tutorial/test_header_param_models/test_tutorial003.py @@ -148,26 +148,38 @@ def test_openapi_schema(client: TestClient): "name": "host", "in": "header", "required": True, - "schema": {"type": "string", "title": "Host"}, "example": None}, + "schema": {"type": "string", "title": "Host"}, + "example": None, + }, { "name": "save_data", "in": "header", "required": True, - "schema": {"type": "boolean", "title": "Save Data"}, "example": None}, + "schema": {"type": "boolean", "title": "Save Data"}, + "example": None, + }, { "name": "if_modified_since", "in": "header", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "If Modified Since", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "If Modified Since", + }, + "example": None, + }, { "name": "traceparent", "in": "header", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Traceparent", - }, "example": None}, + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Traceparent", + }, + "example": None, + }, { "name": "x_tag", "in": "header", @@ -177,7 +189,9 @@ def test_openapi_schema(client: TestClient): "items": {"type": "string"}, "default": [], "title": "X Tag", - }, "example": None}, + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_header_params/test_tutorial001.py b/tests/test_tutorial/test_header_params/test_tutorial001.py index 9887aeddfb..59d2c296c1 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial001.py +++ b/tests/test_tutorial/test_header_params/test_tutorial001.py @@ -67,7 +67,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "User-Agent", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "User-Agent", }, "name": "user-agent", "in": "header", diff --git a/tests/test_tutorial/test_header_params/test_tutorial002.py b/tests/test_tutorial/test_header_params/test_tutorial002.py index 0349e3d638..a3be13a46e 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial002.py +++ b/tests/test_tutorial/test_header_params/test_tutorial002.py @@ -78,7 +78,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Strange Header", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Strange Header", }, "name": "strange_header", "in": "header", diff --git a/tests/test_tutorial/test_header_params/test_tutorial003.py b/tests/test_tutorial/test_header_params/test_tutorial003.py index 6abb062890..965fdca600 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial003.py +++ b/tests/test_tutorial/test_header_params/test_tutorial003.py @@ -56,7 +56,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "title": "X-Token", "default": None, "anyOf": [ + "title": "X-Token", + "default": None, + "anyOf": [ {"type": "array", "items": {"type": "string"}}, {"type": "null"}, ], diff --git a/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py b/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py index 95a8889d0e..e303874b26 100644 --- a/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py +++ b/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py @@ -78,7 +78,9 @@ And this path operation will: "maxLength": 2083, }, {"type": "null"}, - ], "default": None, "title": "Callback Url", + ], + "default": None, + "title": "Callback Url", }, "name": "callback_url", "in": "query", diff --git a/tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py b/tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py index 893fad7f03..205a8f0b7e 100644 --- a/tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py +++ b/tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py @@ -81,7 +81,9 @@ def test_openapi_schema(client: TestClient): { "type": "null", }, - ], "default": None, "title": "Item-Query", + ], + "default": None, + "title": "Item-Query", }, "name": "item-query", "in": "query", diff --git a/tests/test_tutorial/test_query_param_models/test_tutorial001.py b/tests/test_tutorial/test_query_param_models/test_tutorial001.py index 7b4e4ccaba..5fcde6fecd 100644 --- a/tests/test_tutorial/test_query_param_models/test_tutorial001.py +++ b/tests/test_tutorial/test_query_param_models/test_tutorial001.py @@ -133,7 +133,9 @@ def test_openapi_schema(client: TestClient): "exclusiveMinimum": 0, "default": 100, "title": "Limit", - }, "example": None}, + }, + "example": None, + }, { "name": "offset", "in": "query", @@ -143,7 +145,9 @@ def test_openapi_schema(client: TestClient): "minimum": 0, "default": 0, "title": "Offset", - }, "example": None}, + }, + "example": None, + }, { "name": "order_by", "in": "query", @@ -153,7 +157,9 @@ def test_openapi_schema(client: TestClient): "type": "string", "default": "created_at", "title": "Order By", - }, "example": None}, + }, + "example": None, + }, { "name": "tags", "in": "query", @@ -163,7 +169,9 @@ def test_openapi_schema(client: TestClient): "items": {"type": "string"}, "default": [], "title": "Tags", - }, "example": None}, + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_query_param_models/test_tutorial002.py b/tests/test_tutorial/test_query_param_models/test_tutorial002.py index 14e77e57ea..498ff88e50 100644 --- a/tests/test_tutorial/test_query_param_models/test_tutorial002.py +++ b/tests/test_tutorial/test_query_param_models/test_tutorial002.py @@ -139,7 +139,9 @@ def test_openapi_schema(client: TestClient): "exclusiveMinimum": 0, "default": 100, "title": "Limit", - }, "example": None}, + }, + "example": None, + }, { "name": "offset", "in": "query", @@ -149,7 +151,9 @@ def test_openapi_schema(client: TestClient): "minimum": 0, "default": 0, "title": "Offset", - }, "example": None}, + }, + "example": None, + }, { "name": "order_by", "in": "query", @@ -159,7 +163,9 @@ def test_openapi_schema(client: TestClient): "type": "string", "default": "created_at", "title": "Order By", - }, "example": None}, + }, + "example": None, + }, { "name": "tags", "in": "query", @@ -169,7 +175,9 @@ def test_openapi_schema(client: TestClient): "items": {"type": "string"}, "default": [], "title": "Tags", - }, "example": None}, + }, + "example": None, + }, ], "responses": { "200": { diff --git a/tests/test_tutorial/test_query_params/test_tutorial002.py b/tests/test_tutorial/test_query_params/test_tutorial002.py index 8f5a974102..21b827daf1 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial002.py +++ b/tests/test_tutorial/test_query_params/test_tutorial002.py @@ -61,7 +61,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "title": "Q", "default": None, "anyOf": [ + "title": "Q", + "default": None, + "anyOf": [ { "type": "string", }, diff --git a/tests/test_tutorial/test_query_params/test_tutorial003.py b/tests/test_tutorial/test_query_params/test_tutorial003.py index ea88417567..4ff111c92a 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial003.py +++ b/tests/test_tutorial/test_query_params/test_tutorial003.py @@ -72,7 +72,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "title": "Q", "default": None, "anyOf": [ + "title": "Q", + "default": None, + "anyOf": [ { "type": "string", }, diff --git a/tests/test_tutorial/test_query_params/test_tutorial004.py b/tests/test_tutorial/test_query_params/test_tutorial004.py index 276ea04a5d..6c32a04f91 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial004.py +++ b/tests/test_tutorial/test_query_params/test_tutorial004.py @@ -80,7 +80,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "title": "Q", "default": None, "anyOf": [ + "title": "Q", + "default": None, + "anyOf": [ { "type": "string", }, diff --git a/tests/test_tutorial/test_query_params/test_tutorial006.py b/tests/test_tutorial/test_query_params/test_tutorial006.py index e1d72c5397..4a0421041f 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial006.py +++ b/tests/test_tutorial/test_query_params/test_tutorial006.py @@ -112,7 +112,9 @@ def test_openapi_schema(client: TestClient): { "required": False, "schema": { - "anyOf": [{"type": "integer"}, {"type": "null"}], "default": None, "title": "Limit", + "anyOf": [{"type": "integer"}, {"type": "null"}], + "default": None, + "title": "Limit", }, "name": "limit", "in": "query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py index 25b9684cbc..0837430c64 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py @@ -78,7 +78,9 @@ def test_openapi_schema(client: TestClient): "anyOf": [ {"type": "string"}, {"type": "null"}, - ], "default": None, "title": "Q", + ], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py index 8ac13c9b90..4f08b9b867 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py @@ -98,7 +98,9 @@ def test_openapi_schema(client: TestClient): "maxLength": 50, }, {"type": "null"}, - ], "default": None, "title": "Q", + ], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial003.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial003.py index 00b12cfe65..1e18c16645 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial003.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial003.py @@ -109,7 +109,9 @@ def test_openapi_schema(client: TestClient): "maxLength": 50, }, {"type": "null"}, - ], "default": None, "title": "Q", + ], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial004.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial004.py index fa06c8a59c..8188048928 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial004.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial004.py @@ -94,7 +94,9 @@ def test_openapi_schema(client: TestClient): "pattern": "^fixedquery$", }, {"type": "null"}, - ], "default": None, "title": "Q", + ], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial007.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial007.py index e01a1df854..45098ced5c 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial007.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial007.py @@ -93,7 +93,9 @@ def test_openapi_schema(client: TestClient): }, {"type": "null"}, ], - "title": "Query string", "default": None}, + "title": "Query string", + "default": None, + }, "name": "q", "in": "query", } diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py index 40291e8171..be13f25f6a 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py @@ -95,7 +95,9 @@ def test_openapi_schema(client: TestClient): {"type": "null"}, ], "title": "Query string", - "description": "Query string for the items to search in the database that have a good match", "default": None}, + "description": "Query string for the items to search in the database that have a good match", + "default": None, + }, "name": "q", "in": "query", } diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial009.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial009.py index 784fb95820..7e741e652b 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial009.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial009.py @@ -78,7 +78,9 @@ def test_openapi_schema(client: TestClient): "anyOf": [ {"type": "string"}, {"type": "null"}, - ], "default": None, "title": "Item-Query", + ], + "default": None, + "title": "Item-Query", }, "required": False, "name": "item-query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py index d2bbdf29ba..d30a18d809 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py @@ -72,7 +72,9 @@ def test_openapi_schema(client: TestClient): "anyOf": [ {"type": "array", "items": {"type": "string"}}, {"type": "null"}, - ], "default": None, "title": "Q", + ], + "default": None, + "title": "Q", }, "name": "q", "in": "query", diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py index 3caa9132b1..b0bedd8d8e 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py @@ -80,7 +80,9 @@ def test_openapi_schema(client: TestClient): "in": "query", "required": False, "schema": { - "anyOf": [{"type": "string"}, {"type": "null"}], "default": None, "title": "Id", + "anyOf": [{"type": "string"}, {"type": "null"}], + "default": None, + "title": "Id", }, } ], diff --git a/tests/test_tutorial/test_server_sent_events/test_tutorial004.py b/tests/test_tutorial/test_server_sent_events/test_tutorial004.py index 579e0fa84b..9689cb4832 100644 --- a/tests/test_tutorial/test_server_sent_events/test_tutorial004.py +++ b/tests/test_tutorial/test_server_sent_events/test_tutorial004.py @@ -86,7 +86,9 @@ def test_openapi_schema(client: TestClient): "in": "header", "required": False, "schema": { - "anyOf": [{"type": "integer"}, {"type": "null"}], "default": None, "title": "Last-Event-Id", + "anyOf": [{"type": "integer"}, {"type": "null"}], + "default": None, + "title": "Last-Event-Id", }, } ],