Browse Source

🐛 Fix JSON Schema for `ValidationError` at field `loc` (#3810)

Co-authored-by: Devin Conathan <[email protected]>
pull/4806/head
dconathan 3 years ago
committed by GitHub
parent
commit
c449ae5c74
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      fastapi/openapi/utils.py
  2. 2
      tests/test_additional_properties.py
  3. 2
      tests/test_additional_responses_custom_model_in_callback.py
  4. 2
      tests/test_additional_responses_default_validationerror.py
  5. 2
      tests/test_application.py
  6. 2
      tests/test_dependency_duplicates.py
  7. 2
      tests/test_extra_routes.py
  8. 2
      tests/test_filter_pydantic_sub_model.py
  9. 2
      tests/test_get_request_body.py
  10. 2
      tests/test_include_router_defaults_overrides.py
  11. 2
      tests/test_modules_same_name_body/test_main.py
  12. 2
      tests/test_multi_body_errors.py
  13. 2
      tests/test_multi_query_errors.py
  14. 2
      tests/test_param_in_path_and_dependency.py
  15. 2
      tests/test_put_no_body.py
  16. 2
      tests/test_repeated_dependency_schema.py
  17. 2
      tests/test_schema_extra_examples.py
  18. 2
      tests/test_security_oauth2.py
  19. 2
      tests/test_security_oauth2_optional.py
  20. 2
      tests/test_security_oauth2_optional_description.py
  21. 2
      tests/test_starlette_exception.py
  22. 2
      tests/test_sub_callbacks.py
  23. 2
      tests/test_tutorial/test_additional_responses/test_tutorial001.py
  24. 2
      tests/test_tutorial/test_additional_responses/test_tutorial002.py
  25. 2
      tests/test_tutorial/test_additional_responses/test_tutorial003.py
  26. 2
      tests/test_tutorial/test_additional_responses/test_tutorial004.py
  27. 2
      tests/test_tutorial/test_async_sql_databases/test_tutorial001.py
  28. 2
      tests/test_tutorial/test_bigger_applications/test_main.py
  29. 2
      tests/test_tutorial/test_body/test_tutorial001.py
  30. 2
      tests/test_tutorial/test_body_fields/test_tutorial001.py
  31. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial001.py
  32. 2
      tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
  33. 2
      tests/test_tutorial/test_body_nested_models/test_tutorial009.py
  34. 2
      tests/test_tutorial/test_body_updates/test_tutorial001.py
  35. 2
      tests/test_tutorial/test_cookie_params/test_tutorial001.py
  36. 2
      tests/test_tutorial/test_dataclasses/test_tutorial001.py
  37. 2
      tests/test_tutorial/test_dataclasses/test_tutorial003.py
  38. 2
      tests/test_tutorial/test_dependencies/test_tutorial001.py
  39. 2
      tests/test_tutorial/test_dependencies/test_tutorial004.py
  40. 2
      tests/test_tutorial/test_dependencies/test_tutorial006.py
  41. 2
      tests/test_tutorial/test_dependencies/test_tutorial012.py
  42. 2
      tests/test_tutorial/test_events/test_tutorial001.py
  43. 2
      tests/test_tutorial/test_extra_data_types/test_tutorial001.py
  44. 2
      tests/test_tutorial/test_extra_models/test_tutorial003.py
  45. 2
      tests/test_tutorial/test_handling_errors/test_tutorial001.py
  46. 2
      tests/test_tutorial/test_handling_errors/test_tutorial002.py
  47. 2
      tests/test_tutorial/test_handling_errors/test_tutorial003.py
  48. 2
      tests/test_tutorial/test_handling_errors/test_tutorial004.py
  49. 2
      tests/test_tutorial/test_handling_errors/test_tutorial005.py
  50. 2
      tests/test_tutorial/test_handling_errors/test_tutorial006.py
  51. 2
      tests/test_tutorial/test_header_params/test_tutorial001.py
  52. 2
      tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py
  53. 2
      tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py
  54. 2
      tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py
  55. 2
      tests/test_tutorial/test_path_params/test_tutorial004.py
  56. 4
      tests/test_tutorial/test_path_params/test_tutorial005.py
  57. 2
      tests/test_tutorial/test_query_params/test_tutorial005.py
  58. 2
      tests/test_tutorial/test_query_params/test_tutorial006.py
  59. 2
      tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py
  60. 2
      tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py
  61. 2
      tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py
  62. 2
      tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py
  63. 2
      tests/test_tutorial/test_request_files/test_tutorial001.py
  64. 2
      tests/test_tutorial/test_request_files/test_tutorial002.py
  65. 2
      tests/test_tutorial/test_request_forms/test_tutorial001.py
  66. 2
      tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
  67. 2
      tests/test_tutorial/test_response_model/test_tutorial003.py
  68. 2
      tests/test_tutorial/test_response_model/test_tutorial004.py
  69. 2
      tests/test_tutorial/test_response_model/test_tutorial005.py
  70. 2
      tests/test_tutorial/test_response_model/test_tutorial006.py
  71. 2
      tests/test_tutorial/test_schema_extra_example/test_tutorial004.py
  72. 2
      tests/test_tutorial/test_security/test_tutorial003.py
  73. 2
      tests/test_tutorial/test_security/test_tutorial005.py
  74. 2
      tests/test_tutorial/test_sql_databases/test_sql_databases.py
  75. 2
      tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
  76. 2
      tests/test_tutorial/test_sql_databases_peewee/test_sql_databases_peewee.py
  77. 2
      tests/test_union_body.py
  78. 2
      tests/test_union_inherited_body.py

6
fastapi/openapi/utils.py

@ -38,7 +38,11 @@ validation_error_definition = {
"title": "ValidationError",
"type": "object",
"properties": {
"loc": {"title": "Location", "type": "array", "items": {"type": "string"}},
"loc": {
"title": "Location",
"type": "array",
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
},

2
tests/test_additional_properties.py

@ -76,7 +76,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_additional_responses_custom_model_in_callback.py

@ -119,7 +119,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_additional_responses_default_validationerror.py

@ -54,7 +54,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_application.py

@ -1101,7 +1101,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_dependency_duplicates.py

@ -177,7 +177,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_extra_routes.py

@ -292,7 +292,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_filter_pydantic_sub_model.py

@ -116,7 +116,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_get_request_body.py

@ -85,7 +85,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_include_router_defaults_overrides.py

@ -6612,7 +6612,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_modules_same_name_body/test_main.py

@ -101,7 +101,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_multi_body_errors.py

@ -79,7 +79,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_multi_query_errors.py

@ -63,7 +63,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_param_in_path_and_dependency.py

@ -71,7 +71,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_put_no_body.py

@ -57,7 +57,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_repeated_dependency_schema.py

@ -36,7 +36,7 @@ schema = {
"ValidationError": {
"properties": {
"loc": {
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
"title": "Location",
"type": "array",
},

2
tests/test_schema_extra_examples.py

@ -830,7 +830,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_security_oauth2.py

@ -117,7 +117,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_security_oauth2_optional.py

@ -121,7 +121,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_security_oauth2_optional_description.py

@ -122,7 +122,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_starlette_exception.py

@ -102,7 +102,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_sub_callbacks.py

@ -256,7 +256,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_additional_responses/test_tutorial001.py

@ -76,7 +76,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_additional_responses/test_tutorial002.py

@ -72,7 +72,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_additional_responses/test_tutorial003.py

@ -77,7 +77,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_additional_responses/test_tutorial004.py

@ -75,7 +75,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_async_sql_databases/test_tutorial001.py

@ -88,7 +88,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_bigger_applications/test_main.py

@ -323,7 +323,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_body/test_tutorial001.py

@ -63,7 +63,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_body_fields/test_tutorial001.py

@ -87,7 +87,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

@ -79,7 +79,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

@ -90,7 +90,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_body_nested_models/test_tutorial009.py

@ -53,7 +53,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_body_updates/test_tutorial001.py

@ -109,7 +109,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_cookie_params/test_tutorial001.py

@ -50,7 +50,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_dataclasses/test_tutorial001.py

@ -71,7 +71,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_dataclasses/test_tutorial003.py

@ -118,7 +118,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_dependencies/test_tutorial001.py

@ -104,7 +104,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_dependencies/test_tutorial004.py

@ -62,7 +62,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_dependencies/test_tutorial006.py

@ -55,7 +55,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_dependencies/test_tutorial012.py

@ -102,7 +102,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_events/test_tutorial001.py

@ -47,7 +47,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_extra_data_types/test_tutorial001.py

@ -89,7 +89,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_extra_models/test_tutorial003.py

@ -78,7 +78,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_handling_errors/test_tutorial001.py

@ -49,7 +49,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_handling_errors/test_tutorial002.py

@ -49,7 +49,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_handling_errors/test_tutorial003.py

@ -49,7 +49,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_handling_errors/test_tutorial004.py

@ -49,7 +49,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_handling_errors/test_tutorial005.py

@ -69,7 +69,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_handling_errors/test_tutorial006.py

@ -49,7 +49,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_header_params/test_tutorial001.py

@ -51,7 +51,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

@ -143,7 +143,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py

@ -72,7 +72,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py

@ -72,7 +72,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_path_params/test_tutorial004.py

@ -49,7 +49,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

4
tests/test_tutorial/test_path_params/test_tutorial005.py

@ -54,7 +54,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},
@ -138,7 +138,7 @@ openapi_schema2 = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_query_params/test_tutorial005.py

@ -56,7 +56,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_query_params/test_tutorial006.py

@ -68,7 +68,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py

@ -59,7 +59,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py

@ -53,7 +53,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py

@ -54,7 +54,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py

@ -54,7 +54,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_request_files/test_tutorial001.py

@ -99,7 +99,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_request_files/test_tutorial002.py

@ -119,7 +119,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_request_forms/test_tutorial001.py

@ -61,7 +61,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

@ -61,7 +61,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_response_model/test_tutorial003.py

@ -74,7 +74,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_response_model/test_tutorial004.py

@ -71,7 +71,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_response_model/test_tutorial005.py

@ -98,7 +98,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_response_model/test_tutorial006.py

@ -98,7 +98,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

@ -103,7 +103,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_security/test_tutorial003.py

@ -81,7 +81,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_security/test_tutorial005.py

@ -141,7 +141,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_sql_databases/test_sql_databases.py

@ -261,7 +261,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py

@ -260,7 +260,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_tutorial/test_sql_databases_peewee/test_sql_databases_peewee.py

@ -318,7 +318,7 @@ openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_union_body.py

@ -84,7 +84,7 @@ item_openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

2
tests/test_union_inherited_body.py

@ -96,7 +96,7 @@ inherited_item_openapi_schema = {
"loc": {
"title": "Location",
"type": "array",
"items": {"type": "string"},
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
},
"msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"},

Loading…
Cancel
Save