File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
modules/swagger-parser/src/test Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 3
3
import io .swagger .v3 .oas .models .Components ;
4
4
import io .swagger .v3 .oas .models .OpenAPI ;
5
5
import io .swagger .v3 .oas .models .media .ArraySchema ;
6
+ import io .swagger .v3 .oas .models .media .ObjectSchema ;
6
7
import io .swagger .v3 .oas .models .media .Schema ;
7
8
import io .swagger .v3 .oas .models .PathItem ;
8
9
@@ -538,6 +539,17 @@ public void testIssue1003_ExtensionsClassloader() {
538
539
}
539
540
assertNotNull (api );
540
541
}
542
+
543
+ @ Test
544
+ public void testIssue1086 () {
545
+ OpenAPIParser openApiParser = new OpenAPIParser ();
546
+ ParseOptions options = new ParseOptions ();
547
+ OpenAPI openAPI = openApiParser .readLocation ("issue1086.yaml" , null , options ).getOpenAPI ();
548
+ Map <String , Schema > schemas = openAPI .getComponents ().getSchemas ();
549
+ ObjectSchema schema = (ObjectSchema ) schemas .get ("AssessCandidate" ).getProperties ().get ("test_results" );
550
+ Schema score = schema .getProperties ().get ("score" );
551
+ assertEquals (score .getMultipleOf ().intValue (), 1 );
552
+ }
541
553
542
554
}
543
555
Original file line number Diff line number Diff line change
1
+ openapi : 3.0.0
2
+ info :
3
+ version : 0.0.0
4
+ title : " test"
5
+ components :
6
+ schemas :
7
+ AssessCandidate :
8
+ type : object
9
+ properties :
10
+ candidate :
11
+ type : object
12
+ properties :
13
+ id :
14
+ type : string
15
+ required :
16
+ - id
17
+ test_results :
18
+ type : object
19
+ properties :
20
+ id :
21
+ type : string
22
+ status :
23
+ type : string
24
+ score :
25
+ type : number
26
+ multipleOf : 1
27
+ date :
28
+ type : string
29
+ format : date
30
+ comment :
31
+ type : string
32
+ result_url :
33
+ type : string
34
+ required :
35
+ - candidate
36
+ - test_results
You can’t perform that action at this time.
0 commit comments