User posts
This commit is contained in:
@@ -593,6 +593,62 @@ paths:
|
||||
}
|
||||
tags:
|
||||
- User
|
||||
/users/{id}/posts:
|
||||
get:
|
||||
summary: Get user posts
|
||||
description: Get a users posts ID.
|
||||
security:
|
||||
- BasicAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: User ID
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int14
|
||||
- in: query
|
||||
name: p
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 0
|
||||
default: 0
|
||||
description: Current page.
|
||||
- in: query
|
||||
name: l
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 0
|
||||
maximum: 30
|
||||
default: 10
|
||||
description: The number of items to return.
|
||||
- in: query
|
||||
name: s
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- asc
|
||||
- desc
|
||||
default: asc
|
||||
description: Sort order by time.
|
||||
responses:
|
||||
200:
|
||||
description: Success.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PostListResponse"
|
||||
404:
|
||||
description: User not found.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/NotFoundResponse"
|
||||
examples:
|
||||
User not found:
|
||||
value: { "code": "NotFound", "entity": "user" }
|
||||
tags:
|
||||
- User
|
||||
|
||||
externalDocs:
|
||||
url: https://khofmann.userpage.fu-berlin.de/phpCourse/exam/api/docs/
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user