mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 06:26:35 +02:00
feat: tests for new flags API
added missing files for schema update
This commit is contained in:
183
public/openapi/components/schemas/FlagObject.yaml
Normal file
183
public/openapi/components/schemas/FlagObject.yaml
Normal file
@@ -0,0 +1,183 @@
|
||||
FlagObject:
|
||||
description: The resulting object of a call to `Flags.get()`
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
state:
|
||||
type: string
|
||||
flagId:
|
||||
type: number
|
||||
type:
|
||||
type: string
|
||||
targetId:
|
||||
type: number
|
||||
targetUid:
|
||||
type: number
|
||||
datetime:
|
||||
type: number
|
||||
datetimeISO:
|
||||
type: string
|
||||
target_readable:
|
||||
type: string
|
||||
target:
|
||||
type: object
|
||||
properties: {}
|
||||
additionalProperties:
|
||||
description: Properties change depending on the target type (user, post, etc.)
|
||||
assignee:
|
||||
type: number
|
||||
nullable: true
|
||||
reports:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
timestamp:
|
||||
type: number
|
||||
timestampISO:
|
||||
type: string
|
||||
reporter:
|
||||
type: object
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
displayname:
|
||||
type: string
|
||||
description: This is either username or fullname depending on forum and user settings
|
||||
userslug:
|
||||
type: string
|
||||
description: An URL-safe variant of the username (i.e. lower-cased, spaces
|
||||
removed, etc.)
|
||||
picture:
|
||||
nullable: true
|
||||
reputation:
|
||||
type: number
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
auto-generated icon given to users without an
|
||||
avatar
|
||||
icon:bgColor:
|
||||
type: string
|
||||
description: A six-character hexadecimal colour code assigned to the user. This
|
||||
value is used in conjunction with `icon:text` for
|
||||
the user's auto-generated icon
|
||||
example: "#f44336"
|
||||
- $ref: '#/FlagHistoryObject'
|
||||
- $ref: '#/FlagNotesObject'
|
||||
FlagHistoryObject:
|
||||
type: object
|
||||
properties:
|
||||
history:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
fields:
|
||||
type: object
|
||||
additionalProperties: {}
|
||||
meta:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
labelClass:
|
||||
type: string
|
||||
enum: ['default', 'primary', 'success', 'info', 'danger']
|
||||
required:
|
||||
- key
|
||||
datetime:
|
||||
type: number
|
||||
datetimeISO:
|
||||
type: string
|
||||
user:
|
||||
type: object
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
displayname:
|
||||
type: string
|
||||
description: This is either username or fullname depending on forum and user settings
|
||||
userslug:
|
||||
type: string
|
||||
description: An URL-safe variant of the username (i.e. lower-cased, spaces
|
||||
removed, etc.)
|
||||
picture:
|
||||
nullable: true
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
auto-generated icon given to users without
|
||||
an avatar
|
||||
icon:bgColor:
|
||||
type: string
|
||||
description: A six-character hexadecimal colour code assigned to the user. This
|
||||
value is used in conjunction with
|
||||
`icon:text` for the user's auto-generated
|
||||
icon
|
||||
example: "#f44336"
|
||||
required:
|
||||
- uid
|
||||
- datetime
|
||||
- datetimeISO
|
||||
- user
|
||||
FlagNotesObject:
|
||||
type: object
|
||||
properties:
|
||||
notes:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
uid:
|
||||
type: number
|
||||
content:
|
||||
type: string
|
||||
datetime:
|
||||
type: number
|
||||
datetimeISO:
|
||||
type: string
|
||||
user:
|
||||
type: object
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
userslug:
|
||||
type: string
|
||||
description: An URL-safe variant of the username (i.e. lower-cased, spaces
|
||||
removed, etc.)
|
||||
picture:
|
||||
type: string
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
auto-generated icon given to users without
|
||||
an avatar
|
||||
icon:bgColor:
|
||||
type: string
|
||||
description: A six-character hexadecimal colour code assigned to the user. This
|
||||
value is used in conjunction with
|
||||
`icon:text` for the user's auto-generated
|
||||
icon
|
||||
example: "#f44336"
|
||||
Reference in New Issue
Block a user