-
Notifications
You must be signed in to change notification settings - Fork 528
Description
Thanks for this great tool. I've been writing about it and playing with it, it's a good time.
I noticed one thing, that there's no way to define operation summary, a property that exists in OpenAPI v3.0 and v3.1 thats essentially a title for the operation.
In the Train Travel API example I show the common convention of short description in summary and longer description in description.
paths:
/stations:
get:
summary: Get a list of train stations
description: Returns a paginated and searchable list of all train stations.
In a recent article I was reviewing a similar tool for Laravel PHP, which uses docblock comments and annotations in the same way.
They take the first line of a doc block as summary, then the rest as description. This works quite nicely and could be added to tsoa by just exploding on an empty line like that.
/**
* Add a word to the list.
*
* This endpoint allows you to add a word to the list.
* It's a really useful endpoint, and you should play around
* with it for a bit.
* <aside class="notice">We mean it; you really should.😕</aside>
*/
public function store(Request $request)
{
//...
}Anyhow I know you got plenty going on and maintening tools like this is hard, but I'm not using this enough to justify sending the pull request. Figured I'd plop the idea here as somebody may want to take it on.