Corrected accidental duplication of responseMessages from merge

This commit is contained in:
Shelby Sanders 2015-07-03 00:11:05 -07:00
parent 1294b53f5c
commit ef7e5d403c
1 changed files with 1 additions and 10 deletions

View File

@ -173,7 +173,7 @@ var routeHelper = module.exports = {
var returns = routeHelper.convertReturnsToSwagger(route, classDef);
var responseMessages = [
{
code: 200,
code: route.returns && route.returns.length ? 200 : 204,
message: 'Request was successful',
responseModel: returns.model || prepareDataType(returns.type) || 'void'
}
@ -186,15 +186,6 @@ var routeHelper = module.exports = {
var responseDoc = modelHelper.LDLPropToSwaggerDataType(returns);
var responseMessages = [{
code: route.returns && route.returns.length ? 200 : 204,
message: 'Request was successful'
}];
if (route.errors) {
responseMessages.push.apply(responseMessages, route.errors);
}
var apiDoc = {
path: routeHelper.convertPathFragments(route.path),
// Create the operation doc.