Skip to content

Commit 93c9b1a

Browse files
committed
Fix integration tests
Add the `failOnUnknownProperties: true` additional properties to generate the expected mapper
1 parent a20b4bf commit 93c9b1a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/configs/java-jersey2-8.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ additionalProperties:
1111
useOneOfDiscriminatorLookup: true
1212
disallowAdditionalPropertiesIfNotPresent: false
1313
gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all"
14+
failOnUnknownProperties: true

samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/JSON.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public JSON() {
2323
mapper = JsonMapper.builder()
2424
.serializationInclusion(JsonInclude.Include.NON_NULL)
2525
.configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false)
26-
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
26+
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true)
2727
.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true)
2828
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
2929
.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)

0 commit comments

Comments
 (0)