issue fix: when security.scope. description has a precedent | ,newline in markdown, generated api will break as an extra newline is added.

This commit is contained in:
Yao, Yao 2016-08-01 14:35:27 +08:00
parent bf17a91275
commit a772a855ee

View File

@ -2403,7 +2403,7 @@ public class DefaultCodegen {
for(Map.Entry<String, String> scopeEntry : oauth2Definition.getScopes().entrySet()) { for(Map.Entry<String, String> scopeEntry : oauth2Definition.getScopes().entrySet()) {
Map<String, Object> scope = new HashMap<String, Object>(); Map<String, Object> scope = new HashMap<String, Object>();
scope.put("scope", scopeEntry.getKey()); scope.put("scope", scopeEntry.getKey());
scope.put("description", scopeEntry.getValue()); scope.put("description", escapeText(scopeEntry.getValue()));
count += 1; count += 1;
if (count < numScopes) { if (count < numScopes) {