-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
Currently code of this method looks like:
async def validation_middleware(request: web.Request, handler) -> web.Response:
...
for schema in schemas:
data = await request.app["_apispec_parser"].parse(
schema["schema"], request, locations=schema["locations"]
)
if data:
try:
result.update(data)
except (ValueError, TypeError):
result = data
break
else:
result.update(request.match_info)
request[request.app["_apispec_request_data_name"]] = result
return await handler(request)So, if schema successfully parsed a request arguments (basically transform each argument to their relative type), they will be put in result, but eventually (if data a dictionary) arguments in result will be replaced by their string representation.
The question is Why? Why replacing a right type arguments with their string representation?
Metadata
Metadata
Assignees
Labels
No labels