From 1ad50f74153996e549fb7071446f7f0c3fb17eff Mon Sep 17 00:00:00 2001 From: Michael Bryzek Date: Tue, 25 Jun 2024 21:21:22 -0400 Subject: [PATCH] Fix mock generator for enums that are part of a union --- .../scala/models/generator/mock/MockFactoriesGenerator.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scala-generator/src/main/scala/models/generator/mock/MockFactoriesGenerator.scala b/scala-generator/src/main/scala/models/generator/mock/MockFactoriesGenerator.scala index 0cd46d5e..bc56eb12 100644 --- a/scala-generator/src/main/scala/models/generator/mock/MockFactoriesGenerator.scala +++ b/scala-generator/src/main/scala/models/generator/mock/MockFactoriesGenerator.scala @@ -71,7 +71,7 @@ object MockFactoriesGenerator extends CodeGenerator { private[this] def needsWrapper(datatype: ScalaDatatype): Boolean = { datatype match { - case _: ScalaPrimitive.Model | _: ScalaPrimitive.GeneratedModel | _: ScalaPrimitive.Union => { + case _: ScalaPrimitive.Enum | _: ScalaPrimitive.Model | _: ScalaPrimitive.GeneratedModel | _: ScalaPrimitive.Union => { false } case _ => true