Merge pull request #1150 from ePaul/bugfix/1146-escape-line-breaks-in-response-description

jaxrs: escape line breaks in response description
This commit is contained in:
wing328 2015-09-08 21:38:50 +08:00
commit 2b1a63a7de
2 changed files with 2 additions and 2 deletions

View File

@ -1073,7 +1073,7 @@ public class DefaultCodegen {
} else {
r.code = responseCode;
}
r.message = response.getDescription();
r.message = escapeText(response.getDescription());
r.schema = response.getSchema();
r.examples = toExamples(response.getExamples());
r.jsonSchema = Json.pretty(response);

View File

@ -45,7 +45,7 @@ public class {{classname}} {
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
{{/hasMore}}{{/allParams}})
throws NotFoundException {
return delegate.{{nickname}}({{#allParams}}{{#isFile}}fileDetail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}{{#hasMore}},{{/hasMore}}{{/allParams}});
return delegate.{{nickname}}({{#allParams}}{{#isFile}}fileDetail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}{{#hasMore}},{{/hasMore}}{{/allParams}});
}
{{/operation}}
}