using System.Text.Json.Serialization; using decePubClient.Models; namespace decePubClient; /// /// Source-generated JSON metadata for the client's own types, used first by SUtility.DefaultSerializer (HTTP) and by /// Blazored.LocalStorage (Program.cs); PrivaPub.ClientModels' types come from ClientModelsJsonContext. A type missing /// from both fails in Development and the pasture, and is reported on the console elsewhere. Names stay camelCase: /// wwwroot/js/theme.js reads PublicCacheData.pageSettings straight from localStorage. /// [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, IgnoreReadOnlyProperties = true)] [JsonSerializable(typeof(PublicCacheData))] [JsonSerializable(typeof(PageSettings))] [JsonSerializable(typeof(AuthData))] [JsonSerializable(typeof(FeedFilter))] [JsonSerializable(typeof(PublicActionNotices))] [JsonSerializable(typeof(ServerInfo))] [JsonSerializable(typeof(List))] [JsonSerializable(typeof(CustomEmojiCache))] [JsonSerializable(typeof(PushDevice))] [JsonSerializable(typeof(UploadMedia))] [JsonSerializable(typeof(ValidationErrors))] // recover/valid takes the code as a JSON string ([FromBody] string) and answers a JSON bool [JsonSerializable(typeof(string))] [JsonSerializable(typeof(bool))] public partial class ClientJsonContext : JsonSerializerContext { }