Browse Source

🐛 Update `ValidationError` schema to include `input` and `ctx` (#14791)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
pull/14818/head
Jonathan Fulton 4 months ago
committed by GitHub
parent
commit
75c47187f3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      fastapi/openapi/utils.py
  2. 2
      tests/test_additional_properties.py
  3. 2
      tests/test_additional_properties_bool.py
  4. 2
      tests/test_additional_responses_custom_model_in_callback.py
  5. 2
      tests/test_additional_responses_default_validationerror.py
  6. 2
      tests/test_annotated.py
  7. 2
      tests/test_application.py
  8. 2
      tests/test_dependency_duplicates.py
  9. 2
      tests/test_enforce_once_required_parameter.py
  10. 2
      tests/test_extra_routes.py
  11. 2
      tests/test_filter_pydantic_sub_model_pv2.py
  12. 2
      tests/test_forms_single_param.py
  13. 14
      tests/test_generate_unique_id_function.py
  14. 2
      tests/test_get_model_definitions_formfeed_escape.py
  15. 2
      tests/test_get_request_body.py
  16. 2
      tests/test_include_router_defaults_overrides.py
  17. 2
      tests/test_infer_param_optionality.py
  18. 2
      tests/test_modules_same_name_body/test_main.py
  19. 2
      tests/test_multi_body_errors.py
  20. 2
      tests/test_multi_query_errors.py
  21. 2
      tests/test_no_schema_split.py
  22. 2
      tests/test_openapi_examples.py
  23. 2
      tests/test_openapi_query_parameter_extension.py
  24. 4
      tests/test_openapi_separate_input_output_schemas.py
  25. 2
      tests/test_param_in_path_and_dependency.py
  26. 2
      tests/test_param_include_in_schema.py
  27. 2
      tests/test_put_no_body.py
  28. 2
      tests/test_regex_deprecated_body.py
  29. 2
      tests/test_regex_deprecated_params.py
  30. 2
      tests/test_repeated_dependency_schema.py
  31. 2
      tests/test_repeated_parameter_alias.py
  32. 2
      tests/test_reponse_set_reponse_code_empty.py
  33. 2
      tests/test_request_body_parameters_media_type.py
  34. 2
      tests/test_schema_extra_examples.py
  35. 2
      tests/test_security_oauth2.py
  36. 2
      tests/test_security_oauth2_optional.py
  37. 2
      tests/test_security_oauth2_optional_description.py
  38. 2
      tests/test_starlette_exception.py
  39. 2
      tests/test_sub_callbacks.py
  40. 2
      tests/test_tuples.py
  41. 2
      tests/test_tutorial/test_additional_responses/test_tutorial001.py
  42. 2
      tests/test_tutorial/test_additional_responses/test_tutorial002.py
  43. 2
      tests/test_tutorial/test_additional_responses/test_tutorial003.py
  44. 2
      tests/test_tutorial/test_additional_responses/test_tutorial004.py
  45. 2
      tests/test_tutorial/test_bigger_applications/test_main.py
  46. 2
      tests/test_tutorial/test_body/test_tutorial001.py
  47. 2
      tests/test_tutorial/test_body/test_tutorial002.py
  48. 2
      tests/test_tutorial/test_body/test_tutorial003.py
  49. 2
      tests/test_tutorial/test_body/test_tutorial004.py
  50. 2
      tests/test_tutorial/test_body_fields/test_tutorial001.py
  51. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial001.py
  52. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial002.py
  53. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
  54. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial004.py
  55. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial005.py
  56. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py
  57. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial004.py
  58. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial005.py
  59. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial006.py
  60. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial007.py
  61. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial008.py
  62. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial009.py
  63. 2
      tests/test_tutorial/test_body_updates/test_tutorial001.py
  64. 2
      tests/test_tutorial/test_body_updates/test_tutorial002.py
  65. 2
      tests/test_tutorial/test_cookie_param_models/test_tutorial001.py
  66. 2
      tests/test_tutorial/test_cookie_param_models/test_tutorial002.py
  67. 2
      tests/test_tutorial/test_cookie_params/test_tutorial001.py
  68. 2
      tests/test_tutorial/test_dataclasses/test_tutorial001.py
  69. 2
      tests/test_tutorial/test_dataclasses/test_tutorial003.py
  70. 2
      tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py
  71. 2
      tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py
  72. 2
      tests/test_tutorial/test_dependencies/test_tutorial005.py
  73. 2
      tests/test_tutorial/test_dependencies/test_tutorial006.py
  74. 2
      tests/test_tutorial/test_dependencies/test_tutorial011.py
  75. 2
      tests/test_tutorial/test_dependencies/test_tutorial012.py
  76. 2
      tests/test_tutorial/test_encoder/test_tutorial001.py
  77. 2
      tests/test_tutorial/test_events/test_tutorial001.py
  78. 2
      tests/test_tutorial/test_events/test_tutorial003.py
  79. 2
      tests/test_tutorial/test_extra_data_types/test_tutorial001.py
  80. 2
      tests/test_tutorial/test_extra_models/test_tutorial001_tutorial002.py
  81. 2
      tests/test_tutorial/test_extra_models/test_tutorial003.py
  82. 2
      tests/test_tutorial/test_generate_clients/test_tutorial001.py
  83. 2
      tests/test_tutorial/test_generate_clients/test_tutorial002.py
  84. 2
      tests/test_tutorial/test_generate_clients/test_tutorial003.py
  85. 2
      tests/test_tutorial/test_generate_clients/test_tutorial004.py
  86. 2
      tests/test_tutorial/test_handling_errors/test_tutorial001.py
  87. 2
      tests/test_tutorial/test_handling_errors/test_tutorial002.py
  88. 2
      tests/test_tutorial/test_handling_errors/test_tutorial003.py
  89. 2
      tests/test_tutorial/test_handling_errors/test_tutorial004.py
  90. 2
      tests/test_tutorial/test_handling_errors/test_tutorial005.py
  91. 2
      tests/test_tutorial/test_handling_errors/test_tutorial006.py
  92. 2
      tests/test_tutorial/test_header_param_models/test_tutorial001.py
  93. 2
      tests/test_tutorial/test_header_param_models/test_tutorial002.py
  94. 2
      tests/test_tutorial/test_header_param_models/test_tutorial003.py
  95. 2
      tests/test_tutorial/test_header_params/test_tutorial001.py
  96. 2
      tests/test_tutorial/test_header_params/test_tutorial002.py
  97. 2
      tests/test_tutorial/test_header_params/test_tutorial003.py
  98. 2
      tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py
  99. 2
      tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py
  100. 2
      tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py

2
fastapi/openapi/utils.py

@ -50,6 +50,8 @@ validation_error_definition = {
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
"required": ["loc", "msg", "type"],
}

2
tests/test_additional_properties.py

@ -89,6 +89,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_additional_properties_bool.py

@ -101,6 +101,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_additional_responses_custom_model_in_callback.py

@ -128,6 +128,8 @@ def test_openapi_schema():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_additional_responses_default_validationerror.py

@ -66,6 +66,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_annotated.py

@ -284,6 +284,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_application.py

@ -1260,6 +1260,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_dependency_duplicates.py

@ -223,6 +223,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_enforce_once_required_parameter.py

@ -42,6 +42,8 @@ expected_schema = {
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
"title": "Location",

2
tests/test_extra_routes.py

@ -347,6 +347,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_filter_pydantic_sub_model_pv2.py

@ -165,6 +165,8 @@ def test_openapi_schema(client: TestClient):
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_forms_single_param.py

@ -81,6 +81,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

14
tests/test_generate_unique_id_function.py

@ -213,6 +213,8 @@ def test_top_level_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",
@ -414,6 +416,8 @@ def test_router_overrides_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",
@ -615,6 +619,8 @@ def test_router_include_overrides_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",
@ -889,6 +895,8 @@ def test_subrouter_top_level_include_overrides_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",
@ -1093,6 +1101,8 @@ def test_router_path_operation_overrides_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",
@ -1301,6 +1311,8 @@ def test_app_path_operation_overrides_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",
@ -1587,6 +1599,8 @@ def test_callback_override_generate_unique_id():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_get_model_definitions_formfeed_escape.py

@ -98,6 +98,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_get_request_body.py

@ -100,6 +100,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_include_router_defaults_overrides.py

@ -7290,6 +7290,8 @@ def test_openapi():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_infer_param_optionality.py

@ -325,6 +325,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_modules_same_name_body/test_main.py

@ -131,6 +131,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_multi_body_errors.py

@ -167,6 +167,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_multi_query_errors.py

@ -97,6 +97,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_no_schema_split.py

@ -154,6 +154,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_openapi_examples.py

@ -398,6 +398,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_openapi_query_parameter_extension.py

@ -119,6 +119,8 @@ def test_openapi():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

4
tests/test_openapi_separate_input_output_schemas.py

@ -418,6 +418,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]
@ -649,6 +651,8 @@ def test_openapi_schema_no_separate():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_param_in_path_and_dependency.py

@ -86,6 +86,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_param_include_in_schema.py

@ -151,6 +151,8 @@ openapi_schema = {
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_put_no_body.py

@ -78,6 +78,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_regex_deprecated_body.py

@ -132,6 +132,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_regex_deprecated_params.py

@ -121,6 +121,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_repeated_dependency_schema.py

@ -35,6 +35,8 @@ schema = {
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
"title": "Location",

2
tests/test_repeated_parameter_alias.py

@ -41,6 +41,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_reponse_set_reponse_code_empty.py

@ -90,6 +90,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_request_body_parameters_media_type.py

@ -168,6 +168,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_schema_extra_examples.py

@ -845,6 +845,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_security_oauth2.py

@ -237,6 +237,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_security_oauth2_optional.py

@ -240,6 +240,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_security_oauth2_optional_description.py

@ -241,6 +241,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_starlette_exception.py

@ -184,6 +184,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_sub_callbacks.py

@ -277,6 +277,8 @@ def test_openapi_schema():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_tuples.py

@ -262,6 +262,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_tutorial/test_additional_responses/test_tutorial001.py

@ -98,6 +98,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_additional_responses/test_tutorial002.py

@ -115,6 +115,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_additional_responses/test_tutorial003.py

@ -102,6 +102,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_additional_responses/test_tutorial004.py

@ -118,6 +118,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_bigger_applications/test_main.py

@ -593,6 +593,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_body/test_tutorial001.py

@ -328,6 +328,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body/test_tutorial002.py

@ -143,6 +143,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body/test_tutorial003.py

@ -153,6 +153,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body/test_tutorial004.py

@ -164,6 +164,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_fields/test_tutorial001.py

@ -166,6 +166,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

@ -162,6 +162,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_multiple_params/test_tutorial002.py

@ -325,6 +325,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [

2
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

@ -202,6 +202,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_multiple_params/test_tutorial004.py

@ -272,6 +272,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_multiple_params/test_tutorial005.py

@ -236,6 +236,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [

2
tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py

@ -233,6 +233,8 @@ def test_openapi_schema(client: TestClient, mod_name: str):
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_nested_models/test_tutorial004.py

@ -257,6 +257,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_nested_models/test_tutorial005.py

@ -283,6 +283,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_nested_models/test_tutorial006.py

@ -251,6 +251,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_nested_models/test_tutorial007.py

@ -326,6 +326,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_nested_models/test_tutorial008.py

@ -139,6 +139,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_nested_models/test_tutorial009.py

@ -98,6 +98,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_updates/test_tutorial001.py

@ -168,6 +168,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_body_updates/test_tutorial002.py

@ -189,6 +189,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_cookie_param_models/test_tutorial001.py

@ -151,6 +151,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_tutorial/test_cookie_param_models/test_tutorial002.py

@ -161,6 +161,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_tutorial/test_cookie_params/test_tutorial001.py

@ -101,6 +101,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_dataclasses/test_tutorial001.py

@ -129,6 +129,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_dataclasses/test_tutorial003.py

@ -195,6 +195,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py

@ -170,6 +170,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py

@ -161,6 +161,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_dependencies/test_tutorial005.py

@ -121,6 +121,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_dependencies/test_tutorial006.py

@ -125,6 +125,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_dependencies/test_tutorial011.py

@ -102,6 +102,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_dependencies/test_tutorial012.py

@ -219,6 +219,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_encoder/test_tutorial001.py

@ -172,6 +172,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [

2
tests/test_tutorial/test_events/test_tutorial001.py

@ -63,6 +63,8 @@ def test_openapi_schema(app: FastAPI):
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_tutorial/test_events/test_tutorial003.py

@ -76,6 +76,8 @@ def test_openapi_schema():
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_tutorial/test_extra_data_types/test_tutorial001.py

@ -133,6 +133,8 @@ def test_openapi_schema(client: TestClient):
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_tutorial/test_extra_models/test_tutorial001_tutorial002.py

@ -138,6 +138,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_extra_models/test_tutorial003.py

@ -127,6 +127,8 @@ def test_openapi_schema(client: TestClient):
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"title": "Location",
"type": "array",

2
tests/test_tutorial/test_generate_clients/test_tutorial001.py

@ -135,6 +135,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_generate_clients/test_tutorial002.py

@ -180,6 +180,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_tutorial/test_generate_clients/test_tutorial003.py

@ -180,6 +180,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_tutorial/test_generate_clients/test_tutorial004.py

@ -82,6 +82,8 @@ def test_remove_tags(tmp_path: pathlib.Path):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [

2
tests/test_tutorial/test_handling_errors/test_tutorial001.py

@ -72,6 +72,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_handling_errors/test_tutorial002.py

@ -72,6 +72,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_handling_errors/test_tutorial003.py

@ -73,6 +73,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_handling_errors/test_tutorial004.py

@ -78,6 +78,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_handling_errors/test_tutorial005.py

@ -102,6 +102,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
}

2
tests/test_tutorial/test_handling_errors/test_tutorial006.py

@ -86,6 +86,8 @@ def test_openapi_schema():
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
"input": {"title": "Input"},
"ctx": {"title": "Context", "type": "object"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_header_param_models/test_tutorial001.py

@ -187,6 +187,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_tutorial/test_header_param_models/test_tutorial002.py

@ -184,6 +184,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_tutorial/test_header_param_models/test_tutorial003.py

@ -224,6 +224,8 @@ def test_openapi_schema(client: TestClient):
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_tutorial/test_header_params/test_tutorial001.py

@ -93,6 +93,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_header_params/test_tutorial002.py

@ -104,6 +104,8 @@ 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"},
},
},
"HTTPValidationError": {

2
tests/test_tutorial/test_header_params/test_tutorial003.py

@ -112,6 +112,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

@ -195,6 +195,8 @@ 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"},
},
},
}

2
tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py

@ -98,6 +98,8 @@ def test_openapi_schema():
},
"ValidationError": {
"properties": {
"ctx": {"title": "Context", "type": "object"},
"input": {"title": "Input"},
"loc": {
"items": {
"anyOf": [{"type": "string"}, {"type": "integer"}]

2
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py

@ -118,6 +118,8 @@ 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"},
},
},
"HTTPValidationError": {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save