Reputation: 21
I'm trying to generate API documentation for my Web API project using XML comments via Swagger & Swashbuckle. It seems that using the ActionName attribute on an action breaks something somewhere along the line. The action is included in the generated XML and it shows up in the Swagger UI, but there are no details (summary, param, etc) when I click on it. I'm not sure if this is a .NET, Swagger, or Swashbuckle issue.
I've tried with and without the ActionName attribute and it seems to have no impact on the XML that gets generated. The attribute does, however, change the name that is displayed in Swagger. This leads me to believe that it might have something to do with Swagger/Swashbuckle... maybe ApiExplorer?
Upvotes: 0
Views: 1537
Reputation: 21
I've determined this is a bug in Swashbuckle. .NET generates the XML documentation with the actual method name, not the name specified in the ActionName attribute. Therefore, it needs to be handled in the Swashbuckle code. I've entered an issue in GitHub, including a workaround until it is fixed -- https://github.com/domaindrivendev/Swashbuckle/issues/118.
Upvotes: 0