Incorrect types cast
EternalStuden1 opened this issue · 0 comments
EternalStuden1 commented
Hi everyone.
I've had an experience with openapi module and it's perfect, good job!
But there is an issue that makes using openapi more complex - incorrect types casting when model field value is empty.
E.g. for any field with NUMBER type GET request will return false
instead of null
.
To fix that I propose to replase this code with the following:
result[field] = None if not value.id else value.id
In this case it will be possible to deserialize field value to corrent type.