Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 5d15476

Browse files
committed
Fixes the regex pattern used for regex extraction
1 parent aec7e6b commit 5d15476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,7 @@ private String toExampleValueRecursive(String modelName, Schema schema, Object o
18951895
RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56
18961896
So strip off the leading / and trailing / and turn on ignore case if we have it
18971897
*/
1898-
Pattern valueExtractor = Pattern.compile("^/?(.+?)/?(.?)$");
1898+
Pattern valueExtractor = Pattern.compile("^/?(.+?)/?([gim]?)$");
18991899
Matcher m = valueExtractor.matcher(pattern);
19001900
RgxGen rgxGen = null;
19011901
if (m.find()) {

0 commit comments

Comments
 (0)