zeromicro / goctl-swagger

MIT License
214 stars 138 forks source link

name解析错误问题 #75

Open kiritokun07 opened 1 year ago

kiritokun07 commented 1 year ago

goctl-swagger version 20220215 windows/amd64 name应该为type

TypeReq {
    Type int64 `form:"type,default=0" validate:"oneof=0 1 2 3"`
}

执行脚本

goctl api plugin -plugin goctl-swagger="swagger -filename test.json" -api test.api -dir .
"parameters": [
{
  "name": "oneof=0 1 2 3",
  "description": "xxx",
  "in": "query",
  "required": true,
  "type": "integer",
  "format": "int64",
  "default": "0"
}

补充:一个Req里有多个参数,只有这一个参数解析有问题,我单独列出来了

zjzjzjzj1874 commented 1 year ago

请把这个问题分配给我一下,谢谢 GitHubUser:zjzjzjzj1874,Link

jayvynl commented 1 year ago

88 修复了这个问题