update swagger docs

This commit is contained in:
kolaente 2021-09-04 20:16:51 +02:00
parent 66a35b56c2
commit 6d13edcc23
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 289 additions and 27 deletions

View File

@ -6335,7 +6335,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserDeletionRequest"
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
@ -6427,7 +6427,7 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserDeletionRequest"
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
@ -6453,6 +6453,106 @@ var doc = `{
}
}
},
"/user/export/download": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Download a user data export.",
"parameters": [
{
"description": "User password to confirm the download.",
"name": "password",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/export/request": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Request a user data export.",
"parameters": [
{
"description": "User password to confirm the data export request.",
"name": "password",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/password": {
"post": {
"security": [
@ -8694,14 +8794,6 @@ var doc = `{
}
}
},
"v1.UserDeletionRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
}
},
"v1.UserDeletionRequestConfirm": {
"type": "object",
"properties": {
@ -8721,6 +8813,14 @@ var doc = `{
}
}
},
"v1.UserPasswordConfirmation": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
}
},
"v1.UserSettings": {
"type": "object",
"properties": {

View File

@ -6318,7 +6318,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserDeletionRequest"
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
@ -6410,7 +6410,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserDeletionRequest"
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
@ -6436,6 +6436,106 @@
}
}
},
"/user/export/download": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Download a user data export.",
"parameters": [
{
"description": "User password to confirm the download.",
"name": "password",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/export/request": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Request a user data export.",
"parameters": [
{
"description": "User password to confirm the data export request.",
"name": "password",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserPasswordConfirmation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/password": {
"post": {
"security": [
@ -8677,14 +8777,6 @@
}
}
},
"v1.UserDeletionRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
}
},
"v1.UserDeletionRequestConfirm": {
"type": "object",
"properties": {
@ -8704,6 +8796,14 @@
}
}
},
"v1.UserPasswordConfirmation": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
}
},
"v1.UserSettings": {
"type": "object",
"properties": {

View File

@ -1185,11 +1185,6 @@ definitions:
email), `upload`, `initials`, `default`.
type: string
type: object
v1.UserDeletionRequest:
properties:
password:
type: string
type: object
v1.UserDeletionRequestConfirm:
properties:
token:
@ -1202,6 +1197,11 @@ definitions:
old_password:
type: string
type: object
v1.UserPasswordConfirmation:
properties:
password:
type: string
type: object
v1.UserSettings:
properties:
default_list_id:
@ -5554,7 +5554,7 @@ paths:
name: credentials
required: true
schema:
$ref: '#/definitions/v1.UserDeletionRequest'
$ref: '#/definitions/v1.UserPasswordConfirmation'
produces:
- application/json
responses:
@ -5615,7 +5615,7 @@ paths:
name: credentials
required: true
schema:
$ref: '#/definitions/v1.UserDeletionRequest'
$ref: '#/definitions/v1.UserPasswordConfirmation'
produces:
- application/json
responses:
@ -5634,6 +5634,68 @@ paths:
summary: Request the deletion of the user
tags:
- user
/user/export/download:
post:
consumes:
- application/json
parameters:
- description: User password to confirm the download.
in: body
name: password
required: true
schema:
$ref: '#/definitions/v1.UserPasswordConfirmation'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
"400":
description: Something's invalid.
schema:
$ref: '#/definitions/web.HTTPError'
"500":
description: Internal server error.
schema:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Download a user data export.
tags:
- user
/user/export/request:
post:
consumes:
- application/json
parameters:
- description: User password to confirm the data export request.
in: body
name: password
required: true
schema:
$ref: '#/definitions/v1.UserPasswordConfirmation'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
"400":
description: Something's invalid.
schema:
$ref: '#/definitions/web.HTTPError'
"500":
description: Internal server error.
schema:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Request a user data export.
tags:
- user
/user/password:
post:
consumes: