Skip to content

Commit

Permalink
v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMontane committed May 17, 2017
1 parent ed04bb0 commit 3563460
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SwaggerGenerator.js
Expand Up @@ -16101,11 +16101,15 @@ methods.isProducesHeader = function (param) {
methods.extractContentTypesFromParam = function (param) {
var schema = param.getJSONSchema(false);
if (schema.enum) {
return schema.enum;
return schema.enum.map(function (contentType) {
return contentType.split(';')[0];
});
}

if (schema.default) {
return [schema.default];
return [schema.default].map(function (contentType) {
return contentType.split(';')[0];
});
}

return [];
Expand Down

0 comments on commit 3563460

Please sign in to comment.