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

Provide flag for generating raw models #1786

Open
kf-envrs opened this issue Jul 31, 2023 · 2 comments
Open

Provide flag for generating raw models #1786

kf-envrs opened this issue Jul 31, 2023 · 2 comments
Labels
enhancement Functionality that has never existed in guardrail help wanted Easy to moderately difficult issues that don't require deep knowledge or architectural thought scala Broadly concerning Scala code generation or the generated Scala code

Comments

@kf-envrs
Copy link

Hi we would like to use generator for models, but we use zio-json instead of circe. Would be possible to add flag, which would disable generating circe codecs and instead only raw classes would be provided? I am willing to make PR myself if @blast-hardcheese would provide some basic hints :) Thank you

@blast-hardcheese
Copy link
Member

I'm happy to help! Please pardon the delay in response, I'm road tripping in Italy for the next couple of weeks, without a laptop.

The most correct way to accomplish this would be to decompose the circe model generator into a "raw" case class generator and publish that as a new module that can be selected, I don't know what a good name that would show up in the modules list would be though.

The reason this is a good solution is it pushes complication to the module boundary, and paves the way for zio-json or any other module that meets expectations of the consuming module (tight coupling to circe in http4s, for example, would require care if attempting to swap it out)

If you open a PR with just the module addition, I can probably do a release of that module from my phone, which may get you unblocked.

Let me know if I can help further, I've got notifications on 😊

@blast-hardcheese
Copy link
Member

OK, this should now be much easier, as well as be relevant to #1615.

@blast-hardcheese blast-hardcheese added enhancement Functionality that has never existed in guardrail help wanted Easy to moderately difficult issues that don't require deep knowledge or architectural thought scala Broadly concerning Scala code generation or the generated Scala code labels Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Functionality that has never existed in guardrail help wanted Easy to moderately difficult issues that don't require deep knowledge or architectural thought scala Broadly concerning Scala code generation or the generated Scala code
Projects
None yet
Development

No branches or pull requests

2 participants