From b8a617d62f635e409c22e6a5faca4057be622cc4 Mon Sep 17 00:00:00 2001 From: majiayu000 <1835304752@qq.com> Date: Sun, 14 Dec 2025 17:02:12 +0800 Subject: [PATCH] Update ValidationError schema for Pydantic V2 compatibility Add input, ctx, and url fields to the ValidationError OpenAPI definition to accurately reflect the actual error structure returned by Pydantic V2. Pydantic V2 validation errors include additional fields: - input: The value that failed validation - ctx: Additional context about the error (optional) - url: Documentation URL for the error type (optional) Fixes #10787 --- fastapi/openapi/utils.py | 3 +++ tests/test_additional_properties.py | 3 +++ tests/test_additional_properties_bool.py | 3 +++ ...onal_responses_custom_model_in_callback.py | 3 +++ ...ional_responses_default_validationerror.py | 3 +++ tests/test_annotated.py | 3 +++ tests/test_application.py | 3 +++ tests/test_compat_params_v1.py | 3 +++ tests/test_dependency_duplicates.py | 3 +++ tests/test_enforce_once_required_parameter.py | 3 +++ tests/test_extra_routes.py | 3 +++ .../test_filter_pydantic_sub_model_pv1.py | 3 +++ tests/test_filter_pydantic_sub_model_pv2.py | 3 +++ tests/test_forms_single_param.py | 3 +++ tests/test_generate_unique_id_function.py | 21 +++++++++++++++++++ ...t_get_model_definitions_formfeed_escape.py | 3 +++ tests/test_get_request_body.py | 3 +++ .../test_include_router_defaults_overrides.py | 3 +++ tests/test_infer_param_optionality.py | 3 +++ .../test_modules_same_name_body/test_main.py | 3 +++ tests/test_multi_body_errors.py | 3 +++ tests/test_multi_query_errors.py | 3 +++ tests/test_no_schema_split.py | 3 +++ tests/test_openapi_examples.py | 3 +++ .../test_openapi_query_parameter_extension.py | 3 +++ ...t_openapi_separate_input_output_schemas.py | 6 ++++++ tests/test_param_in_path_and_dependency.py | 3 +++ tests/test_param_include_in_schema.py | 3 +++ tests/test_put_no_body.py | 3 +++ tests/test_pydantic_v1_v2_01.py | 3 +++ tests/test_pydantic_v1_v2_list.py | 3 +++ tests/test_pydantic_v1_v2_mixed.py | 3 +++ .../test_multifile.py | 6 ++++++ tests/test_pydantic_v1_v2_noneable.py | 3 +++ tests/test_regex_deprecated_body.py | 3 +++ tests/test_regex_deprecated_params.py | 3 +++ tests/test_repeated_dependency_schema.py | 3 +++ tests/test_repeated_parameter_alias.py | 3 +++ tests/test_reponse_set_reponse_code_empty.py | 3 +++ ...test_request_body_parameters_media_type.py | 3 +++ tests/test_schema_extra_examples.py | 3 +++ tests/test_security_oauth2.py | 3 +++ tests/test_security_oauth2_optional.py | 3 +++ ...st_security_oauth2_optional_description.py | 3 +++ tests/test_starlette_exception.py | 3 +++ tests/test_sub_callbacks.py | 3 +++ tests/test_tuples.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_tutorial003.py | 3 +++ .../test_tutorial004.py | 3 +++ .../test_bigger_applications/test_main.py | 3 +++ .../test_body/test_tutorial001.py | 3 +++ .../test_body_fields/test_tutorial001.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial003.py | 3 +++ .../test_tutorial009.py | 3 +++ .../test_body_updates/test_tutorial001.py | 6 ++++++ .../test_tutorial001.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_cookie_params/test_tutorial001.py | 3 +++ .../test_dataclasses/test_tutorial001.py | 3 +++ .../test_dataclasses/test_tutorial003.py | 6 ++++++ .../test_dependencies/test_tutorial001.py | 3 +++ .../test_dependencies/test_tutorial004.py | 3 +++ .../test_dependencies/test_tutorial006.py | 3 +++ .../test_dependencies/test_tutorial012.py | 3 +++ .../test_events/test_tutorial001.py | 3 +++ .../test_events/test_tutorial003.py | 3 +++ .../test_extra_data_types/test_tutorial001.py | 3 +++ .../test_extra_models/test_tutorial003.py | 3 +++ .../test_generate_clients/test_tutorial003.py | 3 +++ .../test_handling_errors/test_tutorial001.py | 3 +++ .../test_handling_errors/test_tutorial002.py | 3 +++ .../test_handling_errors/test_tutorial003.py | 3 +++ .../test_handling_errors/test_tutorial004.py | 3 +++ .../test_handling_errors/test_tutorial005.py | 3 +++ .../test_handling_errors/test_tutorial006.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_tutorial003.py | 3 +++ .../test_header_params/test_tutorial001.py | 3 +++ .../test_header_params/test_tutorial002.py | 3 +++ .../test_header_params/test_tutorial003.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_openapi_webhooks/test_tutorial001.py | 3 +++ .../test_tutorial004.py | 6 ++++++ .../test_tutorial005.py | 6 ++++++ .../test_path_params/test_tutorial004.py | 3 +++ .../test_path_params/test_tutorial005.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_tutorial003.py | 3 +++ .../test_tutorial004.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_query_params/test_tutorial005.py | 3 +++ .../test_query_params/test_tutorial006.py | 3 +++ .../test_tutorial010.py | 3 +++ .../test_tutorial011.py | 3 +++ .../test_tutorial012.py | 3 +++ .../test_tutorial013.py | 3 +++ .../test_tutorial014.py | 3 +++ .../test_tutorial015.py | 3 +++ .../test_request_files/test_tutorial001.py | 3 +++ .../test_request_files/test_tutorial001_02.py | 3 +++ .../test_request_files/test_tutorial001_03.py | 3 +++ .../test_request_files/test_tutorial002.py | 3 +++ .../test_request_files/test_tutorial003.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_tutorial002_pv1.py | 3 +++ .../test_request_forms/test_tutorial001.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial001.py | 6 ++++++ .../test_response_model/test_tutorial003.py | 3 +++ .../test_tutorial003_01.py | 3 +++ .../test_tutorial003_02.py | 3 +++ .../test_tutorial003_05.py | 3 +++ .../test_response_model/test_tutorial004.py | 3 +++ .../test_response_model/test_tutorial005.py | 3 +++ .../test_response_model/test_tutorial006.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial001_pv1.py | 3 +++ .../test_tutorial004.py | 3 +++ .../test_tutorial005.py | 3 +++ .../test_security/test_tutorial003.py | 3 +++ .../test_security/test_tutorial005.py | 3 +++ .../test_tutorial001.py | 3 +++ .../test_tutorial002.py | 3 +++ .../test_sql_databases/test_tutorial001.py | 3 +++ .../test_sql_databases/test_tutorial002.py | 3 +++ .../test_tutorial001.py | 3 +++ tests/test_union_body.py | 3 +++ tests/test_union_body_discriminator.py | 3 +++ ...test_union_body_discriminator_annotated.py | 3 +++ tests/test_union_forms.py | 3 +++ tests/test_union_inherited_body.py | 3 +++ tests/test_webhooks_security.py | 3 +++ 138 files changed, 453 insertions(+) diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index 9fe2044f2..293bef8c6 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -50,6 +50,9 @@ validation_error_definition = { }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": ["loc", "msg", "type"], } diff --git a/tests/test_additional_properties.py b/tests/test_additional_properties.py index be14d10ed..2fdfdeaba 100644 --- a/tests/test_additional_properties.py +++ b/tests/test_additional_properties.py @@ -91,6 +91,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_additional_properties_bool.py b/tests/test_additional_properties_bool.py index de59e48ce..391b38c4a 100644 --- a/tests/test_additional_properties_bool.py +++ b/tests/test_additional_properties_bool.py @@ -123,6 +123,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_additional_responses_custom_model_in_callback.py b/tests/test_additional_responses_custom_model_in_callback.py index 2ad575455..e11e8bec8 100644 --- a/tests/test_additional_responses_custom_model_in_callback.py +++ b/tests/test_additional_responses_custom_model_in_callback.py @@ -145,6 +145,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_additional_responses_default_validationerror.py b/tests/test_additional_responses_default_validationerror.py index 153f04f57..d4ab2d2e5 100644 --- a/tests/test_additional_responses_default_validationerror.py +++ b/tests/test_additional_responses_default_validationerror.py @@ -66,6 +66,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_annotated.py b/tests/test_annotated.py index 473d33e52..ead3297bf 100644 --- a/tests/test_annotated.py +++ b/tests/test_annotated.py @@ -305,6 +305,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_application.py b/tests/test_application.py index 8f1b0a18d..14aa631e2 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -1269,6 +1269,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_compat_params_v1.py b/tests/test_compat_params_v1.py index 7064761cb..24c4dd214 100644 --- a/tests/test_compat_params_v1.py +++ b/tests/test_compat_params_v1.py @@ -1111,6 +1111,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_dependency_duplicates.py b/tests/test_dependency_duplicates.py index 8e8d07c2d..51faa757c 100644 --- a/tests/test_dependency_duplicates.py +++ b/tests/test_dependency_duplicates.py @@ -239,6 +239,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_enforce_once_required_parameter.py b/tests/test_enforce_once_required_parameter.py index 2e5ac6c06..9cd53f8fa 100644 --- a/tests/test_enforce_once_required_parameter.py +++ b/tests/test_enforce_once_required_parameter.py @@ -49,6 +49,9 @@ expected_schema = { }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": ["loc", "msg", "type"], "title": "ValidationError", diff --git a/tests/test_extra_routes.py b/tests/test_extra_routes.py index bd16fe925..912c8ce80 100644 --- a/tests/test_extra_routes.py +++ b/tests/test_extra_routes.py @@ -352,6 +352,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py b/tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py index 48732dbf0..abe6cf8a0 100644 --- a/tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py +++ b/tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py @@ -123,6 +123,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_filter_pydantic_sub_model_pv2.py b/tests/test_filter_pydantic_sub_model_pv2.py index 2e2c26ddc..816802d75 100644 --- a/tests/test_filter_pydantic_sub_model_pv2.py +++ b/tests/test_filter_pydantic_sub_model_pv2.py @@ -177,6 +177,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_forms_single_param.py b/tests/test_forms_single_param.py index 3bb951441..2de37052c 100644 --- a/tests/test_forms_single_param.py +++ b/tests/test_forms_single_param.py @@ -89,6 +89,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_generate_unique_id_function.py b/tests/test_generate_unique_id_function.py index 5aeec6636..aa053047b 100644 --- a/tests/test_generate_unique_id_function.py +++ b/tests/test_generate_unique_id_function.py @@ -223,6 +223,9 @@ def test_top_level_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -424,6 +427,9 @@ def test_router_overrides_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -625,6 +631,9 @@ def test_router_include_overrides_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -899,6 +908,9 @@ def test_subrouter_top_level_include_overrides_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -1103,6 +1115,9 @@ def test_router_path_operation_overrides_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -1311,6 +1326,9 @@ def test_app_path_operation_overrides_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -1597,6 +1615,9 @@ def test_callback_override_generate_unique_id(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_get_model_definitions_formfeed_escape.py b/tests/test_get_model_definitions_formfeed_escape.py index 6601585ef..bddfae7cd 100644 --- a/tests/test_get_model_definitions_formfeed_escape.py +++ b/tests/test_get_model_definitions_formfeed_escape.py @@ -81,6 +81,9 @@ openapi_schema = { }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": ["loc", "msg", "type"], "title": "ValidationError", diff --git a/tests/test_get_request_body.py b/tests/test_get_request_body.py index cc567b88f..62f8a37a0 100644 --- a/tests/test_get_request_body.py +++ b/tests/test_get_request_body.py @@ -100,6 +100,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_include_router_defaults_overrides.py b/tests/test_include_router_defaults_overrides.py index 33baa25e6..8af56a564 100644 --- a/tests/test_include_router_defaults_overrides.py +++ b/tests/test_include_router_defaults_overrides.py @@ -7290,6 +7290,9 @@ def test_openapi(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_infer_param_optionality.py b/tests/test_infer_param_optionality.py index e3d57bb42..67108aac8 100644 --- a/tests/test_infer_param_optionality.py +++ b/tests/test_infer_param_optionality.py @@ -350,6 +350,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_modules_same_name_body/test_main.py b/tests/test_modules_same_name_body/test_main.py index 263d87df2..6f5e11aeb 100644 --- a/tests/test_modules_same_name_body/test_main.py +++ b/tests/test_modules_same_name_body/test_main.py @@ -131,6 +131,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_multi_body_errors.py b/tests/test_multi_body_errors.py index 33304827a..8caa3d155 100644 --- a/tests/test_multi_body_errors.py +++ b/tests/test_multi_body_errors.py @@ -221,6 +221,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_multi_query_errors.py b/tests/test_multi_query_errors.py index 8162d986c..85ec13690 100644 --- a/tests/test_multi_query_errors.py +++ b/tests/test_multi_query_errors.py @@ -118,6 +118,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_no_schema_split.py b/tests/test_no_schema_split.py index b0b5958c1..0de7719cb 100644 --- a/tests/test_no_schema_split.py +++ b/tests/test_no_schema_split.py @@ -192,6 +192,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_openapi_examples.py b/tests/test_openapi_examples.py index b3f83ae23..26357d668 100644 --- a/tests/test_openapi_examples.py +++ b/tests/test_openapi_examples.py @@ -461,6 +461,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_openapi_query_parameter_extension.py b/tests/test_openapi_query_parameter_extension.py index dc7147c71..02e41bde3 100644 --- a/tests/test_openapi_query_parameter_extension.py +++ b/tests/test_openapi_query_parameter_extension.py @@ -130,6 +130,9 @@ def test_openapi(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_openapi_separate_input_output_schemas.py b/tests/test_openapi_separate_input_output_schemas.py index c9a05418b..de1a608a9 100644 --- a/tests/test_openapi_separate_input_output_schemas.py +++ b/tests/test_openapi_separate_input_output_schemas.py @@ -438,6 +438,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], @@ -670,6 +673,9 @@ def test_openapi_schema_no_separate(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_param_in_path_and_dependency.py b/tests/test_param_in_path_and_dependency.py index 08eb0f40f..f2e0b4497 100644 --- a/tests/test_param_in_path_and_dependency.py +++ b/tests/test_param_in_path_and_dependency.py @@ -86,6 +86,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_param_include_in_schema.py b/tests/test_param_include_in_schema.py index f461947c9..0560583cc 100644 --- a/tests/test_param_include_in_schema.py +++ b/tests/test_param_include_in_schema.py @@ -151,6 +151,9 @@ openapi_schema = { }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_put_no_body.py b/tests/test_put_no_body.py index 8f4c82532..e72a6f214 100644 --- a/tests/test_put_no_body.py +++ b/tests/test_put_no_body.py @@ -78,6 +78,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_pydantic_v1_v2_01.py b/tests/test_pydantic_v1_v2_01.py index 769e5fab6..7b51c6371 100644 --- a/tests/test_pydantic_v1_v2_01.py +++ b/tests/test_pydantic_v1_v2_01.py @@ -464,6 +464,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_pydantic_v1_v2_list.py b/tests/test_pydantic_v1_v2_list.py index 64f3dd344..0d99813e9 100644 --- a/tests/test_pydantic_v1_v2_list.py +++ b/tests/test_pydantic_v1_v2_list.py @@ -690,6 +690,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_pydantic_v1_v2_mixed.py b/tests/test_pydantic_v1_v2_mixed.py index 54d408827..107fde138 100644 --- a/tests/test_pydantic_v1_v2_mixed.py +++ b/tests/test_pydantic_v1_v2_mixed.py @@ -1488,6 +1488,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_pydantic_v1_v2_multifile/test_multifile.py b/tests/test_pydantic_v1_v2_multifile/test_multifile.py index e66d102fb..f943c4c3f 100644 --- a/tests/test_pydantic_v1_v2_multifile/test_multifile.py +++ b/tests/test_pydantic_v1_v2_multifile/test_multifile.py @@ -831,6 +831,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], @@ -1042,6 +1045,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_pydantic_v1_v2_noneable.py b/tests/test_pydantic_v1_v2_noneable.py index d2d6f6635..8d9d65e55 100644 --- a/tests/test_pydantic_v1_v2_noneable.py +++ b/tests/test_pydantic_v1_v2_noneable.py @@ -755,6 +755,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_regex_deprecated_body.py b/tests/test_regex_deprecated_body.py index 74654ff3c..9f7389d15 100644 --- a/tests/test_regex_deprecated_body.py +++ b/tests/test_regex_deprecated_body.py @@ -170,6 +170,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_regex_deprecated_params.py b/tests/test_regex_deprecated_params.py index 2ce64c686..4684259a5 100644 --- a/tests/test_regex_deprecated_params.py +++ b/tests/test_regex_deprecated_params.py @@ -153,6 +153,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_repeated_dependency_schema.py b/tests/test_repeated_dependency_schema.py index c21829bd9..6879aa2b5 100644 --- a/tests/test_repeated_dependency_schema.py +++ b/tests/test_repeated_dependency_schema.py @@ -42,6 +42,9 @@ schema = { }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": ["loc", "msg", "type"], "title": "ValidationError", diff --git a/tests/test_repeated_parameter_alias.py b/tests/test_repeated_parameter_alias.py index fd72eaab2..d1cdd17c5 100644 --- a/tests/test_repeated_parameter_alias.py +++ b/tests/test_repeated_parameter_alias.py @@ -50,6 +50,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": ["loc", "msg", "type"], "title": "ValidationError", diff --git a/tests/test_reponse_set_reponse_code_empty.py b/tests/test_reponse_set_reponse_code_empty.py index bf3aa758c..041afa6d2 100644 --- a/tests/test_reponse_set_reponse_code_empty.py +++ b/tests/test_reponse_set_reponse_code_empty.py @@ -90,6 +90,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_request_body_parameters_media_type.py b/tests/test_request_body_parameters_media_type.py index 8c72fee54..7938ee2fe 100644 --- a/tests/test_request_body_parameters_media_type.py +++ b/tests/test_request_body_parameters_media_type.py @@ -170,6 +170,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_schema_extra_examples.py b/tests/test_schema_extra_examples.py index b313f47e9..0ac12e105 100644 --- a/tests/test_schema_extra_examples.py +++ b/tests/test_schema_extra_examples.py @@ -959,6 +959,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_security_oauth2.py b/tests/test_security_oauth2.py index 804e4152d..7da407e4d 100644 --- a/tests/test_security_oauth2.py +++ b/tests/test_security_oauth2.py @@ -300,6 +300,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_security_oauth2_optional.py b/tests/test_security_oauth2_optional.py index 046ac5763..8a6a6d498 100644 --- a/tests/test_security_oauth2_optional.py +++ b/tests/test_security_oauth2_optional.py @@ -303,6 +303,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_security_oauth2_optional_description.py b/tests/test_security_oauth2_optional_description.py index 629cddca2..59dec869b 100644 --- a/tests/test_security_oauth2_optional_description.py +++ b/tests/test_security_oauth2_optional_description.py @@ -304,6 +304,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_starlette_exception.py b/tests/test_starlette_exception.py index 229fe8016..e93586492 100644 --- a/tests/test_starlette_exception.py +++ b/tests/test_starlette_exception.py @@ -184,6 +184,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_sub_callbacks.py b/tests/test_sub_callbacks.py index ed7f4efe8..f27721493 100644 --- a/tests/test_sub_callbacks.py +++ b/tests/test_sub_callbacks.py @@ -305,6 +305,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tuples.py b/tests/test_tuples.py index ca33d2580..476d03cd3 100644 --- a/tests/test_tuples.py +++ b/tests/test_tuples.py @@ -303,6 +303,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial001.py b/tests/test_tutorial/test_additional_responses/test_tutorial001.py index 3afeaff84..2d571f7a3 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial001.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial001.py @@ -98,6 +98,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial002.py b/tests/test_tutorial/test_additional_responses/test_tutorial002.py index 91d6ff101..3ccfaa3e2 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial002.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial002.py @@ -122,6 +122,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial003.py b/tests/test_tutorial/test_additional_responses/test_tutorial003.py index bd34d2938..0126903e8 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial003.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial003.py @@ -102,6 +102,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial004.py b/tests/test_tutorial/test_additional_responses/test_tutorial004.py index 2d9491467..055d45956 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial004.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial004.py @@ -125,6 +125,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_bigger_applications/test_main.py b/tests/test_tutorial/test_bigger_applications/test_main.py index fe40fad7d..2d5278e40 100644 --- a/tests/test_tutorial/test_bigger_applications/test_main.py +++ b/tests/test_tutorial/test_bigger_applications/test_main.py @@ -719,6 +719,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_body/test_tutorial001.py b/tests/test_tutorial/test_body/test_tutorial001.py index f8b5aee8d..1badc5740 100644 --- a/tests/test_tutorial/test_body/test_tutorial001.py +++ b/tests/test_tutorial/test_body/test_tutorial001.py @@ -471,6 +471,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001.py b/tests/test_tutorial/test_body_fields/test_tutorial001.py index fb68f2868..7d239bcd5 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001.py @@ -198,6 +198,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { 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 142405595..4efcaa746 100644 --- a/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py +++ b/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py @@ -201,6 +201,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py b/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py index d18ceae48..b31678561 100644 --- a/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py +++ b/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py @@ -268,6 +268,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_body_nested_models/test_tutorial009.py b/tests/test_tutorial/test_body_nested_models/test_tutorial009.py index 38ba3c887..822d5e412 100644 --- a/tests/test_tutorial/test_body_nested_models/test_tutorial009.py +++ b/tests/test_tutorial/test_body_nested_models/test_tutorial009.py @@ -115,6 +115,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_body_updates/test_tutorial001.py b/tests/test_tutorial/test_body_updates/test_tutorial001.py index f874dc9bd..9c307f2af 100644 --- a/tests/test_tutorial/test_body_updates/test_tutorial001.py +++ b/tests/test_tutorial/test_body_updates/test_tutorial001.py @@ -170,6 +170,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { @@ -304,6 +307,9 @@ def test_openapi_schema_pv1(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { 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 60643185a..fbd776c5c 100644 --- a/tests/test_tutorial/test_cookie_param_models/test_tutorial001.py +++ b/tests/test_tutorial/test_cookie_param_models/test_tutorial001.py @@ -194,6 +194,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], 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 cef6f6630..314fe2e0e 100644 --- a/tests/test_tutorial/test_cookie_param_models/test_tutorial002.py +++ b/tests/test_tutorial/test_cookie_param_models/test_tutorial002.py @@ -232,6 +232,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_cookie_params/test_tutorial001.py b/tests/test_tutorial/test_cookie_params/test_tutorial001.py index 90e8dfd37..8d5d396d5 100644 --- a/tests/test_tutorial/test_cookie_params/test_tutorial001.py +++ b/tests/test_tutorial/test_cookie_params/test_tutorial001.py @@ -109,6 +109,9 @@ def test_openapi_schema(mod: ModuleType): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_dataclasses/test_tutorial001.py b/tests/test_tutorial/test_dataclasses/test_tutorial001.py index b36dee768..0b9049067 100644 --- a/tests/test_tutorial/test_dataclasses/test_tutorial001.py +++ b/tests/test_tutorial/test_dataclasses/test_tutorial001.py @@ -155,6 +155,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_dataclasses/test_tutorial003.py b/tests/test_tutorial/test_dataclasses/test_tutorial003.py index 5728d2b6b..9a3d74431 100644 --- a/tests/test_tutorial/test_dataclasses/test_tutorial003.py +++ b/tests/test_tutorial/test_dataclasses/test_tutorial003.py @@ -197,6 +197,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } @@ -331,6 +334,9 @@ def test_openapi_schema_pv1(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_dependencies/test_tutorial001.py b/tests/test_tutorial/test_dependencies/test_tutorial001.py index ed9944912..cee5f3f05 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial001.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial001.py @@ -182,6 +182,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_dependencies/test_tutorial004.py b/tests/test_tutorial/test_dependencies/test_tutorial004.py index 8221c83d4..166e111d2 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial004.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial004.py @@ -161,6 +161,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_dependencies/test_tutorial006.py b/tests/test_tutorial/test_dependencies/test_tutorial006.py index 4530762f7..4888ab76c 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial006.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial006.py @@ -147,6 +147,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_dependencies/test_tutorial012.py b/tests/test_tutorial/test_dependencies/test_tutorial012.py index 0af17e9bc..5328be0ce 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial012.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial012.py @@ -259,6 +259,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_events/test_tutorial001.py b/tests/test_tutorial/test_events/test_tutorial001.py index f65b92d12..db90df9b4 100644 --- a/tests/test_tutorial/test_events/test_tutorial001.py +++ b/tests/test_tutorial/test_events/test_tutorial001.py @@ -72,6 +72,9 @@ def test_openapi_schema(app: FastAPI): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_events/test_tutorial003.py b/tests/test_tutorial/test_events/test_tutorial003.py index 0ad1a1f8b..841a3006f 100644 --- a/tests/test_tutorial/test_events/test_tutorial003.py +++ b/tests/test_tutorial/test_events/test_tutorial003.py @@ -85,6 +85,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_extra_data_types/test_tutorial001.py b/tests/test_tutorial/test_extra_data_types/test_tutorial001.py index b816c9cab..5cf1b78d6 100644 --- a/tests/test_tutorial/test_extra_data_types/test_tutorial001.py +++ b/tests/test_tutorial/test_extra_data_types/test_tutorial001.py @@ -175,6 +175,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_extra_models/test_tutorial003.py b/tests/test_tutorial/test_extra_models/test_tutorial003.py index 73aa29903..6734489d3 100644 --- a/tests/test_tutorial/test_extra_models/test_tutorial003.py +++ b/tests/test_tutorial/test_extra_models/test_tutorial003.py @@ -131,6 +131,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_generate_clients/test_tutorial003.py b/tests/test_tutorial/test_generate_clients/test_tutorial003.py index 1cd9678a1..05d684d24 100644 --- a/tests/test_tutorial/test_generate_clients/test_tutorial003.py +++ b/tests/test_tutorial/test_generate_clients/test_tutorial003.py @@ -180,6 +180,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial001.py b/tests/test_tutorial/test_handling_errors/test_tutorial001.py index 8809c135b..4af43d1d2 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial001.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial001.py @@ -72,6 +72,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial002.py b/tests/test_tutorial/test_handling_errors/test_tutorial002.py index efd86ebde..50e002d79 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial002.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial002.py @@ -72,6 +72,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial003.py b/tests/test_tutorial/test_handling_errors/test_tutorial003.py index 4763f68f3..eef8157f5 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial003.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial003.py @@ -73,6 +73,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial004.py b/tests/test_tutorial/test_handling_errors/test_tutorial004.py index c04bf3724..929b600df 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial004.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial004.py @@ -78,6 +78,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial005.py b/tests/test_tutorial/test_handling_errors/test_tutorial005.py index 581b2e4c7..9b05e6189 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial005.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial005.py @@ -117,6 +117,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial006.py b/tests/test_tutorial/test_handling_errors/test_tutorial006.py index 7d2f553aa..d561ce7eb 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial006.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial006.py @@ -100,6 +100,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { 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 bc876897b..870e511bf 100644 --- a/tests/test_tutorial/test_header_param_models/test_tutorial001.py +++ b/tests/test_tutorial/test_header_param_models/test_tutorial001.py @@ -227,6 +227,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], 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 0615521c4..951a2aee5 100644 --- a/tests/test_tutorial/test_header_param_models/test_tutorial002.py +++ b/tests/test_tutorial/test_header_param_models/test_tutorial002.py @@ -238,6 +238,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], 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 554a48d2e..c5ea851f5 100644 --- a/tests/test_tutorial/test_header_param_models/test_tutorial003.py +++ b/tests/test_tutorial/test_header_param_models/test_tutorial003.py @@ -274,6 +274,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_header_params/test_tutorial001.py b/tests/test_tutorial/test_header_params/test_tutorial001.py index d6f7fe618..ca0887607 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial001.py +++ b/tests/test_tutorial/test_header_params/test_tutorial001.py @@ -100,6 +100,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_header_params/test_tutorial002.py b/tests/test_tutorial/test_header_params/test_tutorial002.py index 7158f8651..355c9c514 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial002.py +++ b/tests/test_tutorial/test_header_params/test_tutorial002.py @@ -112,6 +112,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_header_params/test_tutorial003.py b/tests/test_tutorial/test_header_params/test_tutorial003.py index 473b96123..4a702c691 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial003.py +++ b/tests/test_tutorial/test_header_params/test_tutorial003.py @@ -124,6 +124,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py b/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py index 2df2b9889..6650cd63c 100644 --- a/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py +++ b/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py @@ -214,6 +214,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py b/tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py index dc67ec401..9bf84c218 100644 --- a/tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py +++ b/tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py @@ -107,6 +107,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py index da5782d18..33dc56c57 100644 --- a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py +++ b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py @@ -120,6 +120,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { @@ -217,6 +220,9 @@ def test_openapi_schema_pv1(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py b/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py index 0742f5d0e..feeaaca8e 100644 --- a/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py +++ b/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py @@ -119,6 +119,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { @@ -216,6 +219,9 @@ def test_openapi_schema_pv1(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_path_params/test_tutorial004.py b/tests/test_tutorial/test_path_params/test_tutorial004.py index acbeaca76..a70516c30 100644 --- a/tests/test_tutorial/test_path_params/test_tutorial004.py +++ b/tests/test_tutorial/test_path_params/test_tutorial004.py @@ -73,6 +73,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_path_params/test_tutorial005.py b/tests/test_tutorial/test_path_params/test_tutorial005.py index 2e4b0146b..f881cc0da 100644 --- a/tests/test_tutorial/test_path_params/test_tutorial005.py +++ b/tests/test_tutorial/test_path_params/test_tutorial005.py @@ -136,6 +136,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial002.py b/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial002.py index a402c663d..80df8cee9 100644 --- a/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial002.py +++ b/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial002.py @@ -129,6 +129,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial003.py b/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial003.py index 03155c924..83909e04a 100644 --- a/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial003.py +++ b/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial003.py @@ -143,6 +143,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial004.py b/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial004.py index d2e204dda..fb20c3c40 100644 --- a/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial004.py +++ b/tests/test_tutorial/test_pydantic_v1_in_v2/test_tutorial004.py @@ -142,6 +142,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], 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 5b7bc7b42..5e773e45d 100644 --- a/tests/test_tutorial/test_query_param_models/test_tutorial001.py +++ b/tests/test_tutorial/test_query_param_models/test_tutorial001.py @@ -249,6 +249,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], 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 4432c9d8a..ba98d374b 100644 --- a/tests/test_tutorial/test_query_param_models/test_tutorial002.py +++ b/tests/test_tutorial/test_query_param_models/test_tutorial002.py @@ -271,6 +271,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_query_params/test_tutorial005.py b/tests/test_tutorial/test_query_params/test_tutorial005.py index 05ae85b45..b72fd72e0 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial005.py +++ b/tests/test_tutorial/test_query_params/test_tutorial005.py @@ -100,6 +100,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_query_params/test_tutorial006.py b/tests/test_tutorial/test_query_params/test_tutorial006.py index a0b5ef494..61e5a9b61 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial006.py +++ b/tests/test_tutorial/test_query_params/test_tutorial006.py @@ -167,6 +167,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py index e08e16963..3f77cec7c 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py @@ -165,6 +165,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { 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 f4da25752..0d448c6e3 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 @@ -111,6 +111,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py index 549a90519..d1230bd1c 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py @@ -97,6 +97,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py index f2f5f7a85..cfcf89af2 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py @@ -96,6 +96,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial014.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial014.py index edd40bb1a..aa5e01b3a 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial014.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial014.py @@ -94,6 +94,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } 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 ae1c40286..e3f970426 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 @@ -132,6 +132,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_request_files/test_tutorial001.py b/tests/test_tutorial/test_request_files/test_tutorial001.py index b06919961..ca4bde594 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial001.py +++ b/tests/test_tutorial/test_request_files/test_tutorial001.py @@ -213,6 +213,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_request_files/test_tutorial001_02.py b/tests/test_tutorial/test_request_files/test_tutorial001_02.py index 9075a1756..bbe037624 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial001_02.py +++ b/tests/test_tutorial/test_request_files/test_tutorial001_02.py @@ -218,6 +218,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_request_files/test_tutorial001_03.py b/tests/test_tutorial/test_request_files/test_tutorial001_03.py index 9fbe2166c..bbdb2e7a2 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial001_03.py +++ b/tests/test_tutorial/test_request_files/test_tutorial001_03.py @@ -166,6 +166,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_request_files/test_tutorial002.py b/tests/test_tutorial/test_request_files/test_tutorial002.py index 446a87657..e234f5fa7 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial002.py +++ b/tests/test_tutorial/test_request_files/test_tutorial002.py @@ -254,6 +254,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_request_files/test_tutorial003.py b/tests/test_tutorial/test_request_files/test_tutorial003.py index 8534ba3e9..a27eae4f9 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial003.py +++ b/tests/test_tutorial/test_request_files/test_tutorial003.py @@ -210,6 +210,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_request_form_models/test_tutorial001.py b/tests/test_tutorial/test_request_form_models/test_tutorial001.py index 1ca3c96d3..a2928d75c 100644 --- a/tests/test_tutorial/test_request_form_models/test_tutorial001.py +++ b/tests/test_tutorial/test_request_form_models/test_tutorial001.py @@ -225,6 +225,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_request_form_models/test_tutorial002.py b/tests/test_tutorial/test_request_form_models/test_tutorial002.py index b3f6be63a..17284b588 100644 --- a/tests/test_tutorial/test_request_form_models/test_tutorial002.py +++ b/tests/test_tutorial/test_request_form_models/test_tutorial002.py @@ -187,6 +187,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py b/tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py index b503f23a5..bf9935a4f 100644 --- a/tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py +++ b/tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py @@ -187,6 +187,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_request_forms/test_tutorial001.py b/tests/test_tutorial/test_request_forms/test_tutorial001.py index 321f8022b..6a09d2a90 100644 --- a/tests/test_tutorial/test_request_forms/test_tutorial001.py +++ b/tests/test_tutorial/test_request_forms/test_tutorial001.py @@ -227,6 +227,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py b/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py index d12219245..8533b2507 100644 --- a/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py +++ b/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py @@ -302,6 +302,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_response_directly/test_tutorial001.py b/tests/test_tutorial/test_response_directly/test_tutorial001.py index 2cc4f3b0c..24a52aa1a 100644 --- a/tests/test_tutorial/test_response_directly/test_tutorial001.py +++ b/tests/test_tutorial/test_response_directly/test_tutorial001.py @@ -143,6 +143,9 @@ def test_openapi_schema_pv2(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": ["loc", "msg", "type"], "title": "ValidationError", @@ -274,6 +277,9 @@ def test_openapi_schema_pv1(client: TestClient): "title": "Error Type", "type": "string", }, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": [ "loc", diff --git a/tests/test_tutorial/test_response_model/test_tutorial003.py b/tests/test_tutorial/test_response_model/test_tutorial003.py index 70cfd6e4c..4893de4ed 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial003.py +++ b/tests/test_tutorial/test_response_model/test_tutorial003.py @@ -148,6 +148,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_response_model/test_tutorial003_01.py b/tests/test_tutorial/test_response_model/test_tutorial003_01.py index 3975856b6..1477372d8 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial003_01.py +++ b/tests/test_tutorial/test_response_model/test_tutorial003_01.py @@ -159,6 +159,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_response_model/test_tutorial003_02.py b/tests/test_tutorial/test_response_model/test_tutorial003_02.py index eabd20345..8b129e94b 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial003_02.py +++ b/tests/test_tutorial/test_response_model/test_tutorial003_02.py @@ -86,6 +86,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_response_model/test_tutorial003_05.py b/tests/test_tutorial/test_response_model/test_tutorial003_05.py index 9500852e1..5ad2f68de 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial003_05.py +++ b/tests/test_tutorial/test_response_model/test_tutorial003_05.py @@ -101,6 +101,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_response_model/test_tutorial004.py b/tests/test_tutorial/test_response_model/test_tutorial004.py index 449a52b81..d8750dd96 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial004.py +++ b/tests/test_tutorial/test_response_model/test_tutorial004.py @@ -136,6 +136,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_response_model/test_tutorial005.py b/tests/test_tutorial/test_response_model/test_tutorial005.py index a633a3fdd..c18e3200f 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial005.py +++ b/tests/test_tutorial/test_response_model/test_tutorial005.py @@ -153,6 +153,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_response_model/test_tutorial006.py b/tests/test_tutorial/test_response_model/test_tutorial006.py index 863522d1b..50cab6281 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial006.py +++ b/tests/test_tutorial/test_response_model/test_tutorial006.py @@ -153,6 +153,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_schema_extra_example/test_tutorial001.py b/tests/test_tutorial/test_schema_extra_example/test_tutorial001.py index c21cbb4bc..f93c9a8c8 100644 --- a/tests/test_tutorial/test_schema_extra_example/test_tutorial001.py +++ b/tests/test_tutorial/test_schema_extra_example/test_tutorial001.py @@ -131,6 +131,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py b/tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py index b79f42e64..c0f083c91 100644 --- a/tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py +++ b/tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py @@ -125,6 +125,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_schema_extra_example/test_tutorial004.py b/tests/test_tutorial/test_schema_extra_example/test_tutorial004.py index 61aefd12a..bde1a6278 100644 --- a/tests/test_tutorial/test_schema_extra_example/test_tutorial004.py +++ b/tests/test_tutorial/test_schema_extra_example/test_tutorial004.py @@ -178,6 +178,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_schema_extra_example/test_tutorial005.py b/tests/test_tutorial/test_schema_extra_example/test_tutorial005.py index 12859227b..94682880d 100644 --- a/tests/test_tutorial/test_schema_extra_example/test_tutorial005.py +++ b/tests/test_tutorial/test_schema_extra_example/test_tutorial005.py @@ -172,6 +172,9 @@ def test_openapi_schema(client: TestClient) -> None: }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, } diff --git a/tests/test_tutorial/test_security/test_tutorial003.py b/tests/test_tutorial/test_security/test_tutorial003.py index 6b8735113..a5a0c2dac 100644 --- a/tests/test_tutorial/test_security/test_tutorial003.py +++ b/tests/test_tutorial/test_security/test_tutorial003.py @@ -210,6 +210,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_security/test_tutorial005.py b/tests/test_tutorial/test_security/test_tutorial005.py index ad644d61b..67d8d99e1 100644 --- a/tests/test_tutorial/test_security/test_tutorial005.py +++ b/tests/test_tutorial/test_security/test_tutorial005.py @@ -424,6 +424,9 @@ def test_openapi_schema(mod: ModuleType): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py b/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py index 059fb889b..5d3e33816 100644 --- a/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py +++ b/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py @@ -132,6 +132,9 @@ def test_openapi_schema(client: TestClient) -> None: }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py b/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py index cc9afeab7..9469dfb67 100644 --- a/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py +++ b/tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py @@ -132,6 +132,9 @@ def test_openapi_schema(client: TestClient) -> None: }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_sql_databases/test_tutorial001.py b/tests/test_tutorial/test_sql_databases/test_tutorial001.py index b45be4884..824d39814 100644 --- a/tests/test_tutorial/test_sql_databases/test_tutorial001.py +++ b/tests/test_tutorial/test_sql_databases/test_tutorial001.py @@ -364,6 +364,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_sql_databases/test_tutorial002.py b/tests/test_tutorial/test_sql_databases/test_tutorial002.py index da0b8b7ce..c30504ed9 100644 --- a/tests/test_tutorial/test_sql_databases/test_tutorial002.py +++ b/tests/test_tutorial/test_sql_databases/test_tutorial002.py @@ -472,6 +472,9 @@ def test_openapi_schema(client: TestClient): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_tutorial/test_using_request_directly/test_tutorial001.py b/tests/test_tutorial/test_using_request_directly/test_tutorial001.py index 54c53ae1e..bbd115729 100644 --- a/tests/test_tutorial/test_using_request_directly/test_tutorial001.py +++ b/tests/test_tutorial/test_using_request_directly/test_tutorial001.py @@ -98,6 +98,9 @@ def test_openapi(): "title": "Error Type", "type": "string", }, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "required": [ "loc", diff --git a/tests/test_union_body.py b/tests/test_union_body.py index c15acacd1..37501a15a 100644 --- a/tests/test_union_body.py +++ b/tests/test_union_body.py @@ -118,6 +118,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_union_body_discriminator.py b/tests/test_union_body_discriminator.py index 6af9e1d22..8c45f76c7 100644 --- a/tests/test_union_body_discriminator.py +++ b/tests/test_union_body_discriminator.py @@ -177,6 +177,9 @@ def test_discriminator_pydantic_v2() -> None: }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_union_body_discriminator_annotated.py b/tests/test_union_body_discriminator_annotated.py index 14145e6f6..4c83008ce 100644 --- a/tests/test_union_body_discriminator_annotated.py +++ b/tests/test_union_body_discriminator_annotated.py @@ -196,6 +196,9 @@ def test_openapi_schema(client: TestClient) -> None: }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_union_forms.py b/tests/test_union_forms.py index cbe98ea82..ce7818f80 100644 --- a/tests/test_union_forms.py +++ b/tests/test_union_forms.py @@ -146,6 +146,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"], diff --git a/tests/test_union_inherited_body.py b/tests/test_union_inherited_body.py index ef75d459e..18e1b59e7 100644 --- a/tests/test_union_inherited_body.py +++ b/tests/test_union_inherited_body.py @@ -130,6 +130,9 @@ def test_openapi_schema(): }, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, }, "HTTPValidationError": { diff --git a/tests/test_webhooks_security.py b/tests/test_webhooks_security.py index 21a694cb5..ed29c22ab 100644 --- a/tests/test_webhooks_security.py +++ b/tests/test_webhooks_security.py @@ -115,6 +115,9 @@ def test_openapi_schema(): }, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, + "input": {"title": "Input"}, + "ctx": {"title": "Context", "type": "object"}, + "url": {"title": "Error URL", "type": "string", "format": "uri"}, }, "type": "object", "required": ["loc", "msg", "type"],