Skip to content

Commit

Permalink
inserted documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
13XAVI committed Jun 25, 2024
1 parent b9a087c commit eefe1c6
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions src/docs/subscribe.ts
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
*/

0 comments on commit eefe1c6

Please sign in to comment.