question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you specify controller descriptions?

See original GitHub issue

I have a .NET Core web API written in C# and I have been unable to get NSwag to include descriptions for the controllers. I have tried a DescriptionAttribute and a standard <summary> comment. My actions and parameters are being properly documented, including description (summary) and remarks.

Also, I see from the documentation that there’s a recommendation to set IsAspNetCore to true. Where/how do you set that value and is it a current requirement? I’m not sure what the implications are of the “reflection based generator eventually being deprecated” - does that mean that I need to change my approach to controller documentation somehow?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
RicoSutercommented, Dec 21, 2018

But what I’m lacking are descriptions on the actual controllers themselves.

The controller descriptions cannot be preserved because “controllers” is not a concept of Swagger and only internally generated/grouped by NSwag… We’d need to enhance the spec with custom data with controller info etc.

2reactions
drullocommented, Dec 6, 2018

@RSuter , I do have xml doc output enabled in the project. Without it, I wasn’t getting any summary/parameter documentation at all. It is enabled and it is working for controller actions. But what I’m lacking are descriptions on the actual controllers themselves.

For clarification of what I’m looking for, the demo at http://petstore.swagger.io includes descriptions on each of the 3 controllers, as well as additional information displayed on the right.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating controller descriptions for APPC connections
A controller description defines the adjacent systems in the network. To create controller descriptions, follow these steps. Type one of these commands on...
Read more >
How to attach a description to each ActionMethod ...
So recently, I came up with a way to dynamically build a nav-bar menu where the Controller (And its Index ActionMethod) would be...
Read more >
How do you specify controller descriptions? · Issue #1803
I have a .NET Core web API written in C# and I have been unable to get NSwag to include descriptions for the...
Read more >
Controller Job Description Template
As the leader of the accounting team, a financial controller is in charge of closely monitoring a company's financial health. They typically maintain,...
Read more >
Creating a Controller Profile
Select a Controller Type of PNP SERVER from the dropdown list. Then click Next. Specify a name, and optionally a description for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found