diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index f81418e13f..fd6234e686 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -897,6 +897,7 @@ func Routes() *web.Route { m.Group("/repository-id/{repository-id}", func() { m.Get("", activitypub.Repository) m.Post("/inbox", + bind(api.CreateRepoOption{}), //activitypub.ReqHTTPSignature(), activitypub.RepositoryInbox) }, context_service.RepositoryIDAssignmentAPI()) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 67e949f4f2..595798cc55 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -23,6 +23,58 @@ }, "basePath": "{{AppSubUrl | JSEscape | Safe}}/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": "activitypubRepository", + "parameters": [ + { + "type": "integer", + "description": "repository ID of the repo", + "name": "repository-id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, "/activitypub/user-id/{user-id}": { "get": { "produces": [