-
Notifications
You must be signed in to change notification settings - Fork 92
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
Code generation not possible when underscore '_' in package name #338
Comments
can you provide a PR and test other cases as well ? |
Sure. What do you mean with other cases? The other case classes? I can implement it, if you can give me some hints what to check, as I am not familiar with all details in the project. |
I think the main issue would be the Snake CASE because it relies on "_"
…On Thu, Jun 17, 2021 at 9:58 AM Lukas Jelonek ***@***.***> wrote:
Sure. What do you mean with other cases? The other case classes? I can
implement it, if you can give me some hints what to check, as I am not
familiar with all details in the project.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#338 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCTSUXYNBA6EWHWNUGLTTGTJHANCNFSM46V74VCQ>
.
|
I have some questions on the details: What is the used conversion flow?
Depending on the flow it will be harder or easier to implement a solution. Is it required that a conversion into another case and conversion back to the original case results in the identity? What about double underscores in snakecase output? Is that allowed or should it be reduced to a single underscore? What about underscores in KebabCase output? Are they allowed or should they be replaced with
|
I think it can be used in both mode, e.g we have a new SQL template feature that allows the user to customize the case, so he can provide a custom case for mapping to data object |
somehow I can remember this was already discussed a long time ago and somehow it ended up in "will not be implemented" result. However I just wanted to remind that this also is the case with field names. Field names starting with "_" will be just ignored by vertx codegen. which for example in my case means all mongo DB documents need a manual mapping from/to "_id". This kind of defeats the goal of codegen! |
I will update the module package name generation because there is no reason that _ cannot be used for module name |
I already started to implement it, but unfortunately I don't have the time at the moment to finish it (and it's not super important at the moment): lukasjelonek@4fd4219 |
please have a look at the fixes I did, I created a Case instance specific for package names so we allow _ in the package name and we solve this issue |
thanks for your time @lukasjelonek |
…d case we use for data object properties. fixes #338
I'm not sure it will fix this one.
…On Mon, Oct 25, 2021 at 7:51 PM Mohammad Naghavi ***@***.***> wrote:
@vietj <https://github.com/vietj> I found the other issue that I have
created a time ago: #282
<#282>
will this also fix the problem for field names starting with _?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#338 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCSHL77OGGJQB7Z3BYDUIWKLZANCNFSM46V74VCQ>
.
|
Version
4.1.0
Context
I wanted to generate service proxies and got an exception when I have a underscore in my package name, e.g.
com.example.my_app.services
.It causes the following exception:
Do you have a reproducer?
Steps to reproduce
mvn clean compile
Extra
I checked the code and implemented a patch for the
QualifiedCase
-class to handle underscores. As I don't know where this might have side effects, I can't tell if it will solve the problem.See: lukasjelonek@4fd4219
The text was updated successfully, but these errors were encountered: