forked from loafle/openapi-generator-original
added bootstrap, renamed sample
This commit is contained in:
@@ -9,6 +9,7 @@ import io.swagger.models.parameters.*;
|
||||
import io.swagger.models.properties.*;
|
||||
import io.swagger.models.properties.PropertyBuilder.PropertyId;
|
||||
import io.swagger.util.Json;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -169,11 +170,7 @@ public class DefaultCodegen {
|
||||
@SuppressWarnings("static-method")
|
||||
public String escapeText(String input) {
|
||||
if (input != null) {
|
||||
String output = input.trim().replaceAll("\n", "\\\\n");
|
||||
output = output.replace("\r", "\\r");
|
||||
output = output.replace("\"", "\\\"");
|
||||
|
||||
return output;
|
||||
return StringEscapeUtils.escapeJava(input).replace("\\/", "/");
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.swagger.models.auth.SecuritySchemeDefinition;
|
||||
import io.swagger.models.parameters.Parameter;
|
||||
import io.swagger.util.Json;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -16,7 +17,6 @@ import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
protected Logger LOGGER = LoggerFactory.getLogger(DefaultGenerator.class);
|
||||
|
||||
Reference in New Issue
Block a user