ValidationError: ObjectId('51b5fbaa38178440fcc5859a') is not of type 'object' Failed validating 'type' in schema['properties']['user_id']: {'properties': {'$oid': {'type': 'string'}}, 'type': 'object'} On instance['user_id']: ObjectId('51b5fbaa38178440fcc5859a')
Object in JSON Schema refers to a JSON object (which corresponds to a Python dict) not a Python object.
ObjectIDs aren't dicts, so they won't pass that. Right now there isn't a way to make assertions about types other than the ones that are valid JSON. I'd recommend just removing that type check.
Cheers
Julian
--
You received this message because you are subscribed to the Google Groups "jsonschema - An implementation of JSON Schema for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema+...@googlegroups.com.
To post to this group, send email to jsons...@googlegroups.com.