fix(docs): remove duplicate paths (params) in swagger docs
This commit is contained in:
parent
b9a54b019d
commit
1ed65d306d
@ -124,7 +124,7 @@ func getTaskFilterOptsFromCollection(tf *TaskCollection) (opts *taskSearchOption
|
||||
// @tags task
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param projectID path int true "The project ID."
|
||||
// @Param id path int true "The project ID."
|
||||
// @Param page query int false "The page number. Used for pagination. If not provided, the first page of results is returned."
|
||||
// @Param per_page query int false "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page."
|
||||
// @Param s query string false "Search tasks by task text."
|
||||
@ -138,7 +138,7 @@ func getTaskFilterOptsFromCollection(tf *TaskCollection) (opts *taskSearchOption
|
||||
// @Security JWTKeyAuth
|
||||
// @Success 200 {array} models.Task "The tasks"
|
||||
// @Failure 500 {object} models.Message "Internal error"
|
||||
// @Router /projects/{projectID}/tasks [get]
|
||||
// @Router /projects/{id}/tasks [get]
|
||||
func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error) {
|
||||
|
||||
// If the project id is < -1 this means we're dealing with a saved filter - in that case we get and populate the filter
|
||||
|
@ -825,13 +825,13 @@ func createTask(s *xorm.Session, t *Task, a web.Auth, updateAssignees bool) (err
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security JWTKeyAuth
|
||||
// @Param ID path int true "The Task ID"
|
||||
// @Param id path int true "The Task ID"
|
||||
// @Param task body models.Task true "The task object"
|
||||
// @Success 200 {object} models.Task "The updated task object."
|
||||
// @Failure 400 {object} web.HTTPError "Invalid task object provided."
|
||||
// @Failure 403 {object} web.HTTPError "The user does not have access to the task (aka its project)"
|
||||
// @Failure 500 {object} models.Message "Internal error"
|
||||
// @Router /tasks/{ID} [post]
|
||||
// @Router /tasks/{id} [post]
|
||||
//
|
||||
//nolint:gocyclo
|
||||
func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
|
||||
@ -1417,12 +1417,12 @@ func updateTaskLastUpdated(s *xorm.Session, task *Task) error {
|
||||
// @tags task
|
||||
// @Produce json
|
||||
// @Security JWTKeyAuth
|
||||
// @Param ID path int true "Task ID"
|
||||
// @Param id path int true "Task ID"
|
||||
// @Success 200 {object} models.Message "The created task object."
|
||||
// @Failure 400 {object} web.HTTPError "Invalid task ID provided."
|
||||
// @Failure 403 {object} web.HTTPError "The user does not have access to the project"
|
||||
// @Failure 500 {object} models.Message "Internal error"
|
||||
// @Router /tasks/{ID} [delete]
|
||||
// @Router /tasks/{id} [delete]
|
||||
func (t *Task) Delete(s *xorm.Session, a web.Auth) (err error) {
|
||||
|
||||
// duplicate the task for the event
|
||||
|
Loading…
x
Reference in New Issue
Block a user