File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
modules/swagger-parser/src/test Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -554,6 +554,14 @@ public void testIssue1003_ExtensionsClassloader() {
554
554
}
555
555
556
556
@ Test
557
+ public void testIssue1070 () {
558
+ SwaggerParseResult result = new OpenAPIParser ().readLocation ("issue1070.yaml" , null , null );
559
+ List required = result .getOpenAPI ().getComponents ().getSchemas ().get ("AmountAndCurrency" ).getRequired ();
560
+ assertEquals (required .size (), 2 );
561
+ assertTrue (required .contains ("Amount" ));
562
+ assertTrue (required .contains ("Currency" ));
563
+ }
564
+
557
565
public void testIssue1086 () {
558
566
OpenAPIParser openApiParser = new OpenAPIParser ();
559
567
ParseOptions options = new ParseOptions ();
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
+ AmountAndCurrency :
8
+ additionalProperties : false
9
+ description : >-
10
+ Amount with a currency.
11
+ properties :
12
+ Amount :
13
+ $ref : ' #/components/schemas/AssessCandidate'
14
+ Currency :
15
+ description : >-
16
+ Representation of currencies and funds".
17
+ pattern : ' ^[A-Z]{3,3}$'
18
+ type : string
19
+ required :
20
+ - Amount
21
+ - Currency
22
+ type : object
23
+ AssessCandidate :
24
+ type : object
25
+ properties :
26
+ candidate :
27
+ type : object
28
+ properties :
29
+ id :
30
+ type : string
31
+ required :
32
+ - id
33
+ test_results :
34
+ type : object
35
+ properties :
36
+ id :
37
+ type : string
38
+ status :
39
+ type : string
40
+ score :
41
+ type : number
42
+ multipleOf : 1
43
+ date :
44
+ type : string
45
+ format : date
46
+ comment :
47
+ type : string
48
+ result_url :
49
+ type : string
50
+ required :
51
+ - candidate
52
+ - test_results
You can’t perform that action at this time.
0 commit comments