springfox-javadoc icon indicating copy to clipboard operation
springfox-javadoc copied to clipboard

Support "summary" field for ApiOperations

Open metacubed opened this issue 7 years ago • 1 comments

The Swagger 2.0 spec supports two fields on @ApiOperation: "summary" and "notes". In the current implementation, we set only the "notes" using the entire value of the comment.

However, the Javadoc spec also supports a summary and a description. From the Javadoc tech notes:

First Sentence The first sentence of each documentation comment should be a summary sentence that contains a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first block tag. The javadoc command copies this first sentence to the member summary at the top of the HTML page.

Using this spec, we can provide both "summary" and "notes" for @ApiOperation. It can also be used on class docs to specify @Api "tags".

@dilipkrish, do you think this is a good approach? I can help with implementing this if you don't foresee any issues.

metacubed avatar May 15 '18 02:05 metacubed

Hi, I'm one of the original authors of springfox-javadoc. I just had to delete my company account because I no longer work for the company. This is my private account. This sounds like a good idea to me. I'd say go ahead and submit a pull request.

neumaennl avatar May 31 '18 08:05 neumaennl