test: fix spec for topic thumbs

v1.18.x
Julian Lam 4 years ago
parent 1d9ade4c36
commit 4c078084dc

@ -5,20 +5,6 @@ TopicObject:
properties: properties:
lastposttime: lastposttime:
type: number type: number
thumbs:
type: array
items:
type: object
properties:
id:
type: number
description: The topic id
name:
type: string
description: The topic thumbnail filename
url:
type: string
description: Relative path to the topic thumbnail
category: category:
type: object type: object
properties: properties:
@ -202,66 +188,92 @@ TopicObject:
- tid - tid
TopicObjectSlim: TopicObjectSlim:
description: The output of a call to `Topics.getTopicField`, these properties are always present no matter the fields passed in description: The output of a call to `Topics.getTopicField`, these properties are always present no matter the fields passed in
type: object allOf:
properties: - type: object
tid: properties:
type: number tid:
description: A topic identifier type: number
uid: description: A topic identifier
type: number uid:
description: A user identifier type: number
cid: description: A user identifier
type: number cid:
description: A category identifier type: number
title: description: A category identifier
type: string title:
slug: type: string
type: string slug:
mainPid: type: string
type: number mainPid:
description: The post id of the first post in this topic (also called the "original post") type: number
postcount: description: The post id of the first post in this topic (also called the "original post")
type: number postcount:
viewcount: type: number
type: number viewcount:
postercount: type: number
type: number postercount:
deleted: type: number
type: number deleted:
deleterUid: type: number
type: number deleterUid:
titleRaw: type: number
type: string titleRaw:
locked: type: string
type: number locked:
pinned: type: number
type: number pinned:
description: Whether or not this particular topic is pinned to the top of the type: number
category description: Whether or not this particular topic is pinned to the top of the
timestamp: category
type: number timestamp:
timestampISO: type: number
type: string timestampISO:
description: An ISO 8601 formatted date string (complementing `timestamp`) type: string
lastposttime: description: An ISO 8601 formatted date string (complementing `timestamp`)
type: number lastposttime:
lastposttimeISO: type: number
type: string lastposttimeISO:
description: An ISO 8601 formatted date string (complementing `lastposttime`) type: string
pinExpiry: description: An ISO 8601 formatted date string (complementing `lastposttime`)
type: number pinExpiry:
description: A UNIX timestamp indicating when a pinned topic will no longer be pinned (i.e. the pin has expired) type: number
pinExpiryISO: description: A UNIX timestamp indicating when a pinned topic will no longer be pinned (i.e. the pin has expired)
type: string pinExpiryISO:
description: "`pinExpiry` rendered as an ISO 8601 format" type: string
upvotes: description: "`pinExpiry` rendered as an ISO 8601 format"
type: number upvotes:
downvotes: type: number
type: number downvotes:
votes: type: number
type: number votes:
teaserPid: type: number
oneOf: teaserPid:
- type: number oneOf:
- type: string - type: number
nullable: true - type: string
nullable: true
thumbs:
type: array
items:
type: object
properties:
id:
type: number
description: The topic id
name:
type: string
description: The topic thumbnail filename
url:
type: string
description: Relative path to the topic thumbnail
- 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
numThumbs:
type: number
description: The number of thumbnails associated with this topic
required:
- tid

@ -46,14 +46,6 @@ get:
type: array type: array
items: items:
$ref: ../../components/schemas/TagObject.yaml#/TagObject $ref: ../../components/schemas/TagObject.yaml#/TagObject
thumbs:
type: array
items:
type: object
properties:
url:
type: string
description: Relative path to the topic thumbnail
posts: posts:
type: array type: array
items: items:

@ -35,14 +35,6 @@ get:
nullable: true nullable: true
titleRaw: titleRaw:
type: string type: string
thumbs:
type: array
items:
type: object
properties:
url:
type: string
description: Relative path to the topic thumbnail
category: category:
type: object type: object
properties: properties:

Loading…
Cancel
Save