Commit ceb4646
Add ability to support strict JSON unmarshal for
* Add ability to support strict JSON unmarshal for `limits`
This is the default behaviour for YAML now.
```
in := `{"unknown_fields": 100}`
l := cortex.Limits{}
fmt.Println(yaml.UnmarshalStrict([]byte(in), &l))
// yaml: unmarshal errors:
// line 1: field unknown_fields not found in type validation.plain
```
This PR adds same behaviour if unmarshalled from JSON input as well.
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
* Add changelog
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
* Update CHANGELOG.md
Co-authored-by: Steve Simpson <steve.simpson@grafana.com>
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Co-authored-by: Steve Simpson <steve.simpson@grafana.com>limits (#4298)1 parent 8e84b22 commit ceb4646
3 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
232 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
| |||
0 commit comments