forked from loafle/openapi-generator-original
refactor abstract scala codegen (#7334)
This commit is contained in:
parent
a85162fe33
commit
f7779c545e
@ -211,4 +211,10 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
|
||||
int lastIndexOfDot = input.lastIndexOf(".");
|
||||
return input.substring(lastIndexOfDot + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
return input.replace("\"", "");
|
||||
}
|
||||
}
|
||||
|
@ -235,10 +235,4 @@ public class ScalaClientCodegen extends AbstractScalaCodegen implements CodegenC
|
||||
return formatIdentifier(stripPackageName(property.baseName), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
return input.replace("\"", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -218,12 +218,6 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod
|
||||
return camelizedName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
return input.replace("\"", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessModelsEnum(Map<String, Object> objs) {
|
||||
objs = super.postProcessModelsEnum(objs);
|
||||
|
@ -151,11 +151,4 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg
|
||||
return objs;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
return input.replace("\"", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -235,12 +235,6 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen
|
||||
public abstract String formatFragment(String fragment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
return input.replace("\"", "");
|
||||
}
|
||||
|
||||
private class EnumEntryLambda extends CustomLambda {
|
||||
@Override
|
||||
public String formatFragment(String fragment) {
|
||||
|
@ -1 +1 @@
|
||||
2.3.0
|
||||
2.4.0-SNAPSHOT
|
||||
|
@ -340,6 +340,7 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends
|
||||
val headerParams = new mutable.HashMap[String, String]
|
||||
|
||||
if (status == null) throw new Exception("Missing required parameter 'status' when calling PetApi->findPetsByStatus")
|
||||
|
||||
queryParams += "status" -> status.toString
|
||||
|
||||
val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
|
||||
@ -357,6 +358,7 @@ class PetApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends
|
||||
val headerParams = new mutable.HashMap[String, String]
|
||||
|
||||
if (tags == null) throw new Exception("Missing required parameter 'tags' when calling PetApi->findPetsByTags")
|
||||
|
||||
queryParams += "tags" -> tags.toString
|
||||
|
||||
val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user