refactor(server)!: XRPC endpoint hosting — route groups, one NSID source, correct binding #121
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the v0.7.0 update cycle (wave 4). Server-side XRPC hosting (
ATProtoNet.Server/Xrpc).Scope
MapXrpcEndpoints()returns aRouteGroupBuilderunder/xrpc, so.RequireAuthorization(), rate limiting and metadata conventions apply. Per-handler[Authorize]is honoured.static abstract Nsid NsidonIXrpcEndpoint, or the attribute only. Remove theRuntimeHelpers.GetUninitializedObjecttrick, which fails for auto-property and field initializers.AddXrpcEndpoint<T>and assembly scanning must agree.?uris=xfails to bind toList<string>. Also remove the per-requestDictionary→JSON→TParamsround trip, and accept repeated keys (plusfoo[]=leniently, asxrpc-serverdoes).InternalServerErrorfor unknown ones), with a typedXrpcErrorBodyinstead of anonymous objects.IXrpcProcedure<TOut>), and a procedure with binary input (Stream+ content type, for blob-upload-style methods).Kindinto one generic registration path (friendlier to trimming).CHANGELOG
Breaking changes(how endpoints declare their NSID, the return type ofMapXrpcEndpoints) plusFixed(single-value arrays, error envelope).