Skip to content

Fix scalatra on Windows#16395

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
martin-mfg:scalatra-windows
Aug 25, 2023
Merged

Fix scalatra on Windows#16395
wing328 merged 1 commit intoOpenAPITools:masterfrom
martin-mfg:scalatra-windows

Conversation

@martin-mfg
Copy link
Copy Markdown
Contributor

Using the scalatra generator on Windows crashes OpenAPI Generator with java.lang.IllegalArgumentException: character to be escaped is missing. This PR fixes that.

File.separator returns a single backslash on Windows, which is not a valid value for replaceAll.

To guard against similar problems, I could add a unit test that simply invokes each existing generator on a small input spec. Just to ensure the generator runs without crashes. This would then automatically be checked by the windows workflow (and others as well).
Let me know if that would be helpful.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • File the PR against the correct branch: master (6.3.0) (minor release - breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
    @clasnake (2017/07), @jimschubert (2017/09) ❤️, @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) @Fish86 (2023/06)

@wing328
Copy link
Copy Markdown
Member

wing328 commented Aug 25, 2023

Let me know if that would be helpful.

yup that would be helpful to cover the issue on Windows moving forward.

@wing328 wing328 changed the title fix scalatra on Windows Fix scalatra on Windows Aug 25, 2023
@wing328 wing328 added this to the 7.0.0 milestone Aug 25, 2023
@wing328 wing328 merged commit ad7ce7c into OpenAPITools:master Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants