How to deal with openapi_core.casting.schemas.exceptions.CastError: Failed to cast value to object error #838
-
Hi, I'm using openapi-core to validate responses against this OpenAPI schema: https://digital.nhs.uk/restapi/oas/573240 The error I'm getting is this:
The call I am making that raises this error is:
Where
So it looks like openapi-core is expecting a openapi-core/openapi_core/casting/schemas/casters.py Lines 113 to 114 in 99af2d3
I have worked round this by subclassing Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Probably you don't have registered proper deserializer. What schema and content-type are defined for the response in your spec? |
Beta Was this translation helpful? Give feedback.
Exactly that; you can use the same function as standard one