Skip to content

Reflect model/POJO JavaDocs through to Swagger 'description' fields#195

Open
TristanPerry wants to merge 1 commit into
sdaschner:masterfrom
TristanPerry:pojo_model_javadocs_to_swagger_descriptions
Open

Reflect model/POJO JavaDocs through to Swagger 'description' fields#195
TristanPerry wants to merge 1 commit into
sdaschner:masterfrom
TristanPerry:pojo_model_javadocs_to_swagger_descriptions

Conversation

@TristanPerry

Copy link
Copy Markdown

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:

Swagger description example

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 in MemberParameterTag and TypeRepresentation, and then use this in the Swagger SchemaBuilder as appropriate.

…ption' fields, for both the model (class) and its properties (fields).
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.

1 participant