The API's JSON is generated at build time, and no answer is an anonymous object
Build / Build (push) Successful in 36s

Every answer of the Mastodon API and the client API now has its JSON shape generated when the server is built, instead
of worked out by reflection while it runs; the bytes sent are unchanged. The small answers that were anonymous objects
(the instance documents, notification policies, reports, lists, tags, trends, errors and the empty answers) are named
types. A type without generated metadata fails at once in development and on the pasture, and in production is logged
and still answered. Three lists that were sent as lazy sequences (moderation reports, the published domain blocks and
the languages) are now built first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-11-10 07:28:02 +01:00
1 parent 8a1e4e419b
commit f3fdeaf038
41 files changed
+1333 -266

No files matched your search

@@ -7,7 +7,6 @@ using System.Xml.Linq;
namespace PrivaPub.ClientModels.User.Avatar
{
[JsonSerializable(typeof(InsertAvatarForm))]
public class InsertAvatarForm
{
[JsonIgnore]
@@ -5,7 +5,6 @@ using System.Text.Json.Serialization;
namespace PrivaPub.ClientModels.User.Avatar
{
[JsonSerializable(typeof(UpdateAvatarForm))]
public class UpdateAvatarForm
{
[JsonIgnore]
@@ -1,8 +1,6 @@
using System.Text.Json.Serialization;
namespace PrivaPub.ClientModels.User.Avatar
{
[JsonSerializable(typeof(ViewAvatar))]
public class ViewAvatar
{
public string Id { get; set; }
@@ -1,11 +1,9 @@
using PrivaPub.ClientModels.Resources;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace PrivaPub.ClientModels.User.Avatar
{
[JsonSerializable(typeof(ViewAvatarSettings))]
public class ViewAvatarSettings
{
[Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)),