From 36e6f228cda2ad3a5c5c487105a103baf9506263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 9 Oct 2025 14:30:12 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Update=20v1=20params=20to?= =?UTF-8?q?=20re-use=20main=20ParamTypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/_compat/_params_v1.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fastapi/_compat/_params_v1.py b/fastapi/_compat/_params_v1.py index 805bd65d6..c1929e03d 100644 --- a/fastapi/_compat/_params_v1.py +++ b/fastapi/_compat/_params_v1.py @@ -1,8 +1,8 @@ import warnings -from enum import Enum from typing import Any, Callable, Dict, List, Optional, Union from fastapi.openapi.models import Example +from fastapi.params import ParamTypes from typing_extensions import Annotated, deprecated from .shared import PYDANTIC_VERSION_MINOR_TUPLE @@ -11,13 +11,6 @@ from .v1 import FieldInfo, Undefined _Unset: Any = Undefined -class ParamTypes(Enum): - query = "query" - header = "header" - path = "path" - cookie = "cookie" - - class Param(FieldInfo): # type: ignore[misc] in_: ParamTypes