File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,14 @@ export const getMockObject = ({
149
149
if ( isBoolean ( item . additionalProperties ) ) {
150
150
return { value : `{}` , imports : [ ] , name : item . name } ;
151
151
}
152
+ if (
153
+ isReference ( item . additionalProperties ) &&
154
+ existingReferencedProperties . includes (
155
+ item . additionalProperties . $ref . split ( '/' ) . pop ( ) ! ,
156
+ )
157
+ ) {
158
+ return { value : `{}` , imports : [ ] , name : item . name } ;
159
+ }
152
160
153
161
const resolvedValue = resolveMockValue ( {
154
162
schema : {
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const getMockScalarJsTypes = (
100
100
`min: ${ mockOptionsWithoutFunc . arrayMin } , ` +
101
101
`max: ${ mockOptionsWithoutFunc . arrayMax } }` +
102
102
`)}, () => faker.number.int())`
103
- : 'faker.number.int().toString() ' ;
103
+ : 'faker.number.int()' ;
104
104
case 'string' :
105
105
return isArray
106
106
? `Array.from({length: faker.number.int({` +
You can’t perform that action at this time.
0 commit comments