feat(federation): validate like activities (#3494)
First step on the way to #1680 The PR will * accept like request on the api * validate activity in a first level You can find * architecture at: https://codeberg.org/meissa/forgejo/src/branch/forgejo-federated-star/docs/unsure-where-to-put/federation-architecture.md Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3494 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de> Co-committed-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
This commit is contained in:
parent
8c3511a8b3
commit
2177d38e9c
18 changed files with 1088 additions and 1 deletions
64
templates/swagger/v1_json.tmpl
generated
64
templates/swagger/v1_json.tmpl
generated
|
@ -23,6 +23,65 @@
|
|||
},
|
||||
"basePath": "{{AppSubUrl | JSEscape}}/api/v1",
|
||||
"paths": {
|
||||
"/activitypub/repository-id/{repository-id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"activitypub"
|
||||
],
|
||||
"summary": "Returns the Repository actor for a repo",
|
||||
"operationId": "activitypubRepository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "repository ID of the repo",
|
||||
"name": "repository-id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/ActivityPub"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/activitypub/repository-id/{repository-id}/inbox": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"activitypub"
|
||||
],
|
||||
"summary": "Send to the inbox",
|
||||
"operationId": "activitypubRepositoryInbox",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "repository ID of the repo",
|
||||
"name": "repository-id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ForgeLike"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/activitypub/user-id/{user-id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
@ -21373,6 +21432,11 @@
|
|||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"ForgeLike": {
|
||||
"description": "ForgeLike activity data type",
|
||||
"type": "object",
|
||||
"x-go-package": "code.gitea.io/gitea/modules/forgefed"
|
||||
},
|
||||
"GPGKey": {
|
||||
"description": "GPGKey a user GPG key to sign commit and tag in repository",
|
||||
"type": "object",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue