Skip to content

Commit

Permalink
Fixing API Docs for privating posts
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan1696 committed Feb 18, 2025
1 parent 7e41ee3 commit 6e94169
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions public/openapi/write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
63 changes: 63 additions & 0 deletions public/openapi/write/topics/tid/private.yaml
Original file line number Diff line number Diff line change
@@ -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: {}

0 comments on commit 6e94169

Please sign in to comment.