There is also no mention of this object member in the spec here.
Problem Description
This makes serializing a response body rather awkward as most languages don't allow digits for struct members or object keys. For example, making an interface for serializing a json response string in typescript won't work because typescript doesn't allow variables or object members/keys to start with a digit.
Expected Result
I expected the member to be present in the spec, and to follow widespread convention of most programming languages
Actual Result
A member is present in the response that i wasn't expecting, and in this case a typescript interface cannot be defined due to the aforementioned first-place digit member.
Developer Impact
This makes working or writing a library for the api rather difficult as serialization is relatively awkward
Frequency: Every API call.
Severity: Relatively minor, there is a small workaround that works but doesn't look very good.
Inspect the response object and cross reference it with the specification above
Temporary workaround
When defining an interface for the response object (in my case, typescript), you can define string literal keys, like so:
export interface Challenges {
"12AssistStreakCount": number;
...
}
// Access like so:
x.["12AssistStreakCount"]
Issue Comments
The priority for this bug is rather low, but having an up to date spec for the API reference would be a good addition. I have a feeling this one might have flown under the radar because there is a lot of other members in the full response object that start with some numeric notation, but written out fully. (such as threeWardsOneSweeperCount, etc)
Bug Description
A member inside the ParticipantDto type called "challenges" contains a digit in the first positition of the key/name:
12AssistStreakCount
(Json structure:MatchDto.info.participants[index].challenges.12AssistStreakCount
There is also no mention of this object member in the spec here.
Problem Description
This makes serializing a response body rather awkward as most languages don't allow digits for struct members or object keys. For example, making an interface for serializing a json response string in typescript won't work because typescript doesn't allow variables or object members/keys to start with a digit.
Expected Result
I expected the member to be present in the spec, and to follow widespread convention of most programming languages
Actual Result
A member is present in the response that i wasn't expecting, and in this case a typescript interface cannot be defined due to the aforementioned first-place digit member.
Developer Impact
This makes working or writing a library for the api rather difficult as serialization is relatively awkward
Preconditions
None
Repro Steps
Temporary workaround When defining an interface for the response object (in my case, typescript), you can define string literal keys, like so:
Issue Comments
The priority for this bug is rather low, but having an up to date spec for the API reference would be a good addition. I have a feeling this one might have flown under the radar because there is a lot of other members in the full response object that start with some numeric notation, but written out fully. (such as
threeWardsOneSweeperCount
, etc)Edit: grammar/spelling