merge of #369, https://github.com/wordnik/swagger-js/issues/74