Skip to content

Commit d55bd59

Browse files
spacetherfrantuma
authored andcommitted
Adjusts const type
1 parent 5183d25 commit d55bd59

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4155,10 +4155,9 @@ public Schema getJsonSchema(JsonNode jsonNode, String location, ParseResult resu
41554155
schema.setPatternProperties(patternProperties);
41564156
}
41574157

4158-
//const is a String
4159-
value = getString("const", node, false, location, result);
4160-
if (value != null) {
4161-
schema.setConst(value);
4158+
Object constValue = getObject("const", node, false, location, result);
4159+
if (constValue != null) {
4160+
schema.setConst(constValue);
41624161
}
41634162

41644163
value = getString("contentEncoding", node, false, location, result);

0 commit comments

Comments
 (0)