Enumerations are not displayed correctly in Open API Spec after Update

After updating to newer versions, the Enums are displayed like

image

val tapirVersion = "1.9.2"
val openapiCirceVersion = "0.7.3"
lazy val tapirDependencies = Seq(
  "com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % tapirVersion,
  "com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirVersion,
  "com.softwaremill.sttp.tapir" %% "tapir-redoc-bundle" % tapirVersion,
  "com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % openapiCirceVersion,
  "com.softwaremill.sttp.tapir" %% "tapir-iron" % tapirVersion
)

Before it showed the values of the enum (sorry I was not allowed to add another screenshot), with

val tapirVersion = "1.2.10"
val openapiCirceVersion = "0.3.2"

The Problem seems to be related with io.circe.derivation.ConfiguredEnumCodec:

enum InvoiceCategory derives ConfiguredEnumCodec:
  case `Travel Expenses`, Misc, `Software License Costs`

Enums that derive from io.circe.derivation.ConfiguredCodec work as expected.

I could not find something in the change log. Is this a bug or do I need to adjust something?

There were some changes to enumerations - if your enumeration is part of the body, see Enumerations — tapir 1.x documentation for a possible fix. Otherwise, it would be great to have an example reproducing the problem.

1 Like

Thanks, that did the trick, looks even better now:
image

1 Like