[Bug]: RequestUnmarshalResult
has wrong type for body
#898
Labels
area/unmarshalling
Indicates an issue on unmarshalling area.
kind/bug/confirmed
kind/bug
Indicates an issue
Actual Behavior
unmarshal_request
returnsRequestUnmarshalResult
which hasbody
field defined as:But actually, at least with
application/json
or alike request body defined in the spec, this gets set to the validated/unmarshalleddict
.Maybe generics could be used there, but it would probably make things just complicated.
Anyway, the reality and the type hint are not matching.
Expected Behavior
It's nice to get that unmarshalled
dict
instead ofstr
, but the type hint is wrong.I guess the type hint should be changed to
Any
, because if the content type was e.g.text/plain
thenbody
would really get set to astr
(orbytes
, rather?).Steps to Reproduce
Something like:
OpenAPI Core Version
0.19.3
OpenAPI Core Integration
custom
Affected Area(s)
No response
References
No response
Anything else we need to know?
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: