From 5855ccc1d454ad9c34741627970f273b65843f7e Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 6 Jun 2026 21:27:58 +0200 Subject: [PATCH] docs(webhooks): version-qualify the events endpoint link in the events field doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the v2 OpenAPI context a bare /webhooks/events reads as /api/v2/webhooks/events, which does not exist — the events listing endpoint lives only on /api/v1. Point the doc string at the absolute v1 path so v2 clients are not misled. --- pkg/models/webhooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/webhooks.go b/pkg/models/webhooks.go index e6353606f..fd7ee8e81 100644 --- a/pkg/models/webhooks.go +++ b/pkg/models/webhooks.go @@ -51,7 +51,7 @@ type Webhook struct { // The target URL where the POST request with the webhook payload will be made TargetURL string `xorm:"not null" valid:"required,url" json:"target_url" doc:"The target URL where the POST request with the webhook payload will be made."` // The webhook events which should fire this webhook target - Events []string `xorm:"JSON not null" valid:"required" json:"events" doc:"The webhook events which should fire this webhook target. Get the available events from /webhooks/events."` + Events []string `xorm:"JSON not null" valid:"required" json:"events" doc:"The webhook events which should fire this webhook target. Get the available events from /api/v1/webhooks/events."` // The project ID of the project this webhook target belongs to ProjectID int64 `xorm:"bigint null index" json:"project_id" param:"project" readOnly:"true" doc:"The id of the project this webhook target belongs to. Set from the URL, not the body."` // The user ID if this is a user-level webhook (mutually exclusive with ProjectID)