guardrail
guardrail copied to clipboard
Cannot define a non-JSON-decoded requestBody
Version tested: sbt-guardrail 0.52.1
Using the OpenAPI 3 specification, I cannot define a requestBody which is interpreted as a plain string, or binary octet-stream. (Using the akka-http generator)
Using an example from the OpenAPI 3 docs, I should be able to do:
requestBody:
required: true
content:
"text/plain":
However that generates an exception.
I can do this and guardrail compiles:
requestBody:
required: true
content:
"text/plain":
schema:
type: string
format: string
But then in the generated Routes.scala, I still see json unmarshalling via Circe being attempted.