nicolaiarocci/eve — pull request #404 by girogiro (2014-07-09 12:50:08+00:00)
Title: Fix serialization when `type` is missing in schema

Serialization fails with KeyError exception in the case when type definition of a field if missing in the schema. However, the exception is silently caught by `parse` function that calls the serialization and the result is that remaining fields are not serialized. As the order of dictionary keys in document is random, the consequence are unexplainable errors `value '52f89dea4e03c0f71f64d334' cannot be converted to a ObjectId` and `must be of datetime type` for correct *objectid* and *datetime* values and those errors appear and disappear unpredictably. The PR fixes this behavior.

Fields without type definition in schema are useful for polymorphic fields that may contain any object, but the field name is given and unknown fields are not allowed to insert.