Skip to content

Commit 07f34c5

Browse files
authored
Merge pull request #3356 from xpoinsard/patch-1
Fix copy-paste issues in AbstractSerializableParameter.getExample
2 parents f38c0ea + 9719b16 commit 07f34c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/swagger-models/src/main/java/io/swagger/models/parameters/AbstractSerializableParameter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,12 @@ public Object getExample() {
413413
} else if (DecimalProperty.TYPE.equals(type)) {
414414
return Double.valueOf(example);
415415
} else if (BooleanProperty.TYPE.equals(type)) {
416-
if ("true".equalsIgnoreCase(example) || "false".equalsIgnoreCase(defaultValue)) {
416+
if ("true".equalsIgnoreCase(example) || "false".equalsIgnoreCase(example)) {
417417
return Boolean.valueOf(example);
418418
}
419419
}
420420
} catch (NumberFormatException e) {
421-
LOGGER.warn(String.format("Illegal DefaultValue %s for parameter type %s", defaultValue, type), e);
421+
LOGGER.warn(String.format("Illegal Example %s for parameter type %s", example, type), e);
422422
}
423423
return example;
424424
}

0 commit comments

Comments
 (0)