Node.js based forum software built for the modern web
docs: openapi spec for new chat search API
Julian Lamaabe86d812f0
diff --git a/public/openapi/write.yaml b/public/openapi/write.yamlindex 7a25ca7c9c..f22cf9f2cc 100644--- a/public/openapi/write.yaml+++ b/public/openapi/write.yaml@@ -228,6 +228,8 @@ paths:$ref: 'write/notifications/nid/read.yaml'/chats/:$ref: 'write/chats.yaml'+ /chats/search:+ $ref: 'write/chats/search.yaml'/chats/unread:$ref: 'write/chats/unread.yaml'/chats/sort:diff --git a/public/openapi/write/chats/search.yaml b/public/openapi/write/chats/search.yamlnew file mode 100644index 0000000000..65a1980797--- /dev/null+++ b/public/openapi/write/chats/search.yaml@@ -0,0 +1,156 @@+get:+ tags:+ - chats+ summary: search recent chat rooms+ description: This operation lists recently used chat rooms whose room name or user list matches a search query+ parameters:+ - in: query+ name: query+ schema:+ type: string+ example: test+ responses:+ '200':+ description: chat rooms successfully listed+ content:+ application/json:+ schema:+ type: object+ properties:+ status:+ $ref: ../../components/schemas/Status.yaml#/Status+ response:+ allOf:+ - $ref: ../../components/schemas/Chats.yaml#/RoomObject+ - type: object+ properties:+ unread:+ type: boolean+ description: Whether or not the chat has unread messages within+ teaser:+ type: object+ nullable: true+ properties:+ fromuid:+ type: number+ content:+ type: string+ timestamp:+ type: number+ timestampISO:+ type: string+ 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+ userslug:+ type: string+ description: An URL-safe variant of the username (i.e. lower-cased, spaces+ removed, etc.)+ picture:+ nullable: true+ type: string+ status:+ type: string+ lastonline:+ type: number+ 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"+ lastonlineISO:+ type: string+ users:+ type: array+ items:+ 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+ userslug:+ type: string+ description: An URL-safe variant of the username (i.e. lower-cased, spaces+ removed, etc.)+ picture:+ nullable: true+ type: string+ status:+ type: string+ lastonline:+ type: number+ 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"+ lastonlineISO:+ type: string+ lastUser:+ 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+ userslug:+ type: string+ description: An URL-safe variant of the username (i.e. lower-cased, spaces+ removed, etc.)+ picture:+ nullable: true+ type: string+ status:+ type: string+ lastonline:+ type: number+ 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"+ lastonlineISO:+ type: string+ usernames:+ type: string\ No newline at end of file