From a52ee1593a4c78e0f63b6f8c70251784734ac5e4 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 7 Jun 2026 12:09:04 +0200 Subject: [PATCH] docs(api/v2): tag SavedFilter fields for the v2 schema --- pkg/models/saved_filters.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/models/saved_filters.go b/pkg/models/saved_filters.go index 26f99ed48..09f28b518 100644 --- a/pkg/models/saved_filters.go +++ b/pkg/models/saved_filters.go @@ -32,25 +32,25 @@ import ( // SavedFilter represents a saved bunch of filters type SavedFilter struct { // The unique numeric id of this saved filter - ID int64 `xorm:"autoincr not null unique pk" json:"id" param:"filter"` + ID int64 `xorm:"autoincr not null unique pk" json:"id" param:"filter" readOnly:"true" doc:"The unique, numeric id of this saved filter."` // The actual filters this filter contains - Filters *TaskCollection `xorm:"JSON not null" json:"filters" valid:"required"` + Filters *TaskCollection `xorm:"JSON not null" json:"filters" valid:"required" doc:"The task filter query and collection options this saved filter wraps."` // The title of the filter. - Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` + Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250" doc:"The title of the filter."` // The description of the filter - Description string `xorm:"longtext null" json:"description"` + Description string `xorm:"longtext null" json:"description" doc:"The description of the filter."` OwnerID int64 `xorm:"bigint not null INDEX" json:"-"` // The user who owns this filter - Owner *user.User `xorm:"-" json:"owner" valid:"-"` + Owner *user.User `xorm:"-" json:"owner" valid:"-" readOnly:"true" doc:"The user who owns this filter; set by the server."` // True if the filter is a favorite. Favorite filters show up in a separate parent project together with favorite projects. - IsFavorite bool `xorm:"default false" json:"is_favorite"` + IsFavorite bool `xorm:"default false" json:"is_favorite" doc:"If true, the filter shows up in the Favorites pseudo-project alongside favorite projects."` // A timestamp when this filter was created. You cannot change this value. - Created time.Time `xorm:"created not null" json:"created"` + Created time.Time `xorm:"created not null" json:"created" readOnly:"true" doc:"A timestamp when this filter was created. You cannot change this value."` // A timestamp when this filter was last updated. You cannot change this value. - Updated time.Time `xorm:"updated not null" json:"updated"` + Updated time.Time `xorm:"updated not null" json:"updated" readOnly:"true" doc:"A timestamp when this filter was last updated. You cannot change this value."` web.CRUDable `xorm:"-" json:"-"` web.Permissions `xorm:"-" json:"-"`