From e3e680f733e723d604b232102e46bddaad5a7457 Mon Sep 17 00:00:00 2001 From: Alfred Jonsson Date: Fri, 7 Jun 2024 15:32:19 +0200 Subject: [PATCH] fix(msw): also split allof objects (#1442) Co-authored-by: Alfred Jonsson --- packages/mock/src/faker/resolvers/value.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mock/src/faker/resolvers/value.ts b/packages/mock/src/faker/resolvers/value.ts index 8f0f8dc5a..cee6341b0 100644 --- a/packages/mock/src/faker/resolvers/value.ts +++ b/packages/mock/src/faker/resolvers/value.ts @@ -111,7 +111,7 @@ export const resolveMockValue = ({ }); if ( scalar.value && - newSchema.type === 'object' && + (newSchema.type === 'object' || newSchema.allOf) && combine?.separator === 'oneOf' ) { const funcName = `get${pascal(operationId)}Response${pascal(newSchema.name)}Mock`;