From 48a1b6e8803a4ac87e3eddb6305b0d8bd9f597f9 Mon Sep 17 00:00:00 2001 From: Kristoffer Hunnerup Lohse Kabat Date: Wed, 24 Jan 2024 21:45:22 +0100 Subject: [PATCH] feat: only generate the formData mutator if the operation body includes formData information (#1178) --- packages/core/src/generators/verbs-options.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/generators/verbs-options.ts b/packages/core/src/generators/verbs-options.ts index 320009b72..439a4998a 100644 --- a/packages/core/src/generators/verbs-options.ts +++ b/packages/core/src/generators/verbs-options.ts @@ -145,7 +145,8 @@ const generateVerbOptions = async ({ }); const formData = - isString(override?.formData) || isObject(override?.formData) + (isString(override?.formData) || isObject(override?.formData)) && + body.formData ? await generateMutator({ output: output.target, name: operationName,