Skip to content

Commit

Permalink
Change function names with comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son committed Mar 17, 2021
1 parent 4d99e9b commit ffc6b7c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
24 changes: 12 additions & 12 deletions src/api/rest/server/common/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ type ObjectList struct {
Object []string `json:"object"`
}

// func RestGetObjectList is a rest api wrapper for GetObjectList.
// RestGetObjectList godoc
// func RestGetObjects is a rest api wrapper for GetObjectList.
// RestGetObjects godoc
// @Summary List all objects for a given key
// @Description List all objects for a given key
// @Tags Admin
Expand All @@ -123,7 +123,7 @@ type ObjectList struct {
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
// @Router /objects [get]
func RestGetObjectList(c echo.Context) error {
func RestGetObjects(c echo.Context) error {
parentKey := c.QueryParam("key")
fmt.Printf("[Get Tumblebug Object List] with Key: %s \n", parentKey)

Expand All @@ -137,8 +137,8 @@ func RestGetObjectList(c echo.Context) error {
return c.JSON(http.StatusOK, &objectList)
}

// func RestGetObjectValue is a rest api wrapper for GetObjectValue.
// RestGetObjectValue godoc
// func RestGetObject is a rest api wrapper for GetObject.
// RestGetObject godoc
// @Summary Get value of an object
// @Description Get value of an object
// @Tags Admin
Expand All @@ -149,7 +149,7 @@ func RestGetObjectList(c echo.Context) error {
// @Failure 404 {object} common.SimpleMsg
// @Failure 500 {object} common.SimpleMsg
// @Router /object [get]
func RestGetObjectValue(c echo.Context) error {
func RestGetObject(c echo.Context) error {
parentKey := c.QueryParam("key")
fmt.Printf("[Get Tumblebug Object Value] with Key: %s \n", parentKey)

Expand All @@ -164,10 +164,10 @@ func RestGetObjectValue(c echo.Context) error {
return c.JSON(http.StatusOK, &contentJSON)
}

// func RestDeleteObjectValue is a rest api wrapper for DeleteObject.
// RestDeleteObjectValue godoc
// @Summary Delete value of an object
// @Description Delete value of an object
// func RestDeleteObject is a rest api wrapper for DeleteObject.
// RestDeleteObject godoc
// @Summary Delete an object
// @Description Delete an object
// @Tags Admin
// @Accept json
// @Produce json
Expand Down Expand Up @@ -195,8 +195,8 @@ func RestDeleteObject(c echo.Context) error {

// func RestDeleteObjects is a rest api wrapper for DeleteObjects.
// RestDeleteObjects godoc
// @Summary Delete objects
// @Description Delete objects
// @Summary Delete child objects along with the given object
// @Description Delete child objects along with the given object
// @Tags Admin
// @Accept json
// @Produce json
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ func ApiServer() {
e.GET("/tumblebug/config", rest_common.RestGetAllConfig)
e.DELETE("/tumblebug/config", rest_common.RestDelAllConfig)

e.GET("/tumblebug/objects", rest_common.RestGetObjectList)
e.GET("/tumblebug/object", rest_common.RestGetObjectValue)
e.GET("/tumblebug/object", rest_common.RestGetObject)
e.GET("/tumblebug/objects", rest_common.RestGetObjects)
e.DELETE("/tumblebug/object", rest_common.RestDeleteObject)
e.DELETE("/tumblebug/objects", rest_common.RestDeleteObjects)

Expand Down
8 changes: 4 additions & 4 deletions src/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3142,7 +3142,7 @@ var doc = `{
}
},
"delete": {
"description": "Delete value of an object",
"description": "Delete an object",
"consumes": [
"application/json"
],
Expand All @@ -3152,7 +3152,7 @@ var doc = `{
"tags": [
"Admin"
],
"summary": "Delete value of an object",
"summary": "Delete an object",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -3228,7 +3228,7 @@ var doc = `{
}
},
"delete": {
"description": "Delete objects",
"description": "Delete child objects along with the given object",
"consumes": [
"application/json"
],
Expand All @@ -3238,7 +3238,7 @@ var doc = `{
"tags": [
"Admin"
],
"summary": "Delete objects",
"summary": "Delete child objects along with the given object",
"parameters": [
{
"type": "string",
Expand Down
8 changes: 4 additions & 4 deletions src/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3127,7 +3127,7 @@
}
},
"delete": {
"description": "Delete value of an object",
"description": "Delete an object",
"consumes": [
"application/json"
],
Expand All @@ -3137,7 +3137,7 @@
"tags": [
"Admin"
],
"summary": "Delete value of an object",
"summary": "Delete an object",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -3213,7 +3213,7 @@
}
},
"delete": {
"description": "Delete objects",
"description": "Delete child objects along with the given object",
"consumes": [
"application/json"
],
Expand All @@ -3223,7 +3223,7 @@
"tags": [
"Admin"
],
"summary": "Delete objects",
"summary": "Delete child objects along with the given object",
"parameters": [
{
"type": "string",
Expand Down
8 changes: 4 additions & 4 deletions src/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3117,7 +3117,7 @@ paths:
delete:
consumes:
- application/json
description: Delete value of an object
description: Delete an object
parameters:
- description: delete object value by key
in: query
Expand All @@ -3139,7 +3139,7 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/common.SimpleMsg'
summary: Delete value of an object
summary: Delete an object
tags:
- Admin
get:
Expand Down Expand Up @@ -3174,7 +3174,7 @@ paths:
delete:
consumes:
- application/json
description: Delete objects
description: Delete child objects along with the given object
parameters:
- description: Delete child objects based on the given key string
in: query
Expand All @@ -3196,7 +3196,7 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/common.SimpleMsg'
summary: Delete objects
summary: Delete child objects along with the given object
tags:
- Admin
get:
Expand Down

0 comments on commit ffc6b7c

Please sign in to comment.