-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Currently the Swagger description and summary of each action is used for all routes, e.g. given an Action named Foo with two routes (one GET and on POST for the usual collection interface) both routes will have the exact same description and summary (Foo->getDescription() and Foo->getSummary()) shown in Swagger.
While there may be some Actions where this makes a lot of sense, at least in the case of generic collections it does not.
My proposal would be to return maps from both these functions:
virtual const char* getDescription() const;
virtual const char* getSummary() const;
would then become
virtual const std::map<qttp::HttpPath, const char*> getDescription() const;
virtual const std::map<qttp::HttpPath, const char*> getSummary() const;
Swagger::initialize() would have to be changed accordingly.
I think this would not be such a big change, but really help with usability of the generated Swagger documentation. I'd be willing to implement this, if you don't see any roadblocks and would accept a pull request.