We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d566fe4 commit 4be4caaCopy full SHA for 4be4caa
packages/mock/src/faker/resolvers/value.ts
@@ -163,9 +163,12 @@ export const resolveMockValue = ({
163
specKey: isRootKey(specKey, context.target) ? undefined : specKey,
164
});
165
}
166
+
167
return {
168
...scalar,
- type: newSchema.type as string,
169
+ type:
170
+ (newSchema.type as string | undefined) ??
171
+ (newSchema.isRef ? 'object' : undefined),
172
};
173
174
@@ -181,9 +184,10 @@ export const resolveMockValue = ({
181
184
splitMockImplementations,
182
185
allowOverride,
183
186
-
187
188
- type: schema.type as string,
189
190
+ (schema.type as string | undefined) ??
191
+ (schema.isRef ? 'object' : undefined),
192
193
0 commit comments