Skip to content

Commit 8e15259

Browse files
authored
Merge pull request swagger-api#12038 from swagger-api/issue-9509
escape regex string format
2 parents 7a50501 + a3757dd commit 8e15259

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3333,7 +3333,7 @@ private void addVars(CodegenModel m, List<CodegenProperty> vars, Map<String, Pro
33333333
Model model = allDefinitions.get(refProperty.getSimpleRef());
33343334
if (model instanceof ModelImpl) {
33353335
ModelImpl modelImpl = (ModelImpl) model;
3336-
cp.pattern = modelImpl.getPattern();
3336+
cp.pattern = toRegularExpression(modelImpl.getPattern());
33373337
cp.minLength = modelImpl.getMinLength();
33383338
cp.maxLength = modelImpl.getMaxLength();
33393339
}

0 commit comments

Comments
 (0)