[SOLVED] Has anyone had an error using plone.restapi to create an object that complains about 'Required input is missing.' when the field is actually required=False?

I can't reproduce the error here giving a proof of concept, but this bug is only happening in production and is really confusing. Has anyone here in the Plone community had a similar problem somehow?

from plone.supermodel import model

class IMyField(model.Schema):

    myfield = schema.Choice(
        title=_(u'My Field'),
  "message": "[{'field': 'myfield', 'message': u'Required input is missing.', 'error': RequiredMissing('myfield')}]", 
  "type": "BadRequest"

In the end, it was nothing related to plone.restapi but z3c.form.

This content has a z3c.form that dinamically sets a field as required. The problem is that it was done using self.fields instead of using a copy of the schema, so it was being shared by all instances.

For more documentation about this, check: