From ccc1e887d34cc42b591137d565a578ae662a437a Mon Sep 17 00:00:00 2001 From: Luis Fernando Planella Gonzalez Date: Thu, 19 Mar 2020 14:45:31 -0300 Subject: [PATCH] Summary field is not included in docstring Fixes #229 --- ng-swagger-gen.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ng-swagger-gen.js b/ng-swagger-gen.js index 4b13009..2a33cd9 100644 --- a/ng-swagger-gen.js +++ b/ng-swagger-gen.js @@ -1212,6 +1212,14 @@ function processServices(swagger, models, options) { } } var docString = (def.description || '').trim(); + var summary = (def.summary || path.summary || '').trim(); + if (summary !== '') { + if (docString === '') { + docString = summary; + } else { + docString = summary + '\n\n' + docString; + } + } if (paramsClass == null) { for (i = 0; i < operationParameters.length; i++) { param = operationParameters[i];