MessagePack [Key("...")]-keyed contracts reject unknown fields, so request
DTOs that omit BaseRequest's envelope (viewer_id, steam_id,
steam_session_ticket) fail deserialization on the real msgpack wire path.
Routing smoke + JSON-direct tests didn't catch this because S.T.J. tolerates
extra keys and the routing smoke uses ValidBaseRequestJson, but anything
sent via the actual client encrypted=True path threw
MessagePackSerializationException.
Fix: every Arena*Request now inherits BaseRequest. Also updates the JSON
controller tests + e2e to include the envelope so the [ApiController]
auto-400 validation passes.
Discovered via /arena_colosseum/get_fee_info crash on the in-game arena
screen.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
17 lines
859 B
C#
17 lines
859 B
C#
using System.Text.Json.Serialization;
|
|
using MessagePack;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.ArenaTwoPick;
|
|
|
|
[MessagePackObject]
|
|
public class BattleFinishRequest : BaseRequest
|
|
{
|
|
[JsonPropertyName("class_id")] [Key("class_id")] public int ClassId { get; set; }
|
|
[JsonPropertyName("total_turn")] [Key("total_turn")] public int TotalTurn { get; set; }
|
|
[JsonPropertyName("evolve_count")] [Key("evolve_count")] public int EvolveCount { get; set; }
|
|
[JsonPropertyName("enemy_evolve_count")] [Key("enemy_evolve_count")] public int EnemyEvolveCount { get; set; }
|
|
[JsonPropertyName("battle_result")] [Key("battle_result")] public int BattleResult { get; set; }
|
|
[JsonPropertyName("is_retire")] [Key("is_retire")] public int IsRetire { get; set; }
|
|
[JsonPropertyName("SDTRB")] [Key("SDTRB")] public int Sdtrb { get; set; }
|
|
}
|