Node.js based forum software built for the modern web
refactor: teaser object schema to its own file
Julian Lam1869b807f2f5
diff --git a/public/openapi/components/schemas/TeaserObject.yaml b/public/openapi/components/schemas/TeaserObject.yamlnew file mode 100644index 0000000000..93eeafa86e--- /dev/null+++ b/public/openapi/components/schemas/TeaserObject.yaml@@ -0,0 +1,55 @@+TeaserObject:+ type: object+ properties:+ roomId:+ type: number+ fromuid:+ type: number+ content:+ type: string+ timestamp:+ type: number+ timestampISO:+ type: string+ description: An ISO 8601 formatted date string (complementing `timestamp`)+ user:+ type: object+ properties:+ uid:+ type: number+ description: A user identifier+ isLocal:+ type: boolean+ description: Whether the user belongs to the local installation or not.+ 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+ nullable: truediff --git a/public/openapi/components/schemas/TopicObject.yaml b/public/openapi/components/schemas/TopicObject.yamlindex 605c32de85..6a3f212541 100644--- a/public/openapi/components/schemas/TopicObject.yaml+++ b/public/openapi/components/schemas/TopicObject.yaml@@ -94,61 +94,7 @@ TopicObject:- icon:bgColor- banned_until_readableteaser:- 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- sourceContent:- type: string- nullable: true- 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- displayname:- type: string- isLocal:- type: boolean- 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+ $ref: './TeaserObject.yaml#/TeaserObject'tags:type: arrayitems:diff --git a/public/openapi/read/categories.yaml b/public/openapi/read/categories.yamlindex 76d2375ebb..c78533e267 100644--- a/public/openapi/read/categories.yaml+++ b/public/openapi/read/categories.yaml@@ -197,58 +197,7 @@ get:title:type: stringteaser:- type: object- properties:- url:- type: string- timestampISO:- type: string- description: An ISO 8601 formatted date string (complementing `timestamp`)- pid:- type: number- tid:- type: number- index:- type: number- description: The index of the post- topic:- type: object- properties:- tid:- type: number- slug:- type: string- title:- type: string- user:- type: object- properties:- uid:- type: number- example: 1- isLocal:- type: boolean- description: Whether the user belongs to the local installation or not.- username:- type: string- example: Dragon Fruit- userslug:- type: string- example: dragon-fruit- picture:- type: string- example: 'https://images.unsplash.com/photo-1560070094-e1f2ddec4337?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=256&h=256&q=80'- nullable: true- displayname:- type: string- description: This is either username or fullname depending on forum and user settings- example: Dragon Fruit- 'icon:text':- type: string- example: D- 'icon:bgColor':- type: string- example: '#9c27b0'+ $ref: ../components/schemas/TeaserObject.yaml#/TeaserObjectimageClass:type: string- $ref: ../components/schemas/Pagination.yaml#/Paginationdiff --git a/public/openapi/read/index.yaml b/public/openapi/read/index.yamlindex 4c45da4360..56e4048340 100644--- a/public/openapi/read/index.yaml+++ b/public/openapi/read/index.yaml@@ -199,58 +199,7 @@ get:title:type: stringteaser:- type: object- properties:- url:- type: string- timestampISO:- type: string- description: An ISO 8601 formatted date string (complementing `timestamp`)- pid:- type: number- tid:- type: number- index:- type: number- description: The index of the post- topic:- type: object- properties:- tid:- type: number- slug:- type: string- title:- type: string- user:- type: object- properties:- uid:- type: number- example: 1- username:- type: string- example: Dragon Fruit- userslug:- type: string- example: dragon-fruit- picture:- type: string- example: 'https://images.unsplash.com/photo-1560070094-e1f2ddec4337?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=256&h=256&q=80'- nullable: true- displayname:- type: string- description: This is either username or fullname depending on forum and user settings- example: Dragon Fruit- 'icon:text':- type: string- example: D- 'icon:bgColor':- type: string- example: '#9c27b0'- isLocal:- type: boolean- description: Whether the user belongs to the local installation or not.+ $ref: ../components/schemas/TeaserObject.yaml#/TeaserObjectimageClass:type: string- $ref: ../components/schemas/Pagination.yaml#/Paginationdiff --git a/public/openapi/read/tags/tag.yaml b/public/openapi/read/tags/tag.yamlindex c9a49c5160..409ffb150b 100644--- a/public/openapi/read/tags/tag.yaml+++ b/public/openapi/read/tags/tag.yaml@@ -150,53 +150,7 @@ get:fullname:type: stringteaser:- 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+ $ref: ../../components/schemas/TeaserObject.yaml#/TeaserObjecttags:type: arrayitems:diff --git a/public/openapi/read/unread.yaml b/public/openapi/read/unread.yamlindex 6ae0e8500e..516299c1fc 100644--- a/public/openapi/read/unread.yaml+++ b/public/openapi/read/unread.yaml@@ -127,61 +127,7 @@ get:- icon:bgColor- banned_until_readableteaser:- type: object- nullable: true- properties:- pid:- type: number- uid:- type: number- description: A user identifier- timestamp:- type: number- tid:- type: number- description: A topic identifier- content:- type: string- sourceContent:- type: string- nullable: true- 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- displayname:- type: string- isLocal:- type: boolean- 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+ $ref: ../components/schemas/TeaserObject.yaml#/TeaserObjecttags:type: arrayitems:diff --git a/public/openapi/read/user/userslug/chats/roomid.yaml b/public/openapi/read/user/userslug/chats/roomid.yamlindex 448f350a42..4468d9c0a1 100644--- a/public/openapi/read/user/userslug/chats/roomid.yaml+++ b/public/openapi/read/user/userslug/chats/roomid.yaml@@ -264,60 +264,7 @@ get:unread:type: booleanteaser:- type: object- properties:- roomId:- type: number- fromuid:- type: number- content:- type: string- timestamp:- type: number- timestampISO:- type: string- description: An ISO 8601 formatted date string (complementing `timestamp`)- user:- type: object- properties:- uid:- type: number- description: A user identifier- isLocal:- type: boolean- description: Whether the user belongs to the local installation or not.- 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- nullable: true+ $ref: ../../../../components/schemas/TeaserObject.yaml#/TeaserObjectlastUser:type: objectproperties:@@ -428,58 +375,7 @@ get:unread:type: booleanteaser:- type: object- properties:- fromuid:- type: number- content:- type: string- timestamp:- type: number- timestampISO:- type: string- description: An ISO 8601 formatted date string (complementing `timestamp`)- user:- type: object- properties:- uid:- type: number- description: A user identifier- isLocal:- type: boolean- description: Whether the user belongs to the local installation or not.- 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- nullable: true+ $ref: ../../../../components/schemas/TeaserObject.yaml#/TeaserObjectlastUser:type: objectproperties:diff --git a/public/openapi/write/chats.yaml b/public/openapi/write/chats.yamlindex 37204a9b5c..5206482565 100644--- a/public/openapi/write/chats.yaml+++ b/public/openapi/write/chats.yaml@@ -47,54 +47,7 @@ get:type: booleandescription: Whether or not the chat has unread messages withinteaser:- 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+ $ref: ../components/schemas/TeaserObject.yaml#/TeaserObjectusers:type: arrayitems: