-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add documentation for get user by id endpoint
- Loading branch information
1 parent
3b424a9
commit 9e22480
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
get: | ||
operationId: getUserById | ||
summary: Get a user by id | ||
description: This endpoint allows you to get a user by id. | ||
tags: | ||
- user | ||
|
||
parameters: | ||
- in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: string | ||
description: The user ID. | ||
|
||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
example: '1' | ||
name: | ||
type: string | ||
example: 'John Doe' | ||
username: | ||
type: string | ||
example: 'johndoe123' | ||
email: | ||
type: string | ||
example: 'johndoe@example.com' | ||
'400': | ||
$ref: '../../shared/errors/validation-error.yaml' | ||
'404': | ||
description: User not found | ||
'500': | ||
$ref: '../../shared/errors/server-error.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters