Testing suite integration for openapi spec (#8263)
* feat: testing suite integration for openapi spec The testing suite now takes the openapi spec into account. It will check each route defined, make a call to it, and compare the response with the defined schema. Any mismatches will cause the test to fail. * fix(openapi): removed debug stuff from tests * fix(openapi): fixed some tests * fix(openapi): added additional check to tests, test fixes * fix(openapi): better tests, fixed spec errors * fix(openapi): bad conditional in test * fix: oops * fix(openapi): more tests fixing * fix(openapi): more tests * fix(openapi): fix some more tests * fix: verbose'd an info log * fix: topic pagination route returns schema-optimized pagination block * fix(openapi): more test/spec fixes * fix(openapi): accidentally sending in authenticated jar for anon routes * fix(openapi): more test/spec fixes * fix(openapi): more spec fixes * fix: timestampReadable Invalid Date * fix(openapi): more tests... almost there * fix(openapi): more tests fixing * fix(openapi): finally all tests passing * fix(openapi): added reverse test to compare response to spec ... and fixed all the tests that broke * fix: remove tests related to group covers, as route is gone * fix(openapi): broken test on travis * fix(openapi): broken test on travis * fix(openapi): broken test on travis * fix(openapi): object cache is not present for psql * fix: tests Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>v1.18.x
parent
6edf02d4a5
commit
ccc6118d30
@ -0,0 +1,253 @@
|
|||||||
|
TopicObject:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
tid:
|
||||||
|
type: number
|
||||||
|
description: A topic identifier
|
||||||
|
uid:
|
||||||
|
type: number
|
||||||
|
description: A user identifier
|
||||||
|
cid:
|
||||||
|
type: number
|
||||||
|
description: A category identifier
|
||||||
|
mainPid:
|
||||||
|
type: number
|
||||||
|
description: The post id of the first post in this topic (also called the
|
||||||
|
"original post")
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
slug:
|
||||||
|
type: string
|
||||||
|
timestamp:
|
||||||
|
type: number
|
||||||
|
lastposttime:
|
||||||
|
type: number
|
||||||
|
postcount:
|
||||||
|
type: number
|
||||||
|
viewcount:
|
||||||
|
type: number
|
||||||
|
teaserPid:
|
||||||
|
oneOf:
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
nullable: true
|
||||||
|
upvotes:
|
||||||
|
type: number
|
||||||
|
downvotes:
|
||||||
|
type: number
|
||||||
|
deleted:
|
||||||
|
type: number
|
||||||
|
locked:
|
||||||
|
type: number
|
||||||
|
pinned:
|
||||||
|
type: number
|
||||||
|
description: Whether or not this particular topic is pinned to the top of the
|
||||||
|
category
|
||||||
|
deleterUid:
|
||||||
|
type: number
|
||||||
|
titleRaw:
|
||||||
|
type: string
|
||||||
|
timestampISO:
|
||||||
|
type: string
|
||||||
|
description: An ISO 8601 formatted date string (complementing `timestamp`)
|
||||||
|
lastposttimeISO:
|
||||||
|
type: string
|
||||||
|
votes:
|
||||||
|
type: number
|
||||||
|
category:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
cid:
|
||||||
|
type: number
|
||||||
|
description: A category identifier
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
slug:
|
||||||
|
type: string
|
||||||
|
icon:
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
imageClass:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
bgColor:
|
||||||
|
type: string
|
||||||
|
color:
|
||||||
|
type: string
|
||||||
|
disabled:
|
||||||
|
type: number
|
||||||
|
user:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
uid:
|
||||||
|
type: number
|
||||||
|
description: A user identifier
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
description: A friendly name for a given user account
|
||||||
|
fullname:
|
||||||
|
type: string
|
||||||
|
userslug:
|
||||||
|
type: string
|
||||||
|
description: An URL-safe variant of the username (i.e. lower-cased, spaces
|
||||||
|
removed, etc.)
|
||||||
|
reputation:
|
||||||
|
type: number
|
||||||
|
postcount:
|
||||||
|
type: number
|
||||||
|
picture:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
signature:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
banned:
|
||||||
|
type: number
|
||||||
|
status:
|
||||||
|
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"
|
||||||
|
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
|
||||||
|
type: number
|
||||||
|
unreplied:
|
||||||
|
type: boolean
|
||||||
|
icons:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
description: HTML injected into the theme
|
||||||
|
index:
|
||||||
|
type: number
|
||||||
|
thumb:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- tid
|
||||||
|
- uid
|
||||||
|
- cid
|
||||||
|
- mainPid
|
||||||
|
- title
|
||||||
|
- slug
|
||||||
|
- timestamp
|
||||||
|
- lastposttime
|
||||||
|
- postcount
|
||||||
|
- viewcount
|
||||||
|
- teaserPid
|
||||||
|
- upvotes
|
||||||
|
- downvotes
|
||||||
|
- deleted
|
||||||
|
- locked
|
||||||
|
- pinned
|
||||||
|
- deleterUid
|
||||||
|
- titleRaw
|
||||||
|
- timestampISO
|
||||||
|
- lastposttimeISO
|
||||||
|
- votes
|
||||||
|
- category
|
||||||
|
- user
|
||||||
|
- teaser
|
||||||
|
- tags
|
||||||
|
- isOwner
|
||||||
|
- ignored
|
||||||
|
- unread
|
||||||
|
- bookmark
|
||||||
|
- unreplied
|
||||||
|
- icons
|
||||||
|
- index
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue