-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: could I include the controller xml documentation? #4215
Comments
Did you remember to include the documentation in the swagger doc? I don't think this is a NSwag problem. For example, using Swashbuckle: services.AddSwaggerGen(
options =>
{
var filePath = Path.Combine(
AppContext.BaseDirectory,
$"{typeof(Startup).Assembly.GetName().Name}.xml");
options.IncludeXmlComments(filePath);
// ...
}); |
@ovska I do generate the xml documentation file, while find no API to include the xml documentation, |
@WeihanLi - I get the controller documentation in the swagger doc And they are also on the generated client. Are you referring to something else? If so, can you give an example? |
Hi @StingyJack , that's documentation comment from the action method, I can get that also, while I cannot get the controller class documentation comment info |
What would an aspdotnet controller be equivalent to in an Open API Spec json? I dont think there is any place to put just the controller comments unless they were used as the beginning of each method's comments. Do you have an example of what you would expect the result to look like? |
There's a sample supported by Swashbuckle.AspNetCore From the open API definition(https://reservation.weihanli.xyz/swagger/OpenReservation/swagger.json) |
Found this PR that sounds like it was supposed to add support for this. #2949 In the |
Works for me, thank you very much @StingyJack |
Hi there, could we include the controller xml documentation?
I had configured the project file to generate the xml documentation file, while it does not work for the controller documentation
The text was updated successfully, but these errors were encountered: