From a1e9783cec30e7c56a36cd4aa0f42fa7db3096ca Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Thu, 9 Nov 2023 21:59:51 +0100 Subject: [PATCH] expose star activity to swagger --- modules/forgefed/star.go | 1 + templates/swagger/v1_json.tmpl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/forgefed/star.go b/modules/forgefed/star.go index fdcd696f9b..a32fb173a6 100644 --- a/modules/forgefed/star.go +++ b/modules/forgefed/star.go @@ -27,6 +27,7 @@ var KnownSourceTypes = SourceTypes{ } // Star activity data type +// swagger:model type Star struct { // swagger:ignore ap.Activity diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 14325dc3dd..31d6987d7a 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -21,7 +21,7 @@ }, "version": "{{AppVer | JSEscape | Safe}}" }, - "basePath": "/api/v1", + "basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1", "paths": { "/activitypub/repository-id/{repository-id}": { "get": { @@ -23183,7 +23183,7 @@ "x-go-package": "code.gitea.io/gitea/modules/forgefed" }, "Star": { - "description": "Star activity for adding a star to an repository", + "description": "Star activity data type", "type": "object", "properties": { "Source": { @@ -25090,4 +25090,4 @@ "TOTPHeader": [] } ] -} \ No newline at end of file +}