Commit 028c10e
Tim Connor
Fix bug with handling array params.
Fixes an issue introduced in 7e43215 that results in Array leaf params being ignored.
For example, given the following API and Request:
```
class Api < Grape::API
params do
optional :array, type: Array
end
post 'example' do
declared(params, include_missing: true)
end
end
POST /example
{ "array": ["value"] }
```
Expected Response Body:
```
{ "array": ["value"] }
```
Observed Response Body:
```
{ "array": [] }
```1 parent f1aaab6 commit 028c10e
File tree
2 files changed
+15
-2
lines changed- lib/grape/dsl
- spec/grape/endpoint
2 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
138 | 152 | | |
139 | 153 | | |
140 | 154 | | |
| |||
0 commit comments