Skip to content

Commit e54c645

Browse files
committed
fix(crystal): use litteral regex
1 parent aea9ed9 commit e54c645

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273

274274
{{/minimum}}
275275
{{#pattern}}
276-
pattern = Regexp.new({{{pattern}}})
276+
pattern = {{{pattern}}}
277277
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} !~ pattern
278278
raise ArgumentError.new("invalid value for \"{{{name}}}\", must conform to the pattern #{pattern}.")
279279
end

0 commit comments

Comments
 (0)