docs(webhooks): version-qualify the events endpoint link in the events field doc

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.
This commit is contained in:
kolaente 2026-06-06 21:27:58 +02:00 committed by kolaente
parent aac0322975
commit 5855ccc1d4
1 changed files with 1 additions and 1 deletions

View File

@ -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)