Replies: 2 comments 4 replies
-
/cc @MikeEdgar (swagger-ui), @phillip-kruger (swagger-ui) |
Beta Was this translation helpful? Give feedback.
0 replies
-
@lmlynik you can override the scanned schema for these types using configuration. For example:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question for Quarkus Community:
I'm using https://github.com/carlosedp/scala3-quarkus-quickstart with Quarkus and Scala, and I ran into an issue with how Swagger generates sample data for my Scala case classes.
Here's an excerpt of my code:
I’ve added DefaultScalaModule to Jackson to handle serialization and deserialization for the Scala case classes and enums. Serialization works as expected, but Swagger (OpenAPI) is generating incorrect examples in the UI for Option and enum types:
Ideally, I'd like:
The Option type to be represented as null or omitted (not as an object with empty and defined fields).
The enum (ActivityType) to be represented as a simple string in the Swagger UI, instead of an empty object.
I believe it might be an issue with how Swagger interprets Scala-specific types. Does anyone have suggestions on configuring Jackson or Swagger in Quarkus to fix this, or is the only option to manually craft jsons for OpenAPI to render?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions