Skip to content

type field cause exception #545

@b3g00d

Description

@b3g00d

Used Cerberus version / latest commit: 1.3.2

  • I have the capacity to improve the docs when my problem is solved.

  • I have the capacity to submit a patch when a bug is identified.

  • [ x] My question does not concern a practical use-case that I can't figure out
    to solve.


Bug report / Feature request

I have a sample schema:

{'metadata': {'type': 'dict',
  'nullable': True,
  'schema': {'image_thumb': {'type': 'list',
    'required': False,
    'default': [],
    'minlength': 0,
    'maxlength': 10,
    'schema': {'type': 'dict',
     'default': None,
     'nullable': True,
     'schema': {'width': {'type': 'integer', 'required': True}}}}}}}

Expected: return image_thumb must be a list

it will return an exception when an object was {'metadata': {'image_thumb': {'type': 'error'}}}
with type in the body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions