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
|
@ -31,47 +31,63 @@ paths:
|
|||
operationId: login
|
||||
summary: Login with REST API
|
||||
consumes:
|
||||
- application/x-www-form-urlencoded
|
||||
- application/json
|
||||
- application/x-www-form-urlencoded
|
||||
tags:
|
||||
- Login
|
||||
parameters:
|
||||
- name: username
|
||||
in: formData
|
||||
- name: loginRequest
|
||||
in: body
|
||||
required: true
|
||||
description: |
|
||||
Your username
|
||||
type: string
|
||||
- name: password
|
||||
in: formData
|
||||
required: true
|
||||
description: |
|
||||
Your password
|
||||
type: string
|
||||
format: password
|
||||
description: Login credentials
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- username
|
||||
- password
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: |
|
||||
Your username
|
||||
password:
|
||||
type: string
|
||||
format: password
|
||||
description: |
|
||||
Your password
|
||||
responses:
|
||||
200:
|
||||
description: |-
|
||||
Successful authentication
|
||||
schema:
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
token:
|
||||
type: string
|
||||
tokenExpires:
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- token
|
||||
- tokenExpires
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: User ID
|
||||
token:
|
||||
type: string
|
||||
description: |
|
||||
Authentication token
|
||||
tokenExpires:
|
||||
type: string
|
||||
format: date-time
|
||||
description: |
|
||||
Token expiration date
|
||||
400:
|
||||
description: |
|
||||
Error in authentication
|
||||
schema:
|
||||
items:
|
||||
properties:
|
||||
error:
|
||||
type: number
|
||||
reason:
|
||||
type: string
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
Error in authentication
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue