Files
NodeBB/public/openapi/components/schemas/TopicObject.yaml

267 lines
7.7 KiB
YAML
Raw Normal View History

2020-04-23 21:50:08 -04:00
TopicObject:
allOf:
- $ref: '#/TopicObjectSlim'
- type: object
2020-04-23 21:50:08 -04:00
properties:
lastposttime:
2020-04-23 21:50:08 -04:00
type: number
2020-12-02 17:22:57 -05:00
thumbs:
type: array
items:
type: object
properties:
id:
type: number
description: The topic id
name:
type: string
description: The topic thumbnail filename
2020-12-02 17:22:57 -05:00
url:
type: string
description: Relative path to the topic thumbnail
category:
type: object
properties:
cid:
type: number
description: A category identifier
name:
type: string
slug:
type: string
icon:
type: string
backgroundImage:
nullable: true
type: string
imageClass:
nullable: true
type: string
bgColor:
type: string
color:
type: string
disabled:
type: number
2020-04-23 21:50:08 -04:00
user:
type: object
properties:
uid:
type: number
description: A user identifier
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
fullname:
type: string
2020-04-23 21:50:08 -04:00
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
reputation:
type: number
postcount:
type: number
2020-04-23 21:50:08 -04:00
picture:
type: string
2020-04-23 21:50:08 -04:00
nullable: true
signature:
type: string
nullable: true
banned:
type: number
status:
2020-04-23 21:50:08 -04:00
type: string
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
2020-04-23 21:50:08 -04:00
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
2020-04-23 21:50:08 -04:00
example: "#f44336"
banned_until_readable:
type: string
required:
- uid
- username
- userslug
- reputation
- postcount
- picture
- signature
- banned
- status
- icon:text
- icon:bgColor
- banned_until_readable
teaser:
type: object
properties:
pid:
type: number
uid:
type: number
description: A user identifier
timestamp:
type: number
tid:
type: number
description: A topic identifier
content:
type: string
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
user:
type: object
properties:
uid:
type: number
description: A user identifier
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:
nullable: true
type: string
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"
index:
type: number
nullable: true
tags:
type: array
items:
type: object
properties:
value:
type: string
valueEscaped:
type: string
color:
type: string
bgColor:
type: string
score:
type: number
isOwner:
type: boolean
ignored:
type: boolean
unread:
type: boolean
bookmark:
nullable: true
2020-04-23 21:50:08 -04:00
type: number
unreplied:
type: boolean
icons:
type: array
items:
2020-04-23 21:50:08 -04:00
type: string
description: HTML injected into the theme
index:
type: number
- type: object
description: Optional properties that may or may not be present (except for `tid`, which is always present, and is only here as a hack to pass validation)
properties:
tid:
type: number
description: A topic identifier
thumb:
type: string
pinExpiry:
type: number
description: A UNIX timestamp indicating when a pinned topic will no longer be pinned (i.e. the pin has expired)
pinExpiryISO:
type: string
description: "`pinExpiry` rendered as an ISO 8601 format"
required:
- tid
TopicObjectSlim:
description: The output of a call to `Topics.getTopicField`, these properties are always present no matter the fields passed in
type: object
properties:
tid:
type: number
description: A topic identifier
uid:
type: number
description: A user identifier
cid:
type: number
description: A category identifier
title:
type: string
slug:
type: string
mainPid:
type: number
description: The post id of the first post in this topic (also called the "original post")
postcount:
type: number
viewcount:
type: number
postercount:
type: number
deleted:
type: number
deleterUid:
type: number
titleRaw:
type: string
locked:
type: number
pinned:
type: number
description: Whether or not this particular topic is pinned to the top of the
category
timestamp:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
lastposttime:
type: number
lastposttimeISO:
type: string
description: An ISO 8601 formatted date string (complementing `lastposttime`)
pinExpiry:
type: number
description: A UNIX timestamp indicating when a pinned topic will no longer be pinned (i.e. the pin has expired)
pinExpiryISO:
type: string
description: "`pinExpiry` rendered as an ISO 8601 format"
upvotes:
type: number
downvotes:
type: number
votes:
type: number
teaserPid:
oneOf:
- type: number
- type: string
nullable: true