mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 03:27:01 +02:00
fix(openapi): users.yaml
This commit is contained in:
@@ -28,88 +28,6 @@ tags:
|
|||||||
- name: categories
|
- name: categories
|
||||||
description: Administrative calls to manage categories
|
description: Administrative calls to manage categories
|
||||||
paths:
|
paths:
|
||||||
/users/:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- users
|
|
||||||
summary: create a user
|
|
||||||
description: This operation creates a new user account
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
username:
|
|
||||||
type: string
|
|
||||||
description: 'If the username is taken, a number will be appended'
|
|
||||||
password:
|
|
||||||
type: string
|
|
||||||
email:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- username
|
|
||||||
example:
|
|
||||||
username: Dragon Fruit
|
|
||||||
password: s3cre7password
|
|
||||||
email: dragonfruit@example.org
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: user successfully created
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
status:
|
|
||||||
$ref: components/schemas/Status.yaml#/Status
|
|
||||||
response:
|
|
||||||
$ref: components/schemas/UserObj.yaml#/UserObj
|
|
||||||
'400':
|
|
||||||
$ref: components/responses/400.yaml#/400
|
|
||||||
'401':
|
|
||||||
$ref: components/responses/401.yaml#/401
|
|
||||||
'403':
|
|
||||||
$ref: components/responses/403.yaml#/403
|
|
||||||
'426':
|
|
||||||
$ref: components/responses/426.yaml#/426
|
|
||||||
'500':
|
|
||||||
$ref: components/responses/500.yaml#/500
|
|
||||||
delete:
|
|
||||||
tags:
|
|
||||||
- users
|
|
||||||
summary: delete one or more users
|
|
||||||
description: This operation deletes one or many user accounts, including their contributions (posts, topics, etc.)
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
uids:
|
|
||||||
type: array
|
|
||||||
description: A collection of uids
|
|
||||||
items:
|
|
||||||
type: number
|
|
||||||
example:
|
|
||||||
uids:
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: user account(s) deleted
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
status:
|
|
||||||
$ref: components/schemas/Status.yaml#/Status
|
|
||||||
response:
|
|
||||||
type: object
|
|
||||||
'/users/{uid}':
|
'/users/{uid}':
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- users
|
||||||
|
summary: create a user
|
||||||
|
description: This operation creates a new user account
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
description: 'If the username is taken, a number will be appended'
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- username
|
||||||
|
example:
|
||||||
|
username: Dragon Fruit
|
||||||
|
password: s3cre7password
|
||||||
|
email: dragonfruit@example.org
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: user successfully created
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
$ref: ../components/schemas/Status.yaml#/Status
|
||||||
|
response:
|
||||||
|
$ref: ../components/schemas/UserObj.yaml#/UserObj
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400.yaml#/400
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/401.yaml#/401
|
||||||
|
'403':
|
||||||
|
$ref: ../components/responses/403.yaml#/403
|
||||||
|
'426':
|
||||||
|
$ref: ../components/responses/426.yaml#/426
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500.yaml#/500
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- users
|
||||||
|
summary: delete one or more users
|
||||||
|
description: This operation deletes one or many user accounts, including their contributions (posts, topics, etc.)
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
uids:
|
||||||
|
type: array
|
||||||
|
description: A collection of uids
|
||||||
|
items:
|
||||||
|
type: number
|
||||||
|
example:
|
||||||
|
uids:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: user account(s) deleted
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
$ref: ../components/schemas/Status.yaml#/Status
|
||||||
|
response:
|
||||||
|
type: object
|
||||||
|
|||||||
Reference in New Issue
Block a user