Files
NodeBB/public/openapi/components/schemas/GroupObject.yaml
Julian Lam ccc6118d30 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>
2020-04-23 21:50:08 -04:00

133 lines
3.2 KiB
YAML

GroupFullObject:
type: object
description: The response from an internal call to `Groups.get(<groupname>)`
properties:
name:
type: string
description: The group name
slug:
type: string
description: URL-safe slug of the group name
createtime:
type: number
description: UNIX timestamp of the group's creation
userTitle:
type: number
description: Label text for the user badge
userTitleEnabled:
type: number
description:
type: string
description: The group description
memberCount:
type: number
hidden:
type: number
system:
type: number
private:
type: number
disableJoinRequests:
type: number
disableLeave:
type: number
nameEncoded:
type: string
displayName:
type: string
description: A custom override of the group's name, a friendly name
labelColor:
type: string
description: A six-character hexadecimal colour code
textColor:
type: string
description: A six-character hexadecimal colour code
icon:
type: string
description: A FontAwesome icon string
createtimeISO:
type: string
description: "`createtime` rendered as an ISO 8601 format"
cover:thumb:url:
type: string
cover:url:
type: string
cover:position:
type: string
descriptionParsed:
type: string
members:
type: array
items:
$ref: UserObject.yaml#/UserObjectSlim
membersNextStart:
type: number
pending:
type: array
invited:
type: array
isMember:
type: boolean
isPending:
type: boolean
isInvited:
type: boolean
isOwner:
type: boolean
nullable: true
GroupDataObject:
type: object
description: The response from an internal call to `Groups.getGroupData(<groupname>, [])` with **explicitly** no fields passed in
properties:
name:
type: string
description: The group name
slug:
type: string
description: URL-safe slug of the group name
createtime:
type: number
description: UNIX timestamp of the group's creation
userTitle:
type: number
description: Label text for the user badge
userTitleEnabled:
type: number
description:
type: string
description: The group description
memberCount:
type: number
hidden:
type: number
system:
type: number
private:
type: number
disableJoinRequests:
type: number
disableLeave:
type: number
cover:url:
type: string
cover:thumb:url:
type: string
nameEncoded:
type: string
displayName:
type: string
description: A custom override of the group's name, a friendly name
labelColor:
type: string
description: A six-character hexadecimal colour code
textColor:
type: string
description: A six-character hexadecimal colour code
icon:
type: string
description: A FontAwesome icon string
createtimeISO:
type: string
description: "`createtime` rendered as an ISO 8601 format"
cover:position:
type: string