@@ -18,32 +18,32 @@ describe("Schema with an extensive amount of circular $refs", () => {
18
18
19
19
// Ensure that a non-circular $ref was dereferenced.
20
20
expect ( schema . components ?. schemas ?. ArrayOfMappedData ) . toStrictEqual ( {
21
- type : ' array' ,
21
+ type : " array" ,
22
22
items : {
23
- type : ' object' ,
23
+ type : " object" ,
24
24
properties : {
25
- mappingTypeName : { type : ' string' } ,
26
- sourceSystemValue : { type : ' string' } ,
27
- mappedValueID : { type : ' string' } ,
28
- mappedValue : { type : ' string' }
25
+ mappingTypeName : { type : " string" } ,
26
+ sourceSystemValue : { type : " string" } ,
27
+ mappedValueID : { type : " string" } ,
28
+ mappedValue : { type : " string" } ,
29
29
} ,
30
- additionalProperties : false
31
- }
30
+ additionalProperties : false ,
31
+ } ,
32
32
} ) ;
33
33
34
34
// Ensure that a circular $ref **was** dereferenced.
35
35
expect ( circularRefs ) . toHaveLength ( 23 ) ;
36
36
expect ( schema . components ?. schemas ?. Customer ?. properties ?. customerNode ) . toStrictEqual ( {
37
- " type" : "array" ,
38
- " items" : {
39
- type : ' object' ,
37
+ type : "array" ,
38
+ items : {
39
+ type : " object" ,
40
40
properties : {
41
41
customerNodeGuid : expect . any ( Object ) ,
42
42
customerGuid : expect . any ( Object ) ,
43
43
nodeId : expect . any ( Object ) ,
44
- customerGu : expect . any ( Object )
44
+ customerGu : expect . any ( Object ) ,
45
45
} ,
46
- additionalProperties : false
46
+ additionalProperties : false ,
47
47
} ,
48
48
} ) ;
49
49
} ) ;
@@ -55,31 +55,31 @@ describe("Schema with an extensive amount of circular $refs", () => {
55
55
const schema = await parser . dereference ( path . rel ( "test/specs/circular-extensive/schema.json" ) , {
56
56
dereference : {
57
57
onCircular : ( ref : string ) => circularRefs . add ( ref ) ,
58
- circular : ' ignore' ,
58
+ circular : " ignore" ,
59
59
} ,
60
60
} ) ;
61
61
62
62
// Ensure that a non-circular $ref was dereferenced.
63
63
expect ( schema . components ?. schemas ?. ArrayOfMappedData ) . toStrictEqual ( {
64
- type : ' array' ,
64
+ type : " array" ,
65
65
items : {
66
- type : ' object' ,
66
+ type : " object" ,
67
67
properties : {
68
- mappingTypeName : { type : ' string' } ,
69
- sourceSystemValue : { type : ' string' } ,
70
- mappedValueID : { type : ' string' } ,
71
- mappedValue : { type : ' string' }
68
+ mappingTypeName : { type : " string" } ,
69
+ sourceSystemValue : { type : " string" } ,
70
+ mappedValueID : { type : " string" } ,
71
+ mappedValue : { type : " string" } ,
72
72
} ,
73
- additionalProperties : false
74
- }
73
+ additionalProperties : false ,
74
+ } ,
75
75
} ) ;
76
76
77
77
// Ensure that a circular $ref was **not** dereferenced.
78
78
expect ( circularRefs ) . toHaveLength ( 23 ) ;
79
79
expect ( schema . components ?. schemas ?. Customer ?. properties ?. customerNode ) . toStrictEqual ( {
80
- " type" : "array" ,
81
- " items" : {
82
- " $ref" : "#/components/schemas/CustomerNode" ,
80
+ type : "array" ,
81
+ items : {
82
+ $ref : "#/components/schemas/CustomerNode" ,
83
83
} ,
84
84
} ) ;
85
85
} ) ;
@@ -96,7 +96,9 @@ describe("Schema with an extensive amount of circular $refs", () => {
96
96
} catch ( err ) {
97
97
expect ( err ) . to . be . an . instanceOf ( ReferenceError ) ;
98
98
expect ( err . message ) . to . contain ( "Circular $ref pointer found at " ) ;
99
- expect ( err . message ) . to . contain ( "specs/circular-extensive/schema.json#/components/schemas/AssignmentExternalReference/properties/assignment/oneOf/0" ) ;
99
+ expect ( err . message ) . to . contain (
100
+ "specs/circular-extensive/schema.json#/components/schemas/AssignmentExternalReference/properties/assignment/oneOf/0" ,
101
+ ) ;
100
102
101
103
// $Refs.circular should be true
102
104
expect ( parser . $refs . circular ) . to . equal ( true ) ;
0 commit comments