From 6e941698fa9e9acf01ff618284fb84b1ad83be0a Mon Sep 17 00:00:00 2001 From: Ethan Wang Date: Tue, 18 Feb 2025 18:47:40 -0500 Subject: [PATCH] Fixing API Docs for privating posts --- public/openapi/write.yaml | 2 + public/openapi/write/topics/tid/private.yaml | 63 ++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 public/openapi/write/topics/tid/private.yaml diff --git a/public/openapi/write.yaml b/public/openapi/write.yaml index c59b9bc..fb021d1 100644 --- a/public/openapi/write.yaml +++ b/public/openapi/write.yaml @@ -146,6 +146,8 @@ paths: $ref: 'write/topics/tid/lock.yaml' /topics/{tid}/pin: $ref: 'write/topics/tid/pin.yaml' + /topics/{tid}/private: + $ref: 'write/topics/tid/private.yaml' /topics/{tid}/follow: $ref: 'write/topics/tid/follow.yaml' /topics/{tid}/ignore: diff --git a/public/openapi/write/topics/tid/private.yaml b/public/openapi/write/topics/tid/private.yaml new file mode 100644 index 0000000..158fc19 --- /dev/null +++ b/public/openapi/write/topics/tid/private.yaml @@ -0,0 +1,63 @@ +put: + tags: + - topics + summary: private a topic + description: This operation privates an existing topic. + parameters: + - in: path + name: tid + schema: + type: string + required: true + description: a valid topic id + example: 1 + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + expiry: + type: number + description: A UNIX timestamp representing the moment the topic will be unpinned. + example: 1585337827953 + responses: + '200': + description: Topic successfully privated + content: + application/json: + schema: + type: object + properties: + status: + $ref: ../../../components/schemas/Status.yaml#/Status + response: + type: object + properties: {} +delete: + tags: + - topics + summary: unprivate a topic + description: This operation unprivates a topic. + parameters: + - in: path + name: tid + schema: + type: string + required: true + description: a valid topic id + example: 1 + responses: + '200': + description: Topic successfully unprivated + content: + application/json: + schema: + type: object + properties: + status: + $ref: ../../../components/schemas/Status.yaml#/Status + response: + type: object + properties: {} \ No newline at end of file