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 java compile error due to ambiguous Object reference #647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidgiga1993
Copy link

@HugoMario
Copy link
Contributor

hello @davidgiga1993, i checked the issue you reported, but i'm not sure this is the best approach for your issue fixing.

Other schemas, no named Object, will have this import.

There are a couple of propose in mind and would like to know what you think about it.

  1. Rename a schema named Object to ModelObject. I mean to make the rename in output code not editing the document definition. This could be done including Object as a reserved word.
  2. Update code and templates to call your schema named Object but it's full name, this is: package.name.Object

@davidgiga1993
Copy link
Author

davidgiga1993 commented Apr 15, 2020

Hi,
yes I initally thought this was a general issue unitl I noticed it's caused by Object being in the schema itself. So this solution is not a good fit at all in that case.

The first solution seems to be the best as it could also easily used for other reserved keywords of the target languages. Also it reduces confusion as you directly see which type is used.

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.

3 participants