Reputation: 160
I'm trying to create POJOs using jsonSchema.
I've found a project called jsonschema2pojo which seems suitable except for a couple of issues.
I'm willing to fork the project and add some customizations (such as custom annotations and perhaps methods).
The project uses com.sun.codemodel to build the classes.
Since the generated code will go into production, I need to add a copyright statement in the beginning of the file.
I haven't found any solution for it in both jsonschema2pojo or codemodel.
Do you guys have any solution?
Upvotes: 0
Views: 485
Reputation: 11113
Potentially the easiest way to implement this would be to just print the license header every source file (assuming everything written out is Java of course). This can be accomplished by writing the header to the writer here before anything else is written out by JCodeModel. This would require a fork of the library to replace your custom implementation of FileCodeWriterWithEncoding here.
Upvotes: 1