Skip to content

Commit

Permalink
Merge 2d72aeb into 4662432
Browse files Browse the repository at this point in the history
  • Loading branch information
dschenkelman committed Oct 1, 2014
2 parents 4662432 + 2d72aeb commit 16b90b9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/SwaggerManager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
var _ = require('underscore'),
fs = require('fs');

var SupportedHacks = ['file'];

var SwaggerManager = function(options) {

options = options || {};
Expand Down Expand Up @@ -57,6 +59,14 @@ var SwaggerManager = function(options) {
// keep an eye on https://github.com/wordnik/swagger-ui/issues/72
// looks like there might be change as far as body params go

// supporting file upload type
// if we used this in schema.type the JSON schema would be invalid
var schemaType = schema.type;

if (!schemaType && SupportedHacks.indexOf(schema.description) !== - 1){
schemaType = schema.description;
}

if (!route.settings.payload || !route.settings.payload.allow || route.settings.payload.allow.indexOf('application/json') >= 0) {
param = {
paramType: swaggerParamTypeMap[type],
Expand Down

0 comments on commit 16b90b9

Please sign in to comment.