-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextArea for formData #587
Comments
No sure if this is still relevant, but for other people to use in the future the following code does it:
|
I might be coming at this from a wrong angle, but it seems to me like the fix suggested by @HarelM doesn't work. By adding the one parameter as body when you still have one or more other parameters as formData is against the spec, ref. this discussion: swagger-api/swagger-editor#889
So I guess @kongres' question remains: how can you have a formData parameter use a textarea that behaves like a body textarea? |
Very old, but just in case anyone else stumbles across this problem, I used Javascript injection to 'fix' this. // get the input element by name (or another unique attribute)
let _input = $('input[name="uniqueName"]');
var $txtArea = $('<textarea />');
// set/re-set desired attributes
$txtArea.attr('class', _input.attr('class'));
$txtArea.attr('name', _input.attr('name'));
$txtArea.attr('placeholder', _input.attr('placeholder'));
$txtArea.attr('id', _input.attr('id'));
$txtArea.val(_input.value);
// replace
_input.replaceWith($txtArea); |
I want to have textarea for one of my parameters which accept JSON model.
Please note I use multipart/form-data for my request.
My definition is
And what I have on UI:
![image](https://cloud.githubusercontent.com/assets/7360716/11947973/310bbb4e-a87f-11e5-940e-b244bec44fac.png)
I want to show textarea for 'data' parameter instead of input. I've tried a lot of different ways but unsuccessfuly. Is it possible? How?
The text was updated successfully, but these errors were encountered: