1
0

Added http endpoint to list all users on a list (#87)

This commit is contained in:
konrad
2019-07-18 16:38:21 +00:00
committed by Gitea
parent b63928850a
commit 12eaddc8ee
21 changed files with 722 additions and 56 deletions

View File

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-07-16 00:32:48.008049583 +0200 CEST m=+0.169009519
// 2019-07-18 18:18:32.365544639 +0200 CEST m=+0.166364676
package swagger
@ -58,7 +58,7 @@ var doc = `{
"JWTKeyAuth": []
}
],
"description": "Returns an array with all assignees for this task.",
"description": "Returns all labels which are either created by the user or associated with a task the user has at least read-access to.",
"consumes": [
"application/json"
],
@ -66,9 +66,9 @@ var doc = `{
"application/json"
],
"tags": [
"assignees"
"labels"
],
"summary": "Get all assignees for a task",
"summary": "Get all labels a user has access to",
"parameters": [
{
"type": "integer",
@ -78,18 +78,18 @@ var doc = `{
},
{
"type": "string",
"description": "Search assignees by their username.",
"description": "Search labels by label text.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The assignees",
"description": "The labels",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
"$ref": "#/definitions/models.Label"
}
}
},
@ -412,7 +412,7 @@ var doc = `{
"JWTKeyAuth": []
}
],
"description": "Returns a list by its ID.",
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
@ -420,13 +420,13 @@ var doc = `{
"application/json"
],
"tags": [
"list"
"team"
],
"summary": "Gets one list",
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "List ID",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
@ -434,14 +434,14 @@ var doc = `{
],
"responses": {
"200": {
"description": "The list",
"description": "The team",
"schema": {
"type": "object",
"$ref": "#/definitions/models.List"
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the list",
"description": "The user does not have access to the team",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
@ -645,6 +645,73 @@ var doc = `{
}
}
},
"/lists/{id}/listusers": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Lists all users (without emailadresses). Also possible to search for a specific user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Get users",
"parameters": [
{
"type": "string",
"description": "Search for a user by its name.",
"name": "s",
"in": "query"
},
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "All (found) users.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"401": {
"description": "The user does not have the right to see the list.",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"type": "object",
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{id}/teams": {
"get": {
"security": [

View File

@ -45,7 +45,7 @@
"JWTKeyAuth": []
}
],
"description": "Returns an array with all assignees for this task.",
"description": "Returns all labels which are either created by the user or associated with a task the user has at least read-access to.",
"consumes": [
"application/json"
],
@ -53,9 +53,9 @@
"application/json"
],
"tags": [
"assignees"
"labels"
],
"summary": "Get all assignees for a task",
"summary": "Get all labels a user has access to",
"parameters": [
{
"type": "integer",
@ -65,18 +65,18 @@
},
{
"type": "string",
"description": "Search assignees by their username.",
"description": "Search labels by label text.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The assignees",
"description": "The labels",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
"$ref": "#/definitions/models.Label"
}
}
},
@ -399,7 +399,7 @@
"JWTKeyAuth": []
}
],
"description": "Returns a list by its ID.",
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
@ -407,13 +407,13 @@
"application/json"
],
"tags": [
"list"
"team"
],
"summary": "Gets one list",
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "List ID",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
@ -421,14 +421,14 @@
],
"responses": {
"200": {
"description": "The list",
"description": "The team",
"schema": {
"type": "object",
"$ref": "#/definitions/models.List"
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the list",
"description": "The user does not have access to the team",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
@ -632,6 +632,73 @@
}
}
},
"/lists/{id}/listusers": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Lists all users (without emailadresses). Also possible to search for a specific user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Get users",
"parameters": [
{
"type": "string",
"description": "Search for a user by its name.",
"name": "s",
"in": "query"
},
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "All (found) users.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
}
},
"401": {
"description": "The user does not have the right to see the list.",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"type": "object",
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{id}/teams": {
"get": {
"security": [

View File

@ -704,14 +704,15 @@ paths:
get:
consumes:
- application/json
description: Returns an array with all assignees for this task.
description: Returns all labels which are either created by the user or associated
with a task the user has at least read-access to.
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search assignees by their username.
- description: Search labels by label text.
in: query
name: s
type: string
@ -719,10 +720,10 @@ paths:
- application/json
responses:
"200":
description: The assignees
description: The labels
schema:
items:
$ref: '#/definitions/models.User'
$ref: '#/definitions/models.Label'
type: array
"500":
description: Internal error
@ -731,9 +732,9 @@ paths:
type: object
security:
- JWTKeyAuth: []
summary: Get all assignees for a task
summary: Get all labels a user has access to
tags:
- assignees
- labels
put:
consumes:
- application/json
@ -977,9 +978,9 @@ paths:
get:
consumes:
- application/json
description: Returns a list by its ID.
description: Returns a team by its ID.
parameters:
- description: List ID
- description: Team ID
in: path
name: id
required: true
@ -988,12 +989,12 @@ paths:
- application/json
responses:
"200":
description: The list
description: The team
schema:
$ref: '#/definitions/models.List'
$ref: '#/definitions/models.Team'
type: object
"403":
description: The user does not have access to the list
description: The user does not have access to the team
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
@ -1004,9 +1005,9 @@ paths:
type: object
security:
- JWTKeyAuth: []
summary: Gets one list
summary: Gets one team
tags:
- list
- team
post:
consumes:
- application/json
@ -1097,6 +1098,51 @@ paths:
summary: Create a task
tags:
- task
/lists/{id}/listusers:
get:
consumes:
- application/json
description: Lists all users (without emailadresses). Also possible to search
for a specific user.
parameters:
- description: Search for a user by its name.
in: query
name: s
type: string
- description: List ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: All (found) users.
schema:
items:
$ref: '#/definitions/models.User'
type: array
"400":
description: Something's invalid.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"401":
description: The user does not have the right to see the list.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal server error.
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- JWTKeyAuth: []
summary: Get users
tags:
- list
/lists/{id}/teams:
get:
consumes: