Document the ActivityPub avatar route in the OpenAPI spec (SCR-1)
CI / validate-monitoring (push) Successful in 9s
CI / lint (push) Successful in 13s
CI / federation-interop (push) Successful in 1m42s
CI / test (push) Successful in 7m4s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s

The previous commit left test_openapi failing; the route needed a federation OpenAPI
entry and the public-endpoint allowance.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-10-13 11:45:24 +01:00
1 parent 016fc707d1
commit b878523d51
3 files changed
+62

No files matched your search

+47
View File
@@ -3692,6 +3692,53 @@
} }
] ]
}, },
"/users/{username}/avatar": {
"get": {
"tags": [
"ActivityPub"
],
"summary": "Profile image",
"description": "The user's profile image, which their actor document names as its `icon`. Only served when the user shares and has chosen to share their image.",
"operationId": "federation_actor_avatar",
"responses": {
"200": {
"description": "A JPEG, PNG or WebP image",
"content": {
"image/*": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "Unknown, or not sharing (the two are indistinguishable)"
}
},
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"parameters": [
{
"in": "path",
"name": "username",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
]
},
"/users/{username}/followers": { "/users/{username}/followers": {
"get": { "get": {
"tags": [ "tags": [
+14
View File
@@ -130,6 +130,20 @@ _OPERATIONS = {
"404": {"description": "Not found, not listed, or deleted"}, "404": {"description": "Not found, not listed, or deleted"},
}, },
), ),
"federation.actor_avatar": (
"get",
"Profile image",
"The user's profile image, which their actor document names as its `icon`. Only "
"served when the user shares and has chosen to share their image.",
[_USERNAME],
{
"200": {
"description": "A JPEG, PNG or WebP image",
"content": {"image/*": {"schema": {"type": "string", "format": "binary"}}},
},
"404": _NOT_FOUND,
},
),
"federation.followers": ( "federation.followers": (
"get", "get",
"Followers", "Followers",
+1
View File
@@ -77,6 +77,7 @@ def test_ui_routes_declare_bearer_auth(fed_spec):
("/api/v1/auth/login", "post"), ("/api/v1/auth/login", "post"),
("/api/v1/auth/register", "post"), ("/api/v1/auth/register", "post"),
("/api/v1/federation/profiles/{username}", "get"), ("/api/v1/federation/profiles/{username}", "get"),
("/api/v1/federation/profiles/{username}/avatar", "get"),
("/api/v1/federation/profiles/{username}/posts/{post_uuid}", "get"), ("/api/v1/federation/profiles/{username}/posts/{post_uuid}", "get"),
} }
for path, operations in spec["paths"].items(): for path, operations in spec["paths"].items():