-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Same class different name #1082
Same class different name #1082
Conversation
…eAsClassname setting is on and the subschemas as the same
@@ -1,3 +1,19 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this changes because everytime the build ran they came back, so I thought it would be nice for everyone to not have to exclude these again.
Hi @joelittlejohn, not trying to be pushy, but I was wondering if you had a chance to review this PR? |
Hi Tim. I'm afraid I actually don't see us merging this one into the core of jsonschema2pojo, but thank you for sharing the code with others. We can't support every different idea that people have about the way they would like this plugin to act, because the maintenance burden (and multiplied complexity of all these different options) becomes huge. If you want these various things to be understood as all referencing the same type, then you can use a $ref. This plugin understands that all refs to the same schema should reuse the same type. |
I understand. The reason I did this is because I cannot always control the schema I'm getting but they are essentially the same schema. There are tools out there the remove the |
@joelittlejohn, what would you think about merging the changes to the |
This is a fix for the linked feature request. Please give any feedback on the approach.
The basic concept is when using the config option for useTitleAsClassname, I will cache type objects by a sha key of their schema, then look up potential reuse by that sha key.
#1081