Replies: 1 comment 1 reply
-
take a look here: https://github.com/go-swagger/go-swagger/blob/master/fixtures/goparsing/classification/operations/noparams.go#L28-L33 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem statement
怎么用 go-swagger 定义表单中的上传文件字段,
how can i use go-swagger generate doc from go source file comment for a field of file in formData?
i want the result such this ( for api-fox):
i need the filetest field, not file3 or other.
swagger.json such this
"parameters": [{"name": "filet",
"in": "formData",
"format": "binary",
"type": "string"
},{
"type": "file",
"description": "压缩包test2",
"name": "filetest2",
"in": "formData"
}]
Swagger specification
Steps to reproduce
this my swagger/docs/file.go file
file-swagger.txt
then exec command
swagger generate spec -o swagger.json
but i get the swagger.json belown
swagger.txt
it cant not generate the param like filetest
Environment
swagger version: v0.29.0
go version: go1.18.2
OS: windows10
Beta Was this translation helpful? Give feedback.
All reactions