mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-12 05:26:45 +00:00
🐛 Fix int query parameters with default
being treated as body
This commit is contained in:
parent
a2ccb6e317
commit
6f68666e0e
2 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
||||||
|
|
||||||
__version__ = "0.1.5"
|
__version__ = "0.1.6"
|
||||||
|
|
||||||
from .applications import FastAPI
|
from .applications import FastAPI
|
||||||
from .routing import APIRouter
|
from .routing import APIRouter
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,11 @@ def get_dependant(*, path: str, call: Callable, name: str = None) -> Dependant:
|
||||||
default_schema=params.Path,
|
default_schema=params.Path,
|
||||||
force_type=params.ParamTypes.path,
|
force_type=params.ParamTypes.path,
|
||||||
)
|
)
|
||||||
elif (param.default == param.empty or param.default is None) and (
|
elif (
|
||||||
|
param.default == param.empty
|
||||||
|
or param.default is None
|
||||||
|
or type(param.default) in param_supported_types
|
||||||
|
) and (
|
||||||
param.annotation == param.empty
|
param.annotation == param.empty
|
||||||
or lenient_issubclass(param.annotation, param_supported_types)
|
or lenient_issubclass(param.annotation, param_supported_types)
|
||||||
):
|
):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue