guardrail-dev / guardrail-dev/guardrail
Generating 404 response without a content generates a non-compiling code
- Dominant language
- Scala
- Stars
- 541
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
Hey, I just stumbled upon unexpected bug in guardrail. The definition below generates non-compiling code for __http4s__ server.
```
openapi: 3.0.3
paths:
/api/template/{id}/:
parameters:
- name: id
in: path
required: true
schema:
type: string
get:
operationId: getTemplate
responses:
200:
content:
application/pdf:
schema:
type: string
format: binary
404:
description: Template not found
# Adding these 4 line makes things compile again:
# content:
# text/plain:
# schema:
# type: string
```
I tested in on a `0.59.0.1` version.
Contributor guide
Assessment
This issue has not been assessed yet.