File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
packages/mock/src/faker/getters Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,8 @@ export const combineSchemasMock = ({
117
117
}
118
118
119
119
const isObjectBounds =
120
- ! combine || ( combine . separator === 'oneOf' && separator === 'allOf' ) ;
120
+ ! combine ||
121
+ ( [ 'oneOf' , 'anyOf' ] . includes ( combine . separator ) && separator === 'allOf' ) ;
121
122
122
123
if ( ! index && isObjectBounds ) {
123
124
if (
Original file line number Diff line number Diff line change @@ -22,9 +22,49 @@ paths:
22
22
responses :
23
23
' 204 ' :
24
24
description : Ok
25
+ /any-of-included-all-of-pet :
26
+ get :
27
+ summary : Gets anyOf included allOf pets
28
+ operationId : getAnyOfIncludedAllOfPets
29
+ responses :
30
+ ' 200 ' :
31
+ description : Pet
32
+ content :
33
+ application/json :
34
+ schema :
35
+ $ref : ' #/components/schemas/Pet'
25
36
components :
26
37
schemas :
27
38
A :
28
39
type : string
29
40
enum :
30
41
- A
42
+ Pet :
43
+ anyOf :
44
+ - $ref : ' #/components/schemas/Cat'
45
+ - $ref : ' #/components/schemas/Dog'
46
+ Cat :
47
+ type : object
48
+ required :
49
+ - color
50
+ properties :
51
+ color :
52
+ type : string
53
+ Dog :
54
+ allOf :
55
+ - $ref : ' #/components/schemas/DogType'
56
+ - $ref : ' #/components/schemas/DogDetail'
57
+ DogType :
58
+ type : object
59
+ required :
60
+ - type
61
+ properties :
62
+ type :
63
+ type : string
64
+ DogDetail :
65
+ type : object
66
+ required :
67
+ - name
68
+ properties :
69
+ name :
70
+ type : string
You can’t perform that action at this time.
0 commit comments