upgrade: 优化部分代码, 部分内容待配置化
This commit is contained in:
22
enums/data_location.go
Normal file
22
enums/data_location.go
Normal file
@ -0,0 +1,22 @@
|
||||
// Package enums ...
|
||||
//
|
||||
// Description : enums ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-08-23 00:34
|
||||
package enums
|
||||
|
||||
type DocParamLocation string
|
||||
|
||||
func (dpl DocParamLocation) String() string {
|
||||
return string(dpl)
|
||||
}
|
||||
|
||||
const (
|
||||
DocParamLocationQuery DocParamLocation = "query"
|
||||
DocParamLocationHeader DocParamLocation = "header"
|
||||
DocParamLocationCookie DocParamLocation = "cookie"
|
||||
DocParamLocationBody DocParamLocation = "body"
|
||||
DocParamLocationPath DocParamLocation = "path"
|
||||
)
|
@ -42,4 +42,5 @@ const (
|
||||
SwaggerDataTypeBoolean SwaggerDataType = "boolean"
|
||||
SwaggerDataTypeArray SwaggerDataType = "array"
|
||||
SwaggerDataTypeObject SwaggerDataType = "object"
|
||||
SwaggerDataTypeApiKey SwaggerDataType = "apikey"
|
||||
)
|
||||
|
20
enums/ref.go
Normal file
20
enums/ref.go
Normal file
@ -0,0 +1,20 @@
|
||||
// Package enums ...
|
||||
//
|
||||
// Description : enums ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-08-23 00:40
|
||||
package enums
|
||||
|
||||
// RefPrefix 各种ref引用的前缀定义
|
||||
type RefPrefix string
|
||||
|
||||
func (rp RefPrefix) String() string {
|
||||
return string(rp)
|
||||
}
|
||||
|
||||
const (
|
||||
RefPrefixSchemaDefinition RefPrefix = "#/definitions/" // schema下的 $ref 下 definitions 的前缀
|
||||
RefPrefixSchemaResponse RefPrefix = "#/responses/" // schema下的 $ref 下 response 的前缀
|
||||
)
|
21
enums/ui_theme.go
Normal file
21
enums/ui_theme.go
Normal file
@ -0,0 +1,21 @@
|
||||
// Package enums ...
|
||||
//
|
||||
// Description : enums ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-08-23 01:03
|
||||
package enums
|
||||
|
||||
type SwaggerUITheme string
|
||||
|
||||
func (sut SwaggerUITheme) String() string {
|
||||
return string(sut)
|
||||
}
|
||||
|
||||
const (
|
||||
SwaggerUIThemeDefault SwaggerUITheme = "swaggerUI" // 文档默认主题
|
||||
SwaggerUIThemeKnife4go SwaggerUITheme = "knife4go" // knife4go 主题
|
||||
SwaggerUIThemeYDocLucky SwaggerUITheme = "ydoc-lucky-ui" // YDoc Lucky UI 主题: https://github.com/NoBugBoy/LuckyUI
|
||||
SwaggerUIThemeRedocFree SwaggerUITheme = "redoc-free" // redoc UI 主题, 开源免费版: https://github.com/Redocly/redoc
|
||||
)
|
19
enums/version.go
Normal file
19
enums/version.go
Normal file
@ -0,0 +1,19 @@
|
||||
// Package enums ...
|
||||
//
|
||||
// Description : enums ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-08-23 00:50
|
||||
package enums
|
||||
|
||||
type SwaggerVersion string
|
||||
|
||||
func (sv SwaggerVersion) String() string {
|
||||
return string(sv)
|
||||
}
|
||||
|
||||
const (
|
||||
SwaggerDocVersion2 SwaggerVersion = "2.0"
|
||||
SwaggerDocVersion3 SwaggerVersion = "3.0.0"
|
||||
)
|
Reference in New Issue
Block a user