Commit 9b7027f8 authored by Ghitha Dinan's avatar Ghitha Dinan

add swagger

parent 13516436
......@@ -5,12 +5,14 @@ import id.co.sangkuriang.inovasi.daerah.master.model.request.PaginationRequest
import id.co.sangkuriang.inovasi.daerah.master.model.response.ReturnData
import id.co.sangkuriang.inovasi.daerah.master.pojo.Tag
import id.co.sangkuriang.inovasi.daerah.master.service.TagService
import io.swagger.annotations.Api
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
import javax.servlet.http.HttpServletRequest
import javax.validation.Valid
@Api(tags = ["Tag"], description = "Tag API")
@RestController
@RequestMapping(path = ["tag"])
class TagController {
......
package id.co.sangkuriang.inovasi.daerah.master.model.request
import io.swagger.annotations.ApiModelProperty
import io.swagger.annotations.ApiParam
class PaginationRequest(
@ApiModelProperty(
value = "1 enable or 0 disable, default 1",
name = "enablePage",
dataType = "Intreger",
example = "1"
)
var enablePage: Int? = 1,
@ApiModelProperty(
value = "0 or 1, default 1",
name = "page",
dataType = "Intreger",
example = "0"
)
var page: Int? = 0,
@ApiModelProperty(
value = "10 or 15, default 10",
name = "size",
dataType = "Intreger",
example = "10"
)
var size: Int? = 10,
@ApiModelProperty(
value = "desc or asc, default desc",
name = "sort",
dataType = "Intreger",
example = "10"
)
var sort: String? = "desc",
@ApiModelProperty(
value = "any, default updatedAt",
name = "sortBy",
dataType = "String",
example = "updatedAt"
)
var sortBy: String? = "updatedAt",
@ApiModelProperty(
value = "any, default empty string",
name = "param",
dataType = "String"
)
var param: String? = ""
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment