title: How to use swagger-akka-http annotations for classes containing scala traits?
body: <p>The naive approach of using <a href="https://github.com/swagger-akka-http/swagger-akka-http" rel="nofollow noreferrer">swagger-akka-http</a> to annotate a case class containing traits would be</p>
  <pre><code>@Schema(description = &quot;identifier of data value&quot;)
  trait Identifier {
    val id: String
  }
  
  @Schema(description = &quot;value&quot;)
  trait Value {
    val value: Int
  }
  
  @Schema(description = &quot;combine identifier and value&quot;)
  trait Event extends Identifier with Value
  
  @Schema(description = &quot;response to data query&quot;)
  case class Response(event: Event)
  </code></pre>
  <p>This produces</p>
  <pre><code>&quot;Response&quot; : {
    &quot;required&quot; : [ &quot;event&quot; ],
    &quot;type&quot; : &quot;object&quot;,
    &quot;properties&quot; : {
      &quot;event&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/Event&quot;
      }
    },
    &quot;description&quot; : &quot;response to data query&quot;
  },
  &quot;Event&quot; : {
    &quot;type&quot; : &quot;object&quot;,
    &quot;description&quot; : &quot;combine identifier and value&quot;
  }
  </code></pre>
  <p>Unfortunately the schema <code>Event</code> does not contain any information. Is there a way to annotate such a structure successfully?</p>
  <p><strong>Minimal example:</strong> <a href="https://github.com/tilmann-bartsch/swagger-akka-http-annotate-traits-test" rel="nofollow noreferrer">swagger-akka-http-annotate-traits-test</a></p>