diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml index eb798b08d7..757e673aa4 100644 --- a/public/openapi/read.yaml +++ b/public/openapi/read.yaml @@ -37,6 +37,73 @@ tags: description: Disparate method of categorizing topics - name: shorthand description: Convenience and utility routes for accessing other part of the API +components: + schemas: + CommonProps: + type: object + properties: + loggedIn: + type: boolean + relative_path: + type: string + url: + type: string + bodyClass: + type: string + _header: + type: object + properties: + tags: + type: object + properties: + meta: + type: array + items: + type: object + properties: + name: + type: string + content: + type: string + noEscape: + type: boolean + property: + type: string + required: + - name + - content + - noEscape + - property + link: + type: array + items: + type: object + properties: + rel: + type: string + type: + type: string + href: + type: string + title: + type: string + sizes: + type: string + required: + - rel + - href + - type + - sizes + widgets: + type: object + properties: + footer: + type: array + items: + type: object + properties: + html: + type: string paths: /api/: get: @@ -51,365 +118,15 @@ paths: content: application/json: schema: - type: object - properties: - title: - type: string - categories: - type: array - items: - type: object - properties: - cid: - type: number - description: A category identifier - name: - type: string - description: - type: string - icon: - type: string - slug: - type: string - topic_count: - type: number - description: The number of topics in the category - order: - type: number - bgColor: - type: string - link: - type: string - class: - type: string - numRecentReplies: - type: number - color: - type: string - post_count: - type: number - description: The number of posts in the category - descriptionParsed: - type: string - parentCid: - type: number - description: The category identifier for the category that is the immediate ancestor of the current category - disabled: - type: number - isSection: - type: number - totalPostCount: - type: number - description: The number of posts in the category - totalTopicCount: - type: number - description: The number of topics in the category - tagWhitelist: - type: array - items: {} - unread-class: - type: string - children: - type: array - items: - type: object - properties: - cid: - type: number - description: A category identifier - name: - type: string - description: - type: string - icon: - type: string - slug: - type: string - topic_count: - type: number - description: The number of topics in the category - order: - type: number - bgColor: - type: string - link: - type: string - class: - type: string - numRecentReplies: - type: number - color: - type: string - post_count: - type: number - description: The number of posts in the category - parentCid: - type: number - description: The category identifier for the category that is the immediate ancestor of the current category - disabled: - type: number - isSection: - type: number - totalPostCount: - type: number - description: The number of posts in the category - totalTopicCount: - type: number - description: The number of topics in the category - descriptionParsed: - type: string - tagWhitelist: - type: array - items: {} - unread-class: - type: string - children: - type: array - items: {} - parent: - type: object - properties: - link: - type: string - class: - type: string - icon: - type: string - description: - type: string - order: - type: number - topic_count: - type: number - description: The number of topics in the category - name: - type: string - cid: - type: number - description: A category identifier - post_count: - type: number - description: The number of posts in the category - numRecentReplies: - type: number - bgColor: - type: string - slug: - type: string - color: - type: string - disabled: - type: number - descriptionParsed: - type: string - isSection: - type: number - parentCid: - type: number - description: The category identifier for the category that is the immediate ancestor of the current category - totalPostCount: - type: number - description: The number of posts in the category - totalTopicCount: - type: number - description: The number of topics in the category - tagWhitelist: - type: array - items: {} - unread-class: - type: string - imageClass: - type: string - posts: - type: array - items: - type: object - properties: - pid: - type: number - timestamp: - type: number - 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 - cid: - type: number - description: A category identifier - parentCid: - type: number - description: The category identifier for the category that is the immediate ancestor of the current category - topic: - type: object - properties: - slug: - type: string - title: - type: string - imageClass: - type: string - timesClicked: - type: number - posts: - type: array - items: - type: object - properties: - pid: - type: number - timestamp: - type: number - 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 - cid: - type: number - description: A category identifier - parentCid: - type: number - description: The category identifier for the category that is the immediate ancestor of the current category - topic: - type: object - properties: - slug: - type: string - title: - type: string - teaser: - type: object - properties: - url: - type: string - timestampISO: - type: string - description: An ISO 8601 formatted date string (complementing `timestamp`) - pid: - type: number - topic: - type: object - properties: - slug: - type: string - title: - type: string - imageClass: - type: string - loggedIn: - type: boolean - relative_path: - type: string - template: - type: object + allOf: + - $ref: '#/components/schemas/CommonProps' + - type: object properties: - name: + title: type: string categories: - type: boolean - url: - type: string - bodyClass: - type: string - topics: - type: array - items: - 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 - deleted: - type: number - locked: - type: number - pinned: - type: number - description: Whether or not this particular topic is pinned to the top of the category - upvotes: - type: number - downvotes: - 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: array + items: type: object properties: cid: @@ -417,83 +134,365 @@ paths: description: A category identifier name: type: string - slug: + description: type: string icon: type: string - image: - nullable: true - imageClass: - nullable: true + slug: type: string + topic_count: + type: number + description: The number of topics in the category + order: + type: number bgColor: type: string + link: + type: string + class: + type: string + numRecentReplies: + type: number color: type: string + post_count: + type: number + description: The number of posts in the category + descriptionParsed: + type: string + parentCid: + type: number + description: The category identifier for the category that is the immediate ancestor of the current category disabled: type: number - user: - type: object - properties: - uid: + isSection: 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.) - reputation: + totalPostCount: type: number - postcount: + description: The number of posts in the category + totalTopicCount: type: number - picture: - nullable: true - type: string - signature: - nullable: true - type: string - 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 - oldUid: - type: number - groupTitle: - type: string - groupTitleArray: + description: The number of topics in the category + tagWhitelist: type: array items: {} - fullname: + unread-class: type: string - teaser: + children: + type: array + items: + type: object + properties: + cid: + type: number + description: A category identifier + name: + type: string + description: + type: string + icon: + type: string + slug: + type: string + topic_count: + type: number + description: The number of topics in the category + order: + type: number + bgColor: + type: string + link: + type: string + class: + type: string + numRecentReplies: + type: number + color: + type: string + post_count: + type: number + description: The number of posts in the category + parentCid: + type: number + description: The category identifier for the category that is the immediate ancestor of the current category + disabled: + type: number + isSection: + type: number + totalPostCount: + type: number + description: The number of posts in the category + totalTopicCount: + type: number + description: The number of topics in the category + descriptionParsed: + type: string + tagWhitelist: + type: array + items: {} + unread-class: + type: string + children: + type: array + items: {} + parent: + type: object + properties: + link: + type: string + class: + type: string + icon: + type: string + description: + type: string + order: + type: number + topic_count: + type: number + description: The number of topics in the category + name: + type: string + cid: + type: number + description: A category identifier + post_count: + type: number + description: The number of posts in the category + numRecentReplies: + type: number + bgColor: + type: string + slug: + type: string + color: + type: string + disabled: + type: number + descriptionParsed: + type: string + isSection: + type: number + parentCid: + type: number + description: The category identifier for the category that is the immediate ancestor of the current category + totalPostCount: + type: number + description: The number of posts in the category + totalTopicCount: + type: number + description: The number of topics in the category + tagWhitelist: + type: array + items: {} + unread-class: + type: string + imageClass: + type: string + posts: + type: array + items: + type: object + properties: + pid: + type: number + timestamp: + type: number + 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 + cid: + type: number + description: A category identifier + parentCid: + type: number + description: The category identifier for the category that is the immediate ancestor of the current category + topic: + type: object + properties: + slug: + type: string + title: + type: string + imageClass: + type: string + timesClicked: + type: number + posts: + type: array + items: + type: object + properties: + pid: + type: number + timestamp: + type: number + 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 + cid: + type: number + description: A category identifier + parentCid: + type: number + description: The category identifier for the category that is the immediate ancestor of the current category + topic: + type: object + properties: + slug: + type: string + title: + type: string + teaser: + type: object + properties: + url: + type: string + timestampISO: + type: string + description: An ISO 8601 formatted date string (complementing `timestamp`) + pid: + type: number + topic: + type: object + properties: + slug: + type: string + title: + type: string + imageClass: + type: string + template: + type: object + properties: + name: + type: string + categories: + type: boolean + topics: + type: array + items: type: object properties: - pid: - type: number - uid: - type: number - description: A user identifier - timestamp: - type: number tid: type: number description: A topic identifier - content: + 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 + deleted: + type: number + locked: + type: number + pinned: + type: number + description: Whether or not this particular topic is pinned to the top of the category + upvotes: + type: number + downvotes: + 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 + imageClass: + nullable: true + type: string + bgColor: + type: string + color: + type: string + disabled: + type: number user: type: object properties: @@ -506,9 +505,20 @@ paths: 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: nullable: true type: string + signature: + nullable: true + type: string + 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 @@ -516,107 +526,93 @@ paths: 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 - 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 - unreplied: - type: boolean - icons: - type: array - items: {} - index: - type: number - thumb: - type: string - teaserPid: - type: number - _header: - type: object - properties: - tags: - type: object - properties: - meta: - type: array - items: + banned_until_readable: + type: string + oldUid: + type: number + groupTitle: + type: string + groupTitleArray: + type: array + items: {} + fullname: + type: string + teaser: type: object properties: - name: - type: string + pid: + type: number + uid: + type: number + description: A user identifier + timestamp: + type: number + tid: + type: number + description: A topic identifier content: type: string - noEscape: - type: boolean - property: + timestampISO: type: string - link: - type: array - items: - type: object - properties: - rel: - type: string - type: - type: string - href: - type: string - title: - type: string - sizes: - type: string - widgets: - type: object - properties: - sidebar: - type: array - items: - type: object - properties: - html: - type: string - header: - type: array - items: - type: object - properties: - html: - type: string - footer: - type: array - items: - type: object - properties: - html: - type: string - motd: - type: array - items: - type: object - properties: - html: + 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 + 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 + unreplied: + type: boolean + icons: + type: array + items: {} + index: + type: number + thumb: type: string + teaserPid: + type: number "304": description: "" "/api/post/{pid}/raw":