Commit fb4b446
committed
fix(parameter-based): respect [EnumMember] attribute when serialising enum query parameters
ParameterBased.getParameters() was calling .ToString() on enum values, producing
the C# identifier name (e.g. FINANCIALEVENTGROUPID) rather than the wire format
declared in [EnumMember(Value = "...")] (e.g. FINANCIAL_EVENT_GROUP_ID). This
caused every enum-typed query parameter to be silently rejected by Amazon APIs.
Fix: use StringEnumConverter (Newtonsoft.Json) for both the scalar enum and the
IEnumerable<TEnum> branches so [EnumMember] attribute values are honoured.
Also: type relatedIdentifierName on ParameterListFinancialTransactions20240619 as
RelatedIdentifierNameEnum? instead of string? now that the serialisation is correct.1 parent 3eb8bac commit fb4b446
2 files changed
Lines changed: 16 additions & 5 deletions
File tree
- Source/FikaAmazonAPI/Parameter
- Finance
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
| |||
0 commit comments