mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
fix: properly document /users/login
This commit is contained in:
parent
7bf75b1ff7
commit
e14a3f9c2d
2 changed files with 86 additions and 54 deletions
|
@ -932,47 +932,63 @@ paths:
|
||||||
operationId: login
|
operationId: login
|
||||||
summary: Login with REST API
|
summary: Login with REST API
|
||||||
consumes:
|
consumes:
|
||||||
- application/x-www-form-urlencoded
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/x-www-form-urlencoded
|
||||||
tags:
|
tags:
|
||||||
- Login
|
- Login
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: loginRequest
|
||||||
in: formData
|
in: body
|
||||||
required: true
|
required: true
|
||||||
description: |
|
description: Login credentials
|
||||||
Your username
|
schema:
|
||||||
type: string
|
type: object
|
||||||
- name: password
|
required:
|
||||||
in: formData
|
- username
|
||||||
required: true
|
- password
|
||||||
description: |
|
properties:
|
||||||
Your password
|
username:
|
||||||
type: string
|
description: |
|
||||||
format: password
|
Your username
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
description: |
|
||||||
|
Your password
|
||||||
|
type: string
|
||||||
|
format: password
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: |-
|
description: |-
|
||||||
Successful authentication
|
Successful authentication
|
||||||
schema:
|
schema:
|
||||||
items:
|
type: object
|
||||||
properties:
|
required:
|
||||||
id:
|
- id
|
||||||
type: string
|
- token
|
||||||
token:
|
- tokenExpires
|
||||||
type: string
|
properties:
|
||||||
tokenExpires:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
description: User ID
|
||||||
|
token:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Authentication token
|
||||||
|
tokenExpires:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: |
|
||||||
|
Token expiration date
|
||||||
400:
|
400:
|
||||||
description: |
|
description: |
|
||||||
Error in authentication
|
Error in authentication
|
||||||
schema:
|
schema:
|
||||||
items:
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
type: number
|
type: string
|
||||||
reason:
|
reason:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: |
|
description: |
|
||||||
Error in authentication
|
Error in authentication
|
||||||
|
|
|
@ -31,47 +31,63 @@ paths:
|
||||||
operationId: login
|
operationId: login
|
||||||
summary: Login with REST API
|
summary: Login with REST API
|
||||||
consumes:
|
consumes:
|
||||||
- application/x-www-form-urlencoded
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/x-www-form-urlencoded
|
||||||
tags:
|
tags:
|
||||||
- Login
|
- Login
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: loginRequest
|
||||||
in: formData
|
in: body
|
||||||
required: true
|
required: true
|
||||||
description: |
|
description: Login credentials
|
||||||
Your username
|
schema:
|
||||||
type: string
|
type: object
|
||||||
- name: password
|
required:
|
||||||
in: formData
|
- username
|
||||||
required: true
|
- password
|
||||||
description: |
|
properties:
|
||||||
Your password
|
username:
|
||||||
type: string
|
type: string
|
||||||
format: password
|
description: |
|
||||||
|
Your username
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
format: password
|
||||||
|
description: |
|
||||||
|
Your password
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: |-
|
description: |-
|
||||||
Successful authentication
|
Successful authentication
|
||||||
schema:
|
schema:
|
||||||
items:
|
type: object
|
||||||
properties:
|
required:
|
||||||
id:
|
- id
|
||||||
type: string
|
- token
|
||||||
token:
|
- tokenExpires
|
||||||
type: string
|
properties:
|
||||||
tokenExpires:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
description: User ID
|
||||||
|
token:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Authentication token
|
||||||
|
tokenExpires:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: |
|
||||||
|
Token expiration date
|
||||||
400:
|
400:
|
||||||
description: |
|
description: |
|
||||||
Error in authentication
|
Error in authentication
|
||||||
schema:
|
schema:
|
||||||
items:
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
type: number
|
type: string
|
||||||
reason:
|
reason:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: |
|
description: |
|
||||||
Error in authentication
|
Error in authentication
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue