code: def test_parameters_registration(app, client):
      @app.route("/foo")
      @app.input(Query, location="query")
      @app.output(Foo)
      def foo(query_data):
          pass
  
      @app.route("/bar")
      @app.input(Query, location="query", arg_name="query")
      @app.input(Pagination, location="query", arg_name="pagination")
      @app.input(Header, location="headers")
      def bar(query, pagination, headers_data):
          return {
              "query": query["id"],
              "pagination": pagination,
              "foo": headers_data["foo"],
          }
  
      rv = client.get("/openapi.json")
      assert rv.status_code == 200
      validate_spec(rv.json)
      assert "/foo" in rv.json["paths"]
      assert "/bar" in rv.json["paths"]
      assert (
          rv.json["paths"]["/foo"]["get"]["parameters"][0]["name"]
          == "id"
      )
      assert len(rv.json["paths"]["/foo"]["get"]["parameters"]) == 1
      assert len(rv.json["paths"]["/bar"]["get"]["parameters"]) == 4
      rv = client.get("/bar")
      assert rv.status_code == 200
      assert rv.json["query"] == 1
      assert rv.json["pagination"]["page"] == 1
      assert rv.json["pagination"]["per_page"] == 10
      assert rv.json["foo"] == "bar"
  
file_path: apiflask/tests/test_openapi_paths.py
imports: from openapi_spec_validator import validate_spec
  from .schemas import Foo
  from .schemas import Header
  from .schemas import Pagination
  from .schemas import Query
label_desc: Use image node_id 6 for calling a global function with example usage: test_parameters_registration(app, client) and returns: dict