Describe the bug
Setting parameters in FormData mode only supports files and is modified to support all types of parameters.
To Reproduce
github.comswaggoswagoperation.go : 131 line
case "formData":
param = createParameter(paramType, description, name, "file", required)
Expected behavior
case "formData":
param = createParameter(paramType, description, name, TransToValidSchemeType(schemaType), required)
Screenshots

Additional context
I hope the author will fix it as soon as possible.
I'll check.
I also met this issue.
By the way, what specific swagger.json do you want?
"post": {
"description": "user signup",
"consumes": [
"application/x-www-form-urlencoded"
],
"produces": [
"application/json"
],
"summary": "user signup",
"parameters": [
{
"type": "file",
"description": "username",
"name": "username",
"in": "formData",
"required": true
},
I think the param type should be ~formData~string, not file.
@xwjdsh @pei0804
I think it should be "type":"string", not "type":"file"
@BlueSimle Yes, you are right, there is no formData type at all, I don't know what I was thinking at that time...
Do you want use application/x-www-form-urlencoded?
I think you should use string.
FormData is for file upload.
https://swagger.io/docs/specification/2-0/describing-parameters/#form-parameters
I refer to this document. Is there any misunderstandings?
In this case, post requests only support file parameter types.
absolutely is a big problem after formData if we use string everything should be ok ! but its not working !
@pei0804 FormData is just not about uploading file .
Sorry for the misunderstandings. I will take care of it.
@BlueSimle @xwjdsh @iraniamir fixed by #146 Thank you all you guy 馃槂
Please reopen it if you have any concerns.