forked from loafle/openapi-generator-original
[java][jersey2] remove warning using JsonMapper.builder (#10734)
* remove warning usign JsonMapper.builder * add back java8 tag
This commit is contained in:
@@ -3,6 +3,7 @@ package org.openapitools.client;
|
||||
import org.threeten.bp.*;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.databind.json.JsonMapper;
|
||||
import org.openapitools.jackson.nullable.JsonNullableModule;
|
||||
import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
|
||||
|
||||
@@ -21,7 +22,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
||||
public JSON() {
|
||||
mapper = new ObjectMapper();
|
||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
mapper.configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false);
|
||||
JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true);
|
||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
|
||||
Reference in New Issue
Block a user