guardrail-dev / guardrail-dev/guardrail

Parameters of "type: string" reject numeric values as "malformed"

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

Description

💂‍♀️🚃We are sending query parameters that can be either a number or alpha-numeric input

In the latest version and earlier. The following simple fragment when generated as a route will only allow alpha-numeric values to be passed in the request.

For example: using a numeric value is rejected as "The query parameter 'a' was malformed: String"

```paths:
/foo:
get:
operationId: getFoo
x-scala-package: foo
produces:
- application/json
parameters:
- name: a
in: query
type: string
```
🙉Hope that makes sense that we may expect the decoder to allow numerics to be converted to a string rather than be rejected.

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.