title: springdoc-openapi with generic variables
body: <p>I have a problem with springdoc and generic variables. Swagger UI does not show me the '@type' keys.</p>
  <p>When I do a request at the API the types are included in the json.</p>
  <p><a href="https://i.stack.imgur.com/hDXjM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hDXjM.png" alt="This is the api request result" /></a></p>
  <p>But in the Swagger UI schemas the types are missing (also in the OpenApi.json).
  <a href="https://i.stack.imgur.com/1Vg9f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Vg9f.png" alt="This is schemas in Swagger UI" /></a></p>
  <p>Here is my code, the full project can be found on github <a href="https://github.com/incluedu/swagger-demo" rel="nofollow noreferrer">https://github.com/incluedu/swagger-demo</a></p>
  <pre><code>@JsonIgnoreProperties(ignoreUnknown = true)
  @JsonTypeInfo(
      use = JsonTypeInfo.Id.NAME,
      include = JsonTypeInfo.As.PROPERTY
  )
  @JsonSubTypes(
      JsonSubTypes.Type(value = BoolElement::class, name = &quot;BoolElement&quot;),
      JsonSubTypes.Type(value = IntElement::class, name = &quot;IntElement&quot;),
  )
  interface Element&lt;T&gt; {
      var value :T
  }
  
  data class BoolElement(
      override var value: Boolean = false
  ) : Element&lt;Boolean&gt;
  
  
  data class IntElement(
      override var value: Int = 0
  ) : Element&lt;Int&gt;
  
  
  @Tag(name = &quot;elements&quot;, description = &quot;handle elements&quot;)
  @RequestMapping(&quot;/api/le&quot;)
  interface ElementsApi {
      @GetMapping(&quot;/get&quot;)
      fun getElements(): List&lt;Element&lt;*&gt;&gt;
  }
  
  @RestController
  class ElementsController : ElementsApi {
      val testElements = listOf&lt;Element&lt;*&gt;&gt;(
          BoolElement(true),
          BoolElement(false),
          IntElement(22),
          IntElement(33)
      )
      override fun getElements(): List&lt;Element&lt;*&gt;&gt; = testElements
  }
  </code></pre>
  <p>In the file 'application.properties' I have entered this.</p>
  <pre><code>springdoc.remove-broken-reference-definitions=false
  </code></pre>
  <p>I found this at <a href="https://github.com/springdoc/springdoc-openapi/issues/512" rel="nofollow noreferrer">https://github.com/springdoc/springdoc-openapi/issues/512</a></p>
  <p>Can anyone tell me what I need to do to get my openApi.json file generated correctly. I would like to generate an API for the frontend (Angular2) from this.</p>