Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gen schema with scala keywords as fields #2839

Merged
merged 5 commits into from
May 13, 2024

Conversation

hochgi
Copy link
Contributor

@hochgi hochgi commented May 12, 2024

I needed to generate schema from an API that contained a field named type, resulting with generated code that looked like:
Screenshot 2024-05-12 at 22 48 18
which obviously won't compile.

I added scalameta dependency, and using that to escape keyword with backticks.

PR has the following commits:

  • adding a failed test
  • fixing code to escape keywords, to make the test pass
  • everything else is just battling build & CI 🤷‍♂️

@hochgi hochgi requested review from jdegoes, vigoo and 987Nabil as code owners May 12, 2024 19:50
hochgi added 3 commits May 13, 2024 09:12
… dependency (only depend on parsers), excluded collections compat, and it now seem to work. Also refactored the code to get rid of a compilation warning
@987Nabil 987Nabil merged commit cc8e0a8 into zio:main May 13, 2024
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants