code: def test_http_auth_error_response(app, client):
      @app.get("/foo")
      @app.output(Foo)
      @app.doc(
          responses={
              204: "empty",
              400: "bad",
              404: "not found",
              500: "server error",
          }
      )
      def foo():
          pass
  
      rv = client.get("/openapi.json")
      assert rv.status_code == 200
      validate_spec(rv.json)
      assert "HTTPError" in rv.json["components"]["schemas"]
      assert (
          "#/components/schemas/HTTPError"
          in rv.json["paths"]["/foo"]["get"]["responses"]["404"][
              "content"
          ]["application/json"]["schema"]["$ref"]
      )
      assert (
          "#/components/schemas/HTTPError"
          in rv.json["paths"]["/foo"]["get"]["responses"]["500"][
              "content"
          ]["application/json"]["schema"]["$ref"]
      )
      assert (
          "content"
          not in rv.json["paths"]["/foo"]["get"]["responses"]["204"]
      )
  
file_path: apiflask/tests/test_settings_response_customization.py
imports: import pytest
  from openapi_spec_validator import validate_spec
  from .schemas import Foo
  from .schemas import HTTPError
  from .schemas import ValidationError
  from apiflask.schemas import EmptySchema
  from apiflask.schemas import http_error_schema
  from apiflask.security import HTTPBasicAuth
label_desc: Use image node_id 7 for calling a global function with example usage: test_http_auth_error_response(app, client) without return types