Fixes for swagger.json to Java escaping. (#5247)

This commit is contained in:
Rik Sprenkels
2017-04-23 13:10:25 +02:00
committed by wing328
parent c3d51357a8
commit bd8b2d37c0
2 changed files with 10 additions and 1 deletions

View File

@@ -704,6 +704,15 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
p.example = example;
}
@Override
public String toExampleValue(Property p) {
if(p.getExample() != null) {
return escapeText(p.getExample().toString());
} else {
return super.toExampleValue(p);
}
}
@Override
public String getSwaggerType(Property p) {
String swaggerType = super.getSwaggerType(p);