Skip to content

Commit

Permalink
Manual patch some docs stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gremble0 committed Oct 31, 2024
1 parent aaf3189 commit 6ff37da
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions docs/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,135 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- post
summary: Update a post
description: Edit a post by its ID. This action can only be performed by the post owner or an admin.
operationId: updatePost
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
description: ID of the post to edit
schema:
type: integer
requestBody:
description: Updated post content
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
responses:
'200':
description: Post updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Post'
'400':
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Post not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/posts/{id}/comments:
post:
tags:
- comment
summary: Create a comment for a post
description: Create a new comment associated with a specific post
operationId: createComment
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
description: ID of the post
schema:
type: integer
requestBody:
description: Comment creation details
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
userId:
type: integer
responses:
'201':
description: Comment created
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
'400':
description: Bad request
'401':
description: Unauthorized
get:
tags:
- comment
summary: Get all comments for a post
description: Retrieve all comments associated with a specific post.
operationId: getCommentsForPost
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
description: ID of the post to retrieve comments for
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: success
data:
properties:
comments:
type: array
items:
$ref: '#/components/schemas/Comment'
'404':
description: Not found
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: error
message:
type: string
example: Comments not found for the specified post

/logs:
post:
Expand Down

0 comments on commit 6ff37da

Please sign in to comment.