guardrail-dev / guardrail-dev/guardrail

[akka-http] form-urlencoded requestBody with format:binary generates uncompilable code

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

Description

Presumably in the case of both `UrlencodedFormData` and `MultipartFormData`, optional `format: binary` fields should be excluded from the `UrlencodedFormData` path parameter parsing, emitting a static `None` so it's compatible with the other `Unmarshaller` types.

In the case of a _required_ `format: binary`, we should just emit a user error and fail to generate bad code.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the akka-http generator paths for UrlencodedFormData and MultipartFormData, focusing on how optional and required format: binary fields are parsed. Confirm the generated code for optional fields remains compatible with the other Unmarshaller types. Done means optional binary fields emit static None and required binary fields produce a user error rather than uncompilable code.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, scala
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.