guardrail-dev / guardrail-dev/guardrail

Generating 404 response without a content generates a non-compiling code

Open
#735 0 comments 0 reactions 0 assignees View on GitHub
bug core good first issue help wanted
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

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.