Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Enum schema are not decoded #122

@sebastibe

Description

@sebastibe

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. The coreschema.Enum class which unlike the other Schema class is initializing with one enum 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions