activitypub: implement /api/v1/activitypub/user/{username} (#14186)

Return informations regarding a Person (as defined in ActivityStreams
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person).

Refs: https://github.com/go-gitea/gitea/issues/14186

Signed-off-by: Loïc Dachary <loic@dachary.org>
This commit is contained in:
Loïc Dachary 2021-10-26 15:59:14 -10:00 committed by Anthony Wang
parent f2db473b0d
commit 4951af4d99
No known key found for this signature in database
GPG key ID: BC96B00AEC5F2D76
6 changed files with 195 additions and 0 deletions

View file

@ -23,6 +23,29 @@
},
"basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1",
"paths": {
"/activitypub/user/{username}": {
"get": {
"produces": [
"application/json"
],
"summary": "Returns the person",
"operationId": "information",
"parameters": [
{
"type": "string",
"description": "username of the user",
"name": "username",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/ActivityPub"
}
}
}
},
"/admin/cron": {
"get": {
"produces": [
@ -12700,6 +12723,16 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"ActivityPub": {
"type": "object",
"properties": {
"@context": {
"type": "string",
"x-go-name": "Context"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"AddCollaboratorOption": {
"description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
"type": "object",
@ -18235,6 +18268,12 @@
}
}
},
"ActivityPub": {
"description": "ActivityPub",
"schema": {
"$ref": "#/definitions/ActivityPub"
}
},
"AnnotatedTag": {
"description": "AnnotatedTag",
"schema": {