Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,17 @@ private void changeParamNames(List<CodegenParameter> paramsList, HashSet<String>
}
}

// The DefaultCodegen.toRegularExpression method returns regex in a format
// that is unsuitable for use in Julia. This method changes the regex to
// a suitable format.
private void changeRegexEscape(List<CodegenParameter> paramsList) {
Comment thread
wing328 marked this conversation as resolved.
Outdated
for (CodegenParameter param : paramsList) {
if (param.pattern != null) {
param.pattern = escapeRegex(param.pattern);
}
}
}

/**
* Convert OAS Operation object to Codegen Operation object
*
Expand Down Expand Up @@ -562,6 +573,13 @@ public CodegenOperation fromOperation(String path,
changeParamNames(op.queryParams, reservedNames);
changeParamNames(op.formParams, reservedNames);

changeRegexEscape(op.allParams);
changeRegexEscape(op.bodyParams);
changeRegexEscape(op.headerParams);
changeRegexEscape(op.pathParams);
changeRegexEscape(op.queryParams);
changeRegexEscape(op.formParams);

return op;
}

Expand Down
Loading