Hi Colm,

This is quite interesting, why CXF behavior changes with Swagger upgrade? Or 
you mean
the API specification started to return null values? Could you please share 
which test (or tests) 
start to fail? As far as I remember, our code manages Swagger specs (mostly) 
transparently,
with a few exceptions. Thanks.

Best Regards,
    Andriy Redko


COh> Hi all,

COh> I took a look at the failing system tests with upgrading Swagger to 1.5.18.
COh> One of the issues is that CXF starts returning "null" for the JSON values
COh> that are not defined, and this causes a NPE in the CXF Swagger code.

COh> Defining:

COh>  JacksonJsonProvider jackson = new JacksonJsonProvider();
COh>             ObjectMapper objectMapper = new ObjectMapper();
COh>             objectMapper.setSerializationInclusion(Include.NON_NULL);
COh>             jackson.setMapper(objectMapper);
COh>             sf.setProvider(jackson);

COh> fixes the problem. However I guess we can't upgrade as it will break
COh> existing deployments. Is there any way we can set this as a default in the
COh> Swagger code in CXF?

COh> Colm.



Reply via email to