code: def test_auto_validation_error_response(app, client, config_value):
      app.config["AUTO_VALIDATION_ERROR_RESPONSE"] = config_value
  
      @app.post("/foo")
      @app.input(Foo)
      def foo():
          pass
  
      rv = client.get("/openapi.json")
      assert rv.status_code == 200
      validate_spec(rv.json)
      assert (
          bool("422" in rv.json["paths"]["/foo"]["post"]["responses"])
          is config_value
      )
      if config_value:
          assert "ValidationError" in rv.json["components"]["schemas"]
          assert (
              "#/components/schemas/ValidationError"
              in rv.json["paths"]["/foo"]["post"]["responses"]["422"][
                  "content"
              ]["application/json"]["schema"]["$ref"]
          )
  
file_path: apiflask/tests/test_settings_auto_behaviour.py
imports: import pytest
  from flask.views import MethodView
  from openapi_spec_validator import validate_spec
  from .schemas import Foo
  from .schemas import Query
  from apiflask import APIBlueprint
  from apiflask.security import HTTPBasicAuth
label_desc: Use image node_id 8 for calling a global function with example usage: test_auto_validation_error_response(app, client, config_value) without return types