|
|
@ -399,7 +399,7 @@ def analyze_param( |
|
|
if isinstance(fastapi_annotation, FieldInfo): |
|
|
if isinstance(fastapi_annotation, FieldInfo): |
|
|
# Copy `field_info` because we mutate `field_info.default` below. |
|
|
# Copy `field_info` because we mutate `field_info.default` below. |
|
|
field_info = copy_field_info( |
|
|
field_info = copy_field_info( |
|
|
field_info=fastapi_annotation, # type: ignore[arg-type] |
|
|
field_info=fastapi_annotation, |
|
|
annotation=use_annotation, |
|
|
annotation=use_annotation, |
|
|
) |
|
|
) |
|
|
assert ( |
|
|
assert ( |
|
|
@ -433,7 +433,7 @@ def analyze_param( |
|
|
"Cannot specify FastAPI annotations in `Annotated` and default value" |
|
|
"Cannot specify FastAPI annotations in `Annotated` and default value" |
|
|
f" together for {param_name!r}" |
|
|
f" together for {param_name!r}" |
|
|
) |
|
|
) |
|
|
field_info = value # type: ignore[assignment] |
|
|
field_info = value |
|
|
if isinstance(field_info, FieldInfo): |
|
|
if isinstance(field_info, FieldInfo): |
|
|
field_info.annotation = type_annotation |
|
|
field_info.annotation = type_annotation |
|
|
|
|
|
|
|
|
|