UI doesn't show Data Type -selector for Models in arrays
this kind of body-parameter:
{
"name": "body",
"description": "List of user object",
"required": true,
"type": "array",
"items": {
"$ref": "User"
}
has a Data Type of array in the UI, instead of the blown model wrapped in a array.
Tried the latest master & seems to work the same way in the public demo: http://swagger.wordnik.com/#!/user/createUsersWithArrayInput_post_1
regards,
Tommi
Hi Tommy, I'm certain we addressed this in master, which is not uploaded to the petstore sample. See below, which is simply swagger-ui from master running locally:

my bad, from master it works beautifully.
thanks!
Tommi
What is the file or files that I need to update to have this fix? I have this same issue with a swagger ui that I downloaded like 3 months ago, I've been doing some customization in the code so I cannot just replace all the files. Thanks.
I found the part that needs to be updated in my version of swagger.js:
SwaggerOperation = (function() {
...
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
parameter = _ref1[_i];
parameter.name = parameter.name || parameter.type || parameter.dataType;
type = parameter.type || parameter.dataType;
// ++++ Add this:
if(type === 'array') {
type = 'array[' + parameter.items.$ref + ']';
}
// ++++
if (type.toLowerCase() === 'boolean') {
parameter.allowableValues = {};
parameter.allowableValues.values = ["true", "false"];
}
...