Commit cf1cc45
authored
[CLD-569]:fix(operations): handle marshalable edge case (#344)
This bug was discovered in this [support
ticket](https://chainlink-core.slack.com/archives/C08QF1BEW4T/p1756395130562909)
after some investigations
Since all the fields in AddressRef is public and each field is either
public or implement Marshaler and Unmarshaler , operations api should be
able to serialise it. There is a bug where operations API fails to
serialize it if both marshalJSON and unmarshalJSON are different
receiver types eg
```
func (s LabelSet) MarshalJSON() ([]byte, error) {
...
}
func (s *LabelSet) UnmarshalJSON(data []byte) error {
...
}
```
Note MarshalJSON is a value receiver and UnmarshalJSON is a pointer
receiver, then even though LabelSet is serializable but operations api
validation fails it.
JIRA: https://smartcontract-it.atlassian.net/browse/CLD-5691 parent ba11ea0 commit cf1cc45
File tree
3 files changed
+21
-4
lines changed- .changeset
- operations
3 files changed
+21
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | | - | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
| 83 | + | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| |||
0 commit comments