You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
Have you provided a full/minimal spec to reproduce the issue?
Have you validated the input using an OpenAPI validator (example)?
Have you tested with the latest master to confirm the issue still exists?
Have you searched for related issues/PRs?
What's the actual output vs expected output?
[Optional] Sponsorship to speed up the bug fix or feature request
Description
To determine ModuleLocation, replaceAll is used on File.separator, which is "" on Windows systems. mystring.replaceAll(String.valueOf(File.separatorChar), ".")
replaceAll is expecting a regex to replace, but "" is a reserved character in regex. An error is thrown:
java.util.regex.PatternSyntaxException: Unescaped trailing backslash near index 1
If you just replace all occurrences of .replaceAll(String.valueOf(File.separatorChar) with replace(File.separatorChar, '.'), it will work.
openapi-json-schema-generator version
4.5.1
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Just execute: "test\test1\test2".replaceAll(String.valueOf(File.separatorChar), ".") on Windows
Related issues/PRs
Suggest a fix
Exchange replaceAll with replace
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
To determine ModuleLocation, replaceAll is used on File.separator, which is "" on Windows systems.
mystring.replaceAll(String.valueOf(File.separatorChar), ".")
replaceAll is expecting a regex to replace, but "" is a reserved character in regex. An error is thrown:
java.util.regex.PatternSyntaxException: Unescaped trailing backslash near index 1
If you just replace all occurrences of .replaceAll(String.valueOf(File.separatorChar) with replace(File.separatorChar, '.'), it will work.
openapi-json-schema-generator version
4.5.1
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Just execute: "test\test1\test2".replaceAll(String.valueOf(File.separatorChar), ".") on Windows
Related issues/PRs
Suggest a fix
Exchange replaceAll with replace
The text was updated successfully, but these errors were encountered: