forked from loafle/openapi-generator-original
[Java] Add a new additional property to configure Jackson's failOnUnknownProperties (#19271)
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties` * Move `FAIL_ON_UNKNOWN_PROPERTIES` property to JavaClientCodegen * Template `FAIL_ON_UNKNOWN_PROPERTIES` for other libraries beside retrofit2 * Default `failOnUnknownProperties` to false for all Java Client libraries * Fix integration tests Add the `failOnUnknownProperties: true` additional properties to generate the expected mapper
This commit is contained in:
@@ -34,7 +34,7 @@ public class JSON {
|
||||
mapper = JsonMapper.builder()
|
||||
.serializationInclusion(JsonInclude.Include.NON_NULL)
|
||||
.disable(MapperFeature.ALLOW_COERCION_OF_SCALARS)
|
||||
.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
|
||||
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
|
||||
.enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE)
|
||||
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||
.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)
|
||||
|
||||
Reference in New Issue
Block a user