mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 18:00:00 +08:00
feature/goctl-api-swagger (#4780)
This commit is contained in:
27
tools/goctl/api/swagger/vars.go
Normal file
27
tools/goctl/api/swagger/vars.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package swagger
|
||||
|
||||
var (
|
||||
tpMapper = map[string]string{
|
||||
"uint8": swaggerTypeInteger,
|
||||
"uint16": swaggerTypeInteger,
|
||||
"uint32": swaggerTypeInteger,
|
||||
"uint64": swaggerTypeInteger,
|
||||
"int8": swaggerTypeInteger,
|
||||
"int16": swaggerTypeInteger,
|
||||
"int32": swaggerTypeInteger,
|
||||
"int64": swaggerTypeInteger,
|
||||
"int": swaggerTypeInteger,
|
||||
"uint": swaggerTypeInteger,
|
||||
"byte": swaggerTypeInteger,
|
||||
"float32": swaggerTypeNumber,
|
||||
"float64": swaggerTypeNumber,
|
||||
"string": swaggerTypeString,
|
||||
"bool": swaggerTypeBoolean,
|
||||
}
|
||||
commaRune = func(r rune) bool {
|
||||
return r == ','
|
||||
}
|
||||
slashRune = func(r rune) bool {
|
||||
return r == '/'
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user