guardrail-dev / guardrail-dev/guardrail

Cannot define a non-JSON-decoded requestBody

Open
#369 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted scala-akka-http
Dominant language
Scala
Stars
541
Forks
138
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.