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

[generic-extras] proposal Configuration.transformConstructorPrefix #850

Open
scalway opened this issue Mar 2, 2018 · 1 comment
Open

Comments

@scalway
Copy link

scalway commented Mar 2, 2018

Right now it is impossible (as i know) to append package into Constructor name. We have no way to deal with such information.
My proposal is to add one more key:

final case class Configuration(
  transformMemberNames: String => String,
  transformConstructorNames: String => String,
  transformConstructorPrefix: String => String,
  useDefaults: Boolean,
  discriminator: Option[String]
)

By default it'll be s => "".

I assume that we rather cannot change existing code (rename etc.) If we could i'll propose something like this:

final class ConstructorInfo(val name:String, val package:String)
final case class Configuration(
  transformMemberNames: String => String,
  transformConstructorNames: Option[ConstructorInfo => String],
  useDefaults: Boolean,
  discriminator: Option[String]
)

Ps: I can try to implement it if there'll ve green light.

@scalway
Copy link
Author

scalway commented Mar 6, 2018

No one?

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

No branches or pull requests

1 participant