mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-17 20:19:07 +00:00
* escape string interpolation notation of Ruby (#2261) * update samples (#2261)
This commit is contained in:
committed by
William Cheng
parent
88abea1755
commit
1d02f0374b
@@ -33,10 +33,10 @@ import java.util.Locale;
|
||||
|
||||
import static org.openapitools.codegen.utils.StringUtils.underscore;
|
||||
|
||||
abstract class AbstractRubyCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
abstract public class AbstractRubyCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractRubyCodegen.class);
|
||||
|
||||
AbstractRubyCodegen() {
|
||||
public AbstractRubyCodegen() {
|
||||
super();
|
||||
|
||||
setReservedWordsLowerCase(
|
||||
@@ -177,7 +177,7 @@ abstract class AbstractRubyCodegen extends DefaultCodegen implements CodegenConf
|
||||
|
||||
@Override
|
||||
public String escapeUnsafeCharacters(String input) {
|
||||
return input.replace("=end", "=_end").replace("=begin", "=_begin");
|
||||
return input.replace("=end", "=_end").replace("=begin", "=_begin").replace("#{", "\\#{");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user