@@ -766,11 +766,6 @@ public String getString(String key, ObjectNode node, boolean required, String lo
766
766
return getString (key , node , required , location , result , null );
767
767
}
768
768
769
- public String getStringWithDefaultValueSet (String key , ObjectNode node , boolean required , String location , ParseResult result ) {
770
-
771
- return getString (key , node , required , location , result , null );
772
- }
773
-
774
769
public Set <String > getKeys (ObjectNode node ) {
775
770
Set <String > keys = new LinkedHashSet <>();
776
771
if (node == null ) {
@@ -1325,23 +1320,6 @@ public Boolean getBoolean(String key, ObjectNode node, boolean required, String
1325
1320
return value ;
1326
1321
}
1327
1322
1328
- public Boolean getBooleanWithDefaultValue (String key , ObjectNode node , String location ) {
1329
- Boolean value = null ;
1330
- JsonNode v = node .get (key );
1331
- if (node == null || v == null ) {
1332
- return false ;
1333
- } else {
1334
- if (v .getNodeType ().equals (JsonNodeType .BOOLEAN )) {
1335
- value = v .asBoolean ();
1336
- } else if (v .getNodeType ().equals (JsonNodeType .STRING )) {
1337
- String stringValue = v .textValue ();
1338
- return Boolean .parseBoolean (stringValue );
1339
- }
1340
- }
1341
- return value ;
1342
- }
1343
-
1344
-
1345
1323
public BigDecimal getBigDecimal (String key , ObjectNode node , boolean required , String location , ParseResult result ) {
1346
1324
BigDecimal value = null ;
1347
1325
JsonNode v = node .get (key );
@@ -1496,7 +1474,7 @@ public Parameter getParameter(ObjectNode obj, String location, ParseResult resul
1496
1474
parameter .setDescription (value );
1497
1475
}
1498
1476
1499
- Boolean required = getBooleanWithDefaultValue ("required" , obj , location );
1477
+ Boolean required = getBoolean ("required" , obj , false , location , result );
1500
1478
if (required != null ) {
1501
1479
parameter .setRequired (required );
1502
1480
}else {
@@ -2256,7 +2234,6 @@ public Schema getSchema(ObjectNode node, String location, ParseResult result){
2256
2234
schema .setDefault (value );
2257
2235
}
2258
2236
2259
-
2260
2237
//discriminator
2261
2238
2262
2239
bool = getBoolean ("nullable" , node , false , location , result );
@@ -2295,12 +2272,11 @@ public Schema getSchema(ObjectNode node, String location, ParseResult result){
2295
2272
schema .setExample (example );
2296
2273
}
2297
2274
2298
- bool = getBooleanWithDefaultValue ("deprecated" , node , location );
2275
+ bool = getBoolean ("deprecated" , node , false , location , result );
2299
2276
if (bool != null ){
2300
2277
schema .setDeprecated (bool );
2301
2278
}
2302
2279
2303
-
2304
2280
Map <String ,Object > extensions = getExtensions (node );
2305
2281
if (extensions != null && extensions .size () > 0 ) {
2306
2282
schema .setExtensions (extensions );
@@ -2621,7 +2597,7 @@ public Operation getOperation(ObjectNode obj, String location, ParseResult resul
2621
2597
operation .setCallbacks (callbacks );
2622
2598
}
2623
2599
2624
- Boolean deprecated = getBooleanWithDefaultValue ("deprecated" , obj , location );
2600
+ Boolean deprecated = getBoolean ("deprecated" , obj , false , location , result );
2625
2601
if (deprecated != null ) {
2626
2602
operation .setDeprecated (deprecated );
2627
2603
}
0 commit comments