updated codegen

This commit is contained in:
Tony Tam 2015-04-03 23:02:38 -07:00
parent f75312105d
commit 60e5899dc3
3 changed files with 7 additions and 2 deletions

View File

@ -22,6 +22,7 @@ public interface CodegenConfig {
String toApiVarName(String name);
String toModelName(String name);
String toParamName(String name);
String escapeText(String text);
String escapeReservedWord(String name);
String getTypeDeclaration(Property p);
String getTypeDeclaration(String name);

View File

@ -67,7 +67,11 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
config.additionalProperties().put("appVersion", info.getVersion());
}
if (info.getDescription() != null) {
config.additionalProperties().put("appDescription", info.getDescription());
System.out.println(info.getDescription());
System.out.println("escaped");
System.out.println(config.escapeText(info.getDescription()));
config.additionalProperties().put("appDescription",
config.escapeText(info.getDescription()));
}
if (info.getContact() != null) {
Contact contact = info.getContact();

View File

@ -20,7 +20,7 @@ public class SpringfoxServerCodegen extends JavaClientCodegen implements Codegen
protected String configPackage = "";
public CodegenType getTag() {
return CodegenType.OTHER;
return CodegenType.SERVER;
}
public String getName() {