fix for #388
fix for #387
merge of #369, https://github.com/wordnik/swagger-js/issues/74
updated swagger-client
merged upstream