-
Notifications
You must be signed in to change notification settings - Fork 57
Enum schema are not decoded #122
Comments
Thanks, yup looks like those are currently missing from the document and need to be included. |
In the meantime, should we patch |
Updated from DRF 3.5.3 to 3.6.2 but have had to roll back to 3.5.4 because of this issue (and the |
Hello, is there a fast solution to have DRF working without the cori-api patch? |
Building against #126 will temporarily solve this issue until the next release of coreapi has been released. |
Closed via #135 |
I've met the same problem. What can I do to solve it? Here are the versions of packages that I use:
Here's the error I get
I've tries it with:
But it didn't help me at all. |
Update CoreAPI to 2.3.1. |
On coreapi 2.3.0 with an API running DRF 3.6.2, I'm having an error when decoding documents with enum types in the
decode_schema_from_corejson
function. Thecoreschema.Enum
class which unlike the other Schema class is initializing with oneenum
positional argument (the list of possible values) for validation purpose. This list is not directly available in the document so I'm not sure how you would like to initialize the class in that case.The solutions I'm seeing is either to add the enums to the document (maybe it's already the case and I missed this part) and initialize the class properly or make the enum optional as a keyword argument for now.
The text was updated successfully, but these errors were encountered: