-
Notifications
You must be signed in to change notification settings - Fork 200
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
Multi-module maven project doesn't get documented with jackson #317
Comments
So is the problem that you need to add |
Then some documentation was present e.g. the class documentation, but not the field documentation. To be able to view the fields and their documentation I had to add @JsonProperty. |
@stoicflame Sorry for the long post ahead. After further investigation, it seems related to the usage of Lombok's annotations.
1. Excluded sourcesI have another module B that includes module A with the class
From my module B, I have a class annotatated with lombok only and Enunciate would not detect any fields:
2. Sources not excludedThen I remove the previous exclusion from the enunciate-maven-plugin configuration:
This is what I get from Enunciate: That brings me to believe that when Enunciate looks at the source jar that contains my class it won't see the getter and setter provided by lombok thus eliminates the field from the documentation. I think that's fair and I might consider using https://projectlombok.org/features/delombok.html to package a source jar with the getter/setters from lombok. However, I don't understand how in the first case Enunciate was able to get all the fields? 3. Usage of JAXB annotationsNow if I add the class annotations:
and I set TakeawayThe fields will not be present if:
The documentation will not be generated if:
The documentation will be generated if
Possible solution/workaround
|
I found out I could use
|
See Jackson-Annotations. |
@patvong, thanks for the thread and the details. After reading through your observations above, I think you came to the right solution to use |
I have a multi module project and I followed this wiki https://github.com/stoicflame/enunciate/wiki/Multi-Module-Projects to make sure all the source jars are created for each modules.
I noticed that I need to use the @JsonProperty so that Enunciate can pick up the fields/properties of my data type classes.
However, for some reason, if I add this configuration:
Enunciate will pick up all the fields from all modules, but it will not generate the documentation that I added on the class or on the fields/properties.
The text was updated successfully, but these errors were encountered: