tapir icon indicating copy to clipboard operation
tapir copied to clipboard

[BUG] Json, CodecFormat.Json in endpoint type results in oneOf in yaml

Open Pask423 opened this issue 4 years ago • 0 comments

Tapir version: 0.20.0-M3

Code to reproduce:

 val personEndpoint = endpoint.get
      .in(header[String]("Test").description("Test token").deprecated())
      .out(webSocketBody[String, CodecFormat.TextPlain, Json, CodecFormat.Json](AkkaStreams))

    val yaml = AsyncAPIInterpreter().toAsyncAPI(personEndpoint, "Header flags", "1.0").toYaml

should result in output yaml containing following lines .

'oneOf:':
      payload: {}
      contentType: application/json

Unfortunately such behavior is not correct.

Pask423 avatar Dec 30 '21 22:12 Pask423