softwaremill / sttp-apispec

OpenAPI, AsyncAPI and JSON Schema Scala models.
Apache License 2.0
23 stars 11 forks source link

Header doesnt encode and decode the same way #128

Open hejfelix opened 9 months ago

hejfelix commented 9 months ago

Reproduce:

import sttp.apispec.openapi.Header
import sttp.apispec.openapi.circe.*
import io.circe.syntax.*
val header = Header()

val actual = header.asJson.as[Header]
println(actual)

outputs:

Left(DecodingFailure at .examples: Got value 'null' with wrong type, expecting object)

the end result is that I cannot parse json or yaml produced with this library.