@@ -366,7 +366,7 @@ public void testSiblingsReferenceJSONSchema2() {
366
366
assertTrue (profile .getPatternProperties ().containsKey ("^S_" ));
367
367
}
368
368
369
- @ Test (description = "Test siblings with $ref for patternProperties, pattern, additionalProperties,exclusiveMaximum,exclusiveMinimum" )
369
+ @ Test (description = "Test siblings with $ref for patternProperties, pattern, additionalProperties,exclusiveMaximum,exclusiveMinimum, $schema " )
370
370
public void testSiblingsReferenceJSONSchema3 () {
371
371
ParseOptions options = new ParseOptions ();
372
372
String refSibling = "openapi: 3.1.0\n " +
@@ -394,6 +394,7 @@ public void testSiblingsReferenceJSONSchema3() {
394
394
assertNotNull (openAPI );
395
395
Schema profile = openAPI .getComponents ().getSchemas ().get ("profile" );
396
396
assertNotNull (profile .get$ref ());
397
+ assertEquals (profile .get$schema (), "https://json-schema.org/draft/2020-12/schema" );
397
398
assertEquals (profile .get$anchor (),"foo" );
398
399
assertEquals (profile .get$id (),"profile-id" );
399
400
assertTrue (profile .getExclusiveMaximumValue ().intValue ()==12 );
@@ -434,7 +435,7 @@ public void testSiblingsReferenceJSONSchema4() {
434
435
assertTrue (profile .getContentSchema ().getTypes ().contains ("string" ));
435
436
}
436
437
437
- @ Test (description = "Test siblings with $ref for contains, maxContains, minContains, prefixItems, uniqueItems, propertyNames, unevaluatedProperties" )
438
+ @ Test (description = "Test siblings with $ref for contains, maxContains, minContains, prefixItems, uniqueItems, propertyNames, unevaluatedProperties, unevaluatedItems " )
438
439
public void testSiblingsReferenceJSONSchema5 () {
439
440
ParseOptions options = new ParseOptions ();
440
441
String refSibling = "openapi: 3.1.0\n " +
@@ -459,6 +460,8 @@ public void testSiblingsReferenceJSONSchema5() {
459
460
" $ref: ./ex.json#user-profile\n " +
460
461
" unevaluatedProperties:\n " +
461
462
" type: object\n " +
463
+ " unevaluatedItems:\n " +
464
+ " type: object\n " +
462
465
" Person:\n " +
463
466
" type: array\n " +
464
467
" prefixItems:\n " +
@@ -510,6 +513,9 @@ public void testSiblingsReferenceJSONSchema5() {
510
513
assertNotNull (patientPersonSchema .getUnevaluatedProperties ());
511
514
assertTrue (patientPersonSchema .getUnevaluatedProperties () instanceof Boolean );
512
515
assertFalse (((Boolean )patientPersonSchema .getUnevaluatedProperties ()).booleanValue ());
516
+
517
+ //unevaluatedItems
518
+ assertNotNull (profile .getUnevaluatedItems ());
513
519
}
514
520
515
521
@ Test (description = "Test siblings with $ref for if - then - else, dependentRequired, dependentSchemas" )
@@ -672,6 +678,7 @@ public void testArbitraryKeywordsJSONSchema() {
672
678
"components:\n " +
673
679
" schemas:\n " +
674
680
" Fruit:\n " +
681
+ " deprecated: true\n " +
675
682
" type: string\n " +
676
683
" example: kiwi\n " +
677
684
" examples:\n " +
@@ -684,6 +691,7 @@ public void testArbitraryKeywordsJSONSchema() {
684
691
assertNotNull (openAPI );
685
692
assertNotNull (openAPI .getComponents ().getSchemas ().get ("Fruit" ).getExtensions ().get ("arbitraryKeyword" ));
686
693
assertNotNull (openAPI .getComponents ().getSchemas ().get ("Fruit" ).getExtensions ().get ("x-normalExtension" ));
694
+ assertTrue (openAPI .getComponents ().getSchemas ().get ("Fruit" ).getDeprecated ());
687
695
}
688
696
689
697
@ Test (description = "Test for Tuple parsing" )
0 commit comments