-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
87 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,87 @@ | ||
/** | ||
* @swagger | ||
* tags: | ||
* name: Subscribe | ||
* description: Subscription management | ||
*/ | ||
|
||
/** | ||
* @openapi | ||
* /api/v1/subscribe: | ||
* post: | ||
* tags: [Subscribe] | ||
* summary: Subscribe user to our app | ||
* requestBody: | ||
* required: true | ||
* content: | ||
* application/json: | ||
* schema: | ||
* type: object | ||
* properties: | ||
* email: | ||
* type: string | ||
* example: [email protected] | ||
* responses: | ||
* 201: | ||
* description: Subscribed successfully | ||
* content: | ||
* application/json: | ||
* schema: | ||
* type: object | ||
* properties: | ||
* message: | ||
* type: string | ||
* example: Subscribed successfully | ||
* subscription: | ||
* type: object | ||
* properties: | ||
* email: | ||
* type: string | ||
* example: [email protected] | ||
*/ | ||
|
||
/** | ||
* @openapi | ||
* /api/v1/subscribe/delete/{id}: | ||
* delete: | ||
* tags: [Subscribe] | ||
* summary: Removes a user from subscription | ||
* parameters: | ||
* - in: path | ||
* name: id | ||
* required: true | ||
* schema: | ||
* type: integer | ||
* example: 1 | ||
* responses: | ||
* 200: | ||
* description: Subscription removed successfully | ||
* content: | ||
* application/json: | ||
* schema: | ||
* type: object | ||
* properties: | ||
* message: | ||
* type: string | ||
* example: Subscription removed successfully | ||
* 404: | ||
* description: Subscription not found | ||
* content: | ||
* application/json: | ||
* schema: | ||
* type: object | ||
* properties: | ||
* message: | ||
* type: string | ||
* example: Subscription not found | ||
* 400: | ||
* description: Invalid ID | ||
* content: | ||
* application/json: | ||
* schema: | ||
* type: object | ||
* properties: | ||
* message: | ||
* type: string | ||
* example: Invalid ID | ||
*/ |