Reflect model/POJO JavaDocs through to Swagger 'description' fields #195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensures that the JavaDocs from the POJOs which represent the JSON models (i.e. the POJOs representing the request and response objects) are captured, so that these can be used in the Swagger model 'description' fields:
I know this sort of thing was discussed in #128, and it does seem like using JavaDocs makes the most sense for this usecase (especially because the JavaDocs within a 'JSON POJO' will be very unlikely to contain anything programmatically important to other developers).
A lot of files were changed here due to implementing a builder pattern instead of doing
TypeRepresentation.ofConcrete
(the alternative would have been quite messy), but the core changes are to capture extra data inMemberParameterTag
andTypeRepresentation
, and then use this in the SwaggerSchemaBuilder
as appropriate.