activitypub-federation-rust icon indicating copy to clipboard operation
activitypub-federation-rust copied to clipboard

Automatically generate HTTP routes for actors and objects

Open Nutomic opened this issue 1 year ago • 1 comments

It would be nice if the library could automatically generate required HTTP routes, because these require a lot of boilerplate code. This would at minimum be a GET endpoint for each actor/object, and a POST inbox endpoint for actors. There are also other endpoints such as outbox, followers and shared inbox.

Examples:

  • https://github.com/LemmyNet/activitypub-federation-rust/blob/main/examples/federation-actix/instance.rs#L107
  • https://github.com/LemmyNet/lemmy/blob/main/crates/apub/src/http/community.rs

This would require passing format strings to the library, so that it knows at which path the routes should be created.

Nutomic avatar Nov 29 '22 21:11 Nutomic