Skip to content

Commit b2b5ceb

Browse files
committed
escape regex string format
1 parent 83927e1 commit b2b5ceb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3322,7 +3322,7 @@ private void addVars(CodegenModel m, List<CodegenProperty> vars, Map<String, Pro
33223322
Model model = allDefinitions.get(refProperty.getSimpleRef());
33233323
if (model instanceof ModelImpl) {
33243324
ModelImpl modelImpl = (ModelImpl) model;
3325-
cp.pattern = modelImpl.getPattern();
3325+
cp.pattern = toRegularExpression(modelImpl.getPattern());
33263326
cp.minLength = modelImpl.getMinLength();
33273327
cp.maxLength = modelImpl.getMaxLength();
33283328
}

0 commit comments

Comments
 (0)