feat: swagger format
This commit is contained in:
@@ -17,7 +17,7 @@ type MyPlantApi struct{}
|
||||
// @Tags 我的植物
|
||||
// @Summary 添加植物
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body plantReq.CreateMyPlant true "创建植物"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
|
||||
@@ -43,7 +43,7 @@ func (a *MyPlantApi) AddPlant(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 植物列表
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body request.PageInfo true "分页获取植物列表"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
@@ -92,7 +92,7 @@ func (a *MyPlantApi) PlantDetail(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 修改ById植物
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body plantReq.UpdateMyPlant true "修改ById植物"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改ById成功"}"
|
||||
@@ -117,7 +117,7 @@ func (a *MyPlantApi) UpdatePlant(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 今日任务
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
// @Router /plant/todayTask [get]
|
||||
@@ -138,7 +138,7 @@ func (a *MyPlantApi) TodayTask(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 完成任务
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body plantReq.CompleteTask true "完成任务"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"完成任务"}"
|
||||
@@ -163,7 +163,7 @@ func (a *MyPlantApi) CompleteTask(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 删除植物
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body request.IdsReq true "删除植物"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
||||
@@ -187,7 +187,7 @@ func (a *MyPlantApi) DeletePlants(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 删除任务
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body request.IdsReq true "删除植物"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
||||
@@ -211,7 +211,7 @@ func (a *MyPlantApi) DeletePlans(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 添加养护事项
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body plantReq.CreateCarePlan true "添加养护事项"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
|
||||
@@ -255,7 +255,7 @@ func (a *MyPlantApi) DeletePlan(c *gin.Context) {
|
||||
// @Tags 我的植物
|
||||
// @Summary 添加成长记录
|
||||
// @Security BearerAuth
|
||||
// @accept json
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body plantReq.CreateGrowthRecord true "添加成长记录"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
|
||||
|
||||
Reference in New Issue
Block a user