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
913 B
C#
17 lines
913 B
C#
using System.Text.Json.Serialization;
|
|
using MessagePack;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.ArenaTwoPick;
|
|
|
|
[MessagePackObject]
|
|
public class DoMatchingRequest : BaseRequest
|
|
{
|
|
[JsonPropertyName("card_master_hash")] [Key("card_master_hash")] public string? CardMasterHash { get; set; }
|
|
[JsonPropertyName("deck_no")] [Key("deck_no")] public long DeckNo { get; set; }
|
|
[JsonPropertyName("need_init")] [Key("need_init")] public int NeedInit { get; set; }
|
|
[JsonPropertyName("log")] [Key("log")] public int Log { get; set; }
|
|
[JsonPropertyName("excluded_field_id_list")] [Key("excluded_field_id_list")] public List<long> ExcludedFieldIdList { get; set; } = new();
|
|
[JsonPropertyName("use_stage_select")] [Key("use_stage_select")] public int UseStageSelect { get; set; }
|
|
[JsonPropertyName("is_default_skin")] [Key("is_default_skin")] public int IsDefaultSkin { get; set; }
|
|
}
|