File tree 6 files changed +15
-15
lines changed
test/specs/circular-multi
6 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1
- helper . bundled . complexOrder = {
1
+ helper . bundled . circularMulti = {
2
2
$schema : 'http://json-schema.org/draft-07/schema#' ,
3
3
properties : {
4
4
actions : {
5
5
type : 'object' ,
6
6
properties : {
7
7
affirmativeAction : {
8
+ $ref : '#/properties/actions/properties/prevAction'
9
+ } ,
10
+ negativeAction : {
11
+ $ref : '#/properties/actions/properties/prevAction'
12
+ } ,
13
+ prevAction : {
8
14
type : 'object' ,
9
15
properties : {
10
16
$id : 'text_assets' ,
11
17
oneOf : [
12
18
{
13
- $ref : '#/properties/actions/properties/affirmativeAction /properties/definitions/asset'
19
+ $ref : '#/properties/actions/properties/prevAction /properties/definitions/asset'
14
20
} ,
15
21
{
16
- $ref : '#/properties/actions/properties/affirmativeAction /properties/definitions/asset'
22
+ $ref : '#/properties/actions/properties/prevAction /properties/definitions/asset'
17
23
}
18
24
] ,
19
25
definitions : {
20
26
switchWrapper : {
21
27
type : 'object' ,
22
- $ref : '#/properties/actions/properties/affirmativeAction /properties/definitions/switch'
28
+ $ref : '#/properties/actions/properties/prevAction /properties/definitions/switch'
23
29
} ,
24
30
asset : {
25
31
type : 'object' ,
26
32
$id : 'asset_action' ,
27
33
properties : {
28
34
label : {
29
- $ref : '#/properties/actions/properties/affirmativeAction /properties'
35
+ $ref : '#/properties/actions/properties/prevAction /properties'
30
36
}
31
37
}
32
38
} ,
33
39
switch : {
34
40
type : 'array' ,
35
- $ref : '#/properties/actions/properties/affirmativeAction /properties/definitions/asset'
41
+ $ref : '#/properties/actions/properties/prevAction /properties/definitions/asset'
36
42
}
37
43
}
38
44
}
39
- } ,
40
- negativeAction : {
41
- $ref : '#/properties/actions/properties/affirmativeAction'
42
- } ,
43
- prevAction : {
44
- $ref : '#/properties/actions/properties/affirmativeAction'
45
45
}
46
46
}
47
47
}
Original file line number Diff line number Diff line change 1
- describe ( '$refs that are in the same file but also circular ' , function ( ) {
1
+ describe ( 'multiple circular $refs at the same depth in the schema ' , function ( ) {
2
2
'use strict' ;
3
3
4
4
it ( 'should bundle successfully' , function ( ) {
5
5
var parser = new $RefParser ( ) ;
6
6
7
7
return parser
8
- . bundle ( path . rel ( 'specs/complexOrder /definitions/root.json' ) )
8
+ . bundle ( path . rel ( 'specs/circular-multi /definitions/root.json' ) )
9
9
. then ( function ( schema ) {
10
10
expect ( schema ) . to . deep . equal ( parser . schema ) ;
11
- expect ( schema ) . to . deep . equal ( helper . bundled . complexOrder ) ;
11
+ expect ( schema ) . to . deep . equal ( helper . bundled . circularMulti ) ;
12
12
} ) ;
13
13
} ) ;
14
14
} ) ;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments