]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:white_check_mark: Recover extensive tests for path and params
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 18 Dec 2018 19:48:02 +0000 (23:48 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Tue, 18 Dec 2018 19:48:02 +0000 (23:48 +0400)
tests/main.py
tests/main_old.py
tests/test_application.py
tests/test_path.py [moved from tests/xtest_path.py with 100% similarity]
tests/test_query.py [moved from tests/xtest_query.py with 100% similarity]
tests/test_security.py [moved from tests/xtest_security.py with 100% similarity]

index 004fc3630e8026d223b4b5529a16f3b91d37f3da..c384bbb759d4b9b994ff663e1a643f3e22cf449c 100644 (file)
@@ -1,4 +1,6 @@
-from fastapi import FastAPI
+from fastapi import Depends, FastAPI, Path, Query, Security
+from fastapi.security import OAuth2PasswordBearer
+from pydantic import BaseModel
 
 app = FastAPI()
 
@@ -13,3 +15,199 @@ def non_decorated_route():
 
 
 app.add_api_route("/non_decorated_route", non_decorated_route)
+
+
+@app.get("/text")
+def get_text():
+    return "Hello World"
+
+
+@app.get("/path/{item_id}")
+def get_id(item_id):
+    return item_id
+
+
+@app.get("/path/str/{item_id}")
+def get_str_id(item_id: str):
+    return item_id
+
+
+@app.get("/path/int/{item_id}")
+def get_int_id(item_id: int):
+    return item_id
+
+
+@app.get("/path/float/{item_id}")
+def get_float_id(item_id: float):
+    return item_id
+
+
+@app.get("/path/bool/{item_id}")
+def get_bool_id(item_id: bool):
+    return item_id
+
+
+@app.get("/path/param/{item_id}")
+def get_path_param_id(item_id: str = Path(None)):
+    return item_id
+
+
+@app.get("/path/param-required/{item_id}")
+def get_path_param_required_id(item_id: str = Path(...)):
+    return item_id
+
+
+@app.get("/path/param-minlength/{item_id}")
+def get_path_param_min_length(item_id: str = Path(..., min_length=3)):
+    return item_id
+
+
+@app.get("/path/param-maxlength/{item_id}")
+def get_path_param_max_length(item_id: str = Path(..., max_length=3)):
+    return item_id
+
+
+@app.get("/path/param-min_maxlength/{item_id}")
+def get_path_param_min_max_length(item_id: str = Path(..., max_length=3, min_length=2)):
+    return item_id
+
+
+@app.get("/path/param-gt/{item_id}")
+def get_path_param_gt(item_id: float = Path(..., gt=3)):
+    return item_id
+
+
+@app.get("/path/param-gt0/{item_id}")
+def get_path_param_gt0(item_id: float = Path(..., gt=0)):
+    return item_id
+
+
+@app.get("/path/param-ge/{item_id}")
+def get_path_param_ge(item_id: float = Path(..., ge=3)):
+    return item_id
+
+
+@app.get("/path/param-lt/{item_id}")
+def get_path_param_lt(item_id: float = Path(..., lt=3)):
+    return item_id
+
+
+@app.get("/path/param-lt0/{item_id}")
+def get_path_param_lt0(item_id: float = Path(..., lt=0)):
+    return item_id
+
+
+@app.get("/path/param-le/{item_id}")
+def get_path_param_le(item_id: float = Path(..., le=3)):
+    return item_id
+
+
+@app.get("/path/param-lt-gt/{item_id}")
+def get_path_param_lt_gt(item_id: float = Path(..., lt=3, gt=1)):
+    return item_id
+
+
+@app.get("/path/param-le-ge/{item_id}")
+def get_path_param_le_ge(item_id: float = Path(..., le=3, ge=1)):
+    return item_id
+
+
+@app.get("/path/param-lt-int/{item_id}")
+def get_path_param_lt_int(item_id: int = Path(..., lt=3)):
+    return item_id
+
+
+@app.get("/path/param-gt-int/{item_id}")
+def get_path_param_gt_int(item_id: int = Path(..., gt=3)):
+    return item_id
+
+
+@app.get("/path/param-le-int/{item_id}")
+def get_path_param_le_int(item_id: int = Path(..., le=3)):
+    return item_id
+
+
+@app.get("/path/param-ge-int/{item_id}")
+def get_path_param_ge_int(item_id: int = Path(..., ge=3)):
+    return item_id
+
+
+@app.get("/path/param-lt-gt-int/{item_id}")
+def get_path_param_lt_gt_int(item_id: int = Path(..., lt=3, gt=1)):
+    return item_id
+
+
+@app.get("/path/param-le-ge-int/{item_id}")
+def get_path_param_le_ge_int(item_id: int = Path(..., le=3, ge=1)):
+    return item_id
+
+
+@app.get("/query")
+def get_query(query):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+@app.get("/query/optional")
+def get_query_optional(query=None):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+@app.get("/query/int")
+def get_query_type(query: int):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+@app.get("/query/int/optional")
+def get_query_type_optional(query: int = None):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+@app.get("/query/int/default")
+def get_query_type_optional(query: int = 10):
+    return f"foo bar {query}"
+
+
+@app.get("/query/param")
+def get_query_param(query=Query(None)):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+@app.get("/query/param-required")
+def get_query_param_required(query=Query(...)):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+@app.get("/query/param-required/int")
+def get_query_param_required_type(query: int = Query(...)):
+    if query is None:
+        return "foo bar"
+    return f"foo bar {query}"
+
+
+reusable_oauth2b = OAuth2PasswordBearer(tokenUrl="/token")
+
+
+class User(BaseModel):
+    username: str
+
+
+def get_current_user(oauth_header: str = Security(reusable_oauth2b)):
+    user = User(username=oauth_header)
+    return user
+
+
+@app.get("/security/oauth2b")
+def read_current_user(current_user: User = Depends(get_current_user)):
+    return current_user
index 468f4c764fc0e53671d42cbdee4630f206207ff4..200004e17b1f693a9f8f6731eb73651a52a1e820 100644 (file)
@@ -30,185 +30,6 @@ app.include_router(router_a)
 app.include_router(router_b, prefix="/b")
 
 
-@app.get("/text")
-def get_text():
-    return "Hello World"
-
-
-@app.get("/path/{item_id}")
-def get_id(item_id):
-    return item_id
-
-
-@app.get("/path/str/{item_id}")
-def get_str_id(item_id: str):
-    return item_id
-
-
-@app.get("/path/int/{item_id}")
-def get_int_id(item_id: int):
-    return item_id
-
-
-@app.get("/path/float/{item_id}")
-def get_float_id(item_id: float):
-    return item_id
-
-
-@app.get("/path/bool/{item_id}")
-def get_bool_id(item_id: bool):
-    return item_id
-
-
-@app.get("/path/param/{item_id}")
-def get_path_param_id(item_id: str = Path(None)):
-    return item_id
-
-
-@app.get("/path/param-required/{item_id}")
-def get_path_param_required_id(item_id: str = Path(...)):
-    return item_id
-
-
-@app.get("/path/param-minlength/{item_id}")
-def get_path_param_min_length(item_id: str = Path(..., min_length=3)):
-    return item_id
-
-
-@app.get("/path/param-maxlength/{item_id}")
-def get_path_param_max_length(item_id: str = Path(..., max_length=3)):
-    return item_id
-
-
-@app.get("/path/param-min_maxlength/{item_id}")
-def get_path_param_min_max_length(item_id: str = Path(..., max_length=3, min_length=2)):
-    return item_id
-
-
-@app.get("/path/param-gt/{item_id}")
-def get_path_param_gt(item_id: float = Path(..., gt=3)):
-    return item_id
-
-
-@app.get("/path/param-gt0/{item_id}")
-def get_path_param_gt0(item_id: float = Path(..., gt=0)):
-    return item_id
-
-
-@app.get("/path/param-ge/{item_id}")
-def get_path_param_ge(item_id: float = Path(..., ge=3)):
-    return item_id
-
-
-@app.get("/path/param-lt/{item_id}")
-def get_path_param_lt(item_id: float = Path(..., lt=3)):
-    return item_id
-
-
-@app.get("/path/param-lt0/{item_id}")
-def get_path_param_lt0(item_id: float = Path(..., lt=0)):
-    return item_id
-
-
-@app.get("/path/param-le/{item_id}")
-def get_path_param_le(item_id: float = Path(..., le=3)):
-    return item_id
-
-
-@app.get("/path/param-lt-gt/{item_id}")
-def get_path_param_lt_gt(item_id: float = Path(..., lt=3, gt=1)):
-    return item_id
-
-
-@app.get("/path/param-le-ge/{item_id}")
-def get_path_param_le_ge(item_id: float = Path(..., le=3, ge=1)):
-    return item_id
-
-
-@app.get("/path/param-lt-int/{item_id}")
-def get_path_param_lt_int(item_id: int = Path(..., lt=3)):
-    return item_id
-
-
-@app.get("/path/param-gt-int/{item_id}")
-def get_path_param_gt_int(item_id: int = Path(..., gt=3)):
-    return item_id
-
-
-@app.get("/path/param-le-int/{item_id}")
-def get_path_param_le_int(item_id: int = Path(..., le=3)):
-    return item_id
-
-
-@app.get("/path/param-ge-int/{item_id}")
-def get_path_param_ge_int(item_id: int = Path(..., ge=3)):
-    return item_id
-
-
-@app.get("/path/param-lt-gt-int/{item_id}")
-def get_path_param_lt_gt_int(item_id: int = Path(..., lt=3, gt=1)):
-    return item_id
-
-
-@app.get("/path/param-le-ge-int/{item_id}")
-def get_path_param_le_ge_int(item_id: int = Path(..., le=3, ge=1)):
-    return item_id
-
-
-@app.get("/query")
-def get_query(query):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
-@app.get("/query/optional")
-def get_query_optional(query=None):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
-@app.get("/query/int")
-def get_query_type(query: int):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
-@app.get("/query/int/optional")
-def get_query_type_optional(query: int = None):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
-@app.get("/query/int/default")
-def get_query_type_optional(query: int = 10):
-    return f"foo bar {query}"
-
-
-@app.get("/query/param")
-def get_query_param(query=Query(None)):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
-@app.get("/query/param-required")
-def get_query_param_required(query=Query(...)):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
-@app.get("/query/param-required/int")
-def get_query_param_required_type(query: int = Query(...)):
-    if query is None:
-        return "foo bar"
-    return f"foo bar {query}"
-
-
 @app.get("/cookie")
 def get_cookie(coo=Cookie(None)):
     return coo
@@ -244,23 +65,6 @@ def get_security_oauth2(sec=Security(reusable_oauth2, scopes=["read:user"])):
     return sec
 
 
-reusable_oauth2b = OAuth2PasswordBearer(tokenUrl="/token")
-
-
-class User(BaseModel):
-    username: str
-
-
-def get_current_user(oauth_header: str = Security(reusable_oauth2b)):
-    user = User(username=oauth_header)
-    return user
-
-
-@app.get("/security/oauth2b")
-def read_current_user(current_user: User = Depends(get_current_user)):
-    return current_user
-
-
 @app.post("/token")
 def post_token(request_data: OAuth2PasswordRequestForm = Form(...)):
     data = request_data.parse()
index 8b868f4d0cbe59a88e563e96a9d4319a86b0c7e6..e0bf9f11b496b2fd5a00839774e0b07242fa9f53 100644 (file)
@@ -33,6 +33,1099 @@ openapi_schema = {
                 "operationId": "non_decorated_route_non_decorated_route_get",
             }
         },
