The current buildLooksLike code verifies the document to deserialize contains all the properties (required and non-required) from the RAML object declaration. This causes the object identification (and thereby the deserialization) to fail if any of the non-required properties is missing from the response document.
By adding the following code only the mandatory properties are verified:
The current buildLooksLike code verifies the document to deserialize contains all the properties (required and non-required) from the RAML object declaration. This causes the object identification (and thereby the deserialization) to fail if any of the non-required properties is missing from the response document.
By adding the following code only the mandatory properties are verified:
This results into code like the following (with no optional attributes in the containsAll):