Skip to content

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

@Pask423

Description

@Pask423

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions