code: def test_spec_path_parameters_registration(app, client):
      @app.route("/strings/<some_string>")
      @app.output(Foo)
      def get_string(some_string):
          pass
  
      @app.route("/floats/<float:some_float>", methods=["POST"])
      @app.output(Foo)
      def get_float(some_float):
          pass
  
      @app.route("/integers/<int:some_integer>", methods=["PUT"])
      @app.output(Foo)
      def get_integer(some_integer):
          pass
  
      @app.route("/users/<int:user_id>/articles/<int:article_id>")
      @app.output(Foo)
      def get_article(user_id, article_id):
          pass
  
      rv = client.get("/openapi.json")
      assert rv.status_code == 200
      validate_spec(rv.json)
      assert (
          rv.json["paths"]["/strings/{some_string}"]["get"][
              "parameters"
          ][0]["in"]
          == "path"
      )
      assert (
          rv.json["paths"]["/strings/{some_string}"]["get"][
              "parameters"
          ][0]["name"]
          == "some_string"
      )
      assert (
          rv.json["paths"]["/strings/{some_string}"]["get"][
              "parameters"
          ][0]["schema"]["type"]
          == "string"
      )
      assert (
          rv.json["paths"]["/floats/{some_float}"]["post"][
              "parameters"
          ][0]["schema"]["type"]
          == "number"
      )
      assert (
          rv.json["paths"]["/integers/{some_integer}"]["put"][
              "parameters"
          ][0]["schema"]["type"]
          == "integer"
      )
      assert (
          rv.json["paths"]["/users/{user_id}/articles/{article_id}"][
              "get"
          ]["parameters"][0]["name"]
          == "user_id"
      )
      assert (
          rv.json["paths"]["/users/{user_id}/articles/{article_id}"][
              "get"
          ]["parameters"][1]["name"]
          == "article_id"
      )
  
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 2 for calling a global function with example usage: test_spec_path_parameters_registration(app, client) without return types