guardrail-dev / guardrail-dev/guardrail

No error message emitted when invalid application/x-www-form-urlencoded specified, bug with swagger-parser

Open
#1,016 2 comments 1 reaction 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

Using:
- `sbt.version=1.4.7`
- guardrail version `0.62.0`
- akka-http server generator

While generating the server I get the following error.

```
Unable to generate decoder for application/x-www-form-urlencoded (.paths./Demo.operations.POST.consumes[0])
Error:No decoders available (.paths./Demo.operations.POST.consumes)
[error] (api-impl / Compile / guardrail) com.twilio.guardrail.sbt.CodegenFailedException
```

Using the following swagger spec:

```yaml
openapi: 3.0.0
info:
title: ScalaServer bug
version: 0.0.1
paths:
/Demo:
post:
operationId: test
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: string
example: Hello

responses:
'200':
description: OK
```

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.