+        "/text": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    }
+                },
+                "summary": "Get Text Get",
+                "operationId": "get_text_text_get",
+            }
+        },
+        "/path/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Id Get",
+                "operationId": "get_id_path__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/str/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Str Id Get",
+                "operationId": "get_str_id_path_str__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id", "type": "string"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Int Id Get",
+                "operationId": "get_int_id_path_int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id", "type": "integer"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/float/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Float Id Get",
+                "operationId": "get_float_id_path_float__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id", "type": "number"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/bool/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Bool Id Get",
+                "operationId": "get_bool_id_path_bool__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id", "type": "boolean"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Id Get",
+                "operationId": "get_path_param_id_path_param__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id", "type": "string"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-required/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Required Id Get",
+                "operationId": "get_path_param_required_id_path_param-required__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Item_Id", "type": "string"},
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-minlength/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Min Length Get",
+                "operationId": "get_path_param_min_length_path_param-minlength__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "minLength": 3,
+                            "type": "string",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-maxlength/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Max Length Get",
+                "operationId": "get_path_param_max_length_path_param-maxlength__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "maxLength": 3,
+                            "type": "string",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-min_maxlength/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Min Max Length Get",
+                "operationId": "get_path_param_min_max_length_path_param-min_maxlength__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "maxLength": 3,
+                            "minLength": 2,
+                            "type": "string",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-gt/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Gt Get",
+                "operationId": "get_path_param_gt_path_param-gt__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMinimum": 3.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-gt0/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Gt0 Get",
+                "operationId": "get_path_param_gt0_path_param-gt0__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMinimum": 0.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-ge/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Ge Get",
+                "operationId": "get_path_param_ge_path_param-ge__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "minimum": 3.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-lt/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Lt Get",
+                "operationId": "get_path_param_lt_path_param-lt__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMaximum": 3.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-lt0/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Lt0 Get",
+                "operationId": "get_path_param_lt0_path_param-lt0__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMaximum": 0.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-le/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Le Get",
+                "operationId": "get_path_param_le_path_param-le__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "maximum": 3.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-lt-gt/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Lt Gt Get",
+                "operationId": "get_path_param_lt_gt_path_param-lt-gt__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMaximum": 3.0,
+                            "exclusiveMinimum": 1.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-le-ge/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Le Ge Get",
+                "operationId": "get_path_param_le_ge_path_param-le-ge__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "maximum": 3.0,
+                            "minimum": 1.0,
+                            "type": "number",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-lt-int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Lt Int Get",
+                "operationId": "get_path_param_lt_int_path_param-lt-int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMaximum": 3.0,
+                            "type": "integer",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-gt-int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Gt Int Get",
+                "operationId": "get_path_param_gt_int_path_param-gt-int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMinimum": 3.0,
+                            "type": "integer",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-le-int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Le Int Get",
+                "operationId": "get_path_param_le_int_path_param-le-int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "maximum": 3.0,
+                            "type": "integer",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-ge-int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Ge Int Get",
+                "operationId": "get_path_param_ge_int_path_param-ge-int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "minimum": 3.0,
+                            "type": "integer",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-lt-gt-int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Lt Gt Int Get",
+                "operationId": "get_path_param_lt_gt_int_path_param-lt-gt-int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "exclusiveMaximum": 3.0,
+                            "exclusiveMinimum": 1.0,
+                            "type": "integer",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/path/param-le-ge-int/{item_id}": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Path Param Le Ge Int Get",
+                "operationId": "get_path_param_le_ge_int_path_param-le-ge-int__item_id__get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {
+                            "title": "Item_Id",
+                            "maximum": 3.0,
+                            "minimum": 1.0,
+                            "type": "integer",
+                        },
+                        "name": "item_id",
+                        "in": "path",
+                    }
+                ],
+            }
+        },
+        "/query": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Get",
+                "operationId": "get_query_query_get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Query"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/optional": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Optional Get",
+                "operationId": "get_query_optional_query_optional_get",
+                "parameters": [
+                    {
+                        "required": False,
+                        "schema": {"title": "Query"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/int": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Type Get",
+                "operationId": "get_query_type_query_int_get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Query", "type": "integer"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/int/optional": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Type Optional Get",
+                "operationId": "get_query_type_optional_query_int_optional_get",
+                "parameters": [
+                    {
+                        "required": False,
+                        "schema": {"title": "Query", "type": "integer"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/int/default": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Type Optional Get",
+                "operationId": "get_query_type_optional_query_int_default_get",
+                "parameters": [
+                    {
+                        "required": False,
+                        "schema": {"title": "Query", "type": "integer", "default": 10},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/param": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Param Get",
+                "operationId": "get_query_param_query_param_get",
+                "parameters": [
+                    {
+                        "required": False,
+                        "schema": {"title": "Query"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/param-required": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Param Required Get",
+                "operationId": "get_query_param_required_query_param-required_get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Query"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/query/param-required/int": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    },
+                    "422": {
+                        "description": "Validation Error",
+                        "content": {
+                            "application/json": {
+                                "schema": {
+                                    "$ref": "#/components/schemas/HTTPValidationError"
+                                }
+                            }
+                        },
+                    },
+                },
+                "summary": "Get Query Param Required Type Get",
+                "operationId": "get_query_param_required_type_query_param-required_int_get",
+                "parameters": [
+                    {
+                        "required": True,
+                        "schema": {"title": "Query", "type": "integer"},
+                        "name": "query",
+                        "in": "query",
+                    }
+                ],
+            }
+        },
+        "/security/oauth2b": {
+            "get": {
+                "responses": {
+                    "200": {
+                        "description": "Successful Response",
+                        "content": {"application/json": {"schema": {}}},
+                    }
+                },
+                "summary": "Read Current User Get",
+                "operationId": "read_current_user_security_oauth2b_get",
+                "security": [{"OAuth2PasswordBearer": []}],
+            }
+        },
+    },
+    "components": {
+        "schemas": {
+            "ValidationError": {
+                "title": "ValidationError",
+                "required": ["loc", "msg", "type"],
+                "type": "object",
+                "properties": {
+                    "loc": {
+                        "title": "Location",
+                        "type": "array",
+                        "items": {"type": "string"},
+                    },
+                    "msg": {"title": "Message", "type": "string"},
+                    "type": {"title": "Error Type", "type": "string"},
+                },
+            },
+            "HTTPValidationError": {
+                "title": "HTTPValidationError",
+                "type": "object",
+                "properties": {
+                    "detail": {
+                        "title": "Detail",
+                        "type": "array",
+                        "items": {"$ref": "#/components/schemas/ValidationError"},
+                    }
+                },
+            },
+        },
+        "securitySchemes": {
+            "OAuth2PasswordBearer": {
+                "type": "oauth2",
+                "flows": {"password": {"scopes": {}, "tokenUrl": "/token"}},
+            }
+        },
     },
 }
 
similarity index 100%
rename from tests/xtest_path.py
rename to tests/test_path.py
similarity index 100%
rename from tests/xtest_query.py
rename to tests/test_query.py