feat: swagger接口文档更新1.0.8
This commit is contained in:
@@ -33,6 +33,15 @@ type AccountController struct {
|
||||
// 系统登录
|
||||
//
|
||||
// POST /login
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param data body object true "Request Param"
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Summary System Login
|
||||
// @Description System Login
|
||||
// @Router /login [post]
|
||||
func (s *AccountController) Login(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var loginBody commonModel.LoginBody
|
||||
@@ -89,6 +98,15 @@ func (s *AccountController) Login(c *gin.Context) {
|
||||
// 登录用户信息
|
||||
//
|
||||
// GET /getInfo
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Login User Information
|
||||
// @Description Login User Information
|
||||
// @Router /getInfo [get]
|
||||
func (s *AccountController) Info(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
loginUser, err := ctx.LoginUser(c)
|
||||
@@ -117,6 +135,15 @@ func (s *AccountController) Info(c *gin.Context) {
|
||||
// 登录用户路由信息
|
||||
//
|
||||
// GET /getRouters
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Login User Routing Information
|
||||
// @Description Login User Routing Information
|
||||
// @Router /getRouters [get]
|
||||
func (s *AccountController) Router(c *gin.Context) {
|
||||
userID := ctx.LoginUserToUserID(c)
|
||||
|
||||
@@ -143,6 +170,15 @@ func (s *AccountController) Router(c *gin.Context) {
|
||||
// 系统登出
|
||||
//
|
||||
// POST /logout
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary System Logout
|
||||
// @Description System Logout
|
||||
// @Router /logout [post]
|
||||
func (s *AccountController) Logout(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
tokenStr := ctx.Authorization(c)
|
||||
|
||||
@@ -32,6 +32,15 @@ type CaptchaController struct {
|
||||
// 获取验证码
|
||||
//
|
||||
// GET /captchaImage
|
||||
//
|
||||
// @Tags common
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Get CAPTCHA
|
||||
// @Description Get CAPTCHA
|
||||
// @Router /captchaImage [get]
|
||||
func (s *CaptchaController) Image(c *gin.Context) {
|
||||
// 从数据库配置获取验证码开关 true开启,false关闭
|
||||
captchaEnabledStr := s.sysConfigService.SelectConfigValueByKey("sys.account.captchaEnabled")
|
||||
|
||||
@@ -46,9 +46,17 @@ func (s *CommontController) I18n(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
// 系统可暴露的配置信息
|
||||
// 系统的配置信息
|
||||
//
|
||||
// GET /sys-conf
|
||||
//
|
||||
// @Tags common
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Summary Configuration information for the system
|
||||
// @Description Configuration information for the system
|
||||
// @Router /sys-conf [get]
|
||||
func (s *CommontController) SysConfig(c *gin.Context) {
|
||||
data := s.commontService.SystemConfigInfo()
|
||||
|
||||
|
||||
@@ -71,6 +71,17 @@ func (s *FileController) Download(c *gin.Context) {
|
||||
// 上传文件
|
||||
//
|
||||
// POST /upload
|
||||
//
|
||||
// @Tags common/file
|
||||
// @Accept multipart/form-data
|
||||
// @Produce json
|
||||
// @Param file formData file true "The file to upload."
|
||||
// @Param subPath formData string true "subpath, eg: default or common" Enums(default, common)
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Upload a file
|
||||
// @Description Upload a file
|
||||
// @Router /file/upload [post]
|
||||
func (s *FileController) Upload(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
// 上传的文件
|
||||
@@ -105,6 +116,16 @@ func (s *FileController) Upload(c *gin.Context) {
|
||||
// 切片文件检查
|
||||
//
|
||||
// POST /chunkCheck
|
||||
//
|
||||
// @Tags common/file
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param data body object true "Request Param"
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Slice file checking
|
||||
// @Description Slice file checking
|
||||
// @Router /file/chunkCheck [post]
|
||||
func (s *FileController) ChunkCheck(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body struct {
|
||||
@@ -131,6 +152,16 @@ func (s *FileController) ChunkCheck(c *gin.Context) {
|
||||
// 切片文件合并
|
||||
//
|
||||
// POST /chunkMerge
|
||||
//
|
||||
// @Tags common/file
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param data body object true "Request Param"
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Slice file merge
|
||||
// @Description Slice file merge
|
||||
// @Router /file/chunkMerge [post]
|
||||
func (s *FileController) ChunkMerge(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body struct {
|
||||
@@ -170,6 +201,18 @@ func (s *FileController) ChunkMerge(c *gin.Context) {
|
||||
// 切片文件上传
|
||||
//
|
||||
// POST /chunkUpload
|
||||
//
|
||||
// @Tags common/file
|
||||
// @Accept multipart/form-data
|
||||
// @Produce json
|
||||
// @Param file formData file true "The file to upload."
|
||||
// @Param identifier formData string true "Slice Marker"
|
||||
// @Param index formData string true "Slice No."
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Sliced file upload
|
||||
// @Description Sliced file upload
|
||||
// @Router /file/chunkUpload [post]
|
||||
func (s *FileController) ChunkUpload(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
// 切片编号
|
||||
|
||||
@@ -24,7 +24,7 @@ type IndexController struct{}
|
||||
// @Tags common
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} map[string]any "data"
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Summary Root Route
|
||||
// @Description Root Route
|
||||
// @Router / [get]
|
||||
|
||||
Reference in New Issue
Block a user