Closed FrelliBB closed 7 years ago
There is a small issue due to the fact that the ObjectMapper
we are using for serialization is not externally configurable (yet). If we use JsonResponseAssertions#fromModel and the model object contains some null fields, those fields are serialized into JSON as null.
This could be fixed by using @JsonInclude(Include.NON_NULL)
on the passed models, but we should ideally allow the mapper to be configured externally and then it can be fixed by using objectMapper.setSerializationInclusion(Include.NON_NULL);
.
@FrelliBB, with regards to a configurable ObjectMapper
: I fully agree with this. Having said that, this issue should not stop us from merging this pull request since exposing functionality for configuring the ObjectMapper
can be tackled separately (and won't really conflict with the changes here).
Changes applied @KPull
Related issue: https://github.com/bastion-dev/Bastion/issues/21