Closed saver-r closed 2 years ago
@saver-r , at the moment XML doc is not supported. I can investigate this feature and come back to you with an answer if I'm going to add the support for comments or not. Stay tuned 😜 And thanks for raising an issues 🙏
@saver-r , I'll try add support for xml comments this week,
@saver-r , just to let you know, I'm working on a new release
@saver-r m I just released a preview version. If no issues will be reported, will publish the newest release.
@saver-r , the newest release has support for xml comments. Check out and please close the thread if all good. Thank you!
Excellent, thank you very much! I tried SignalRSwaggerGen
3.0.0, removed from my hub all [SignalRMethod]
annotations and replaced them by respective XML comments. I left [SignalRHub]
in place on top of Hub class.
Then I replaced
opts.DocumentFilter<SignalRSwaggerGen.SignalRSwaggerGen>(new List<Assembly> { typeof(Hubs.SomeHub).Assembly });
with
opts.AddSignalRSwaggerGen();
I also moved the last invocation to the end of the Swashbuckle options, but, unfortunately, no XML comments are displayed.
[SignalRHub(autoDiscover: AutoDiscover.MethodsAndParams)]
also does not help :-(
@saver-r , you need to enable XML comments in the option of AddSignalRSwaggerGen()
Add the path to XML comments file
This made it work!
opts.AddSignalRSwaggerGen(o => o.UseXmlComments(xmlFiles.ToArray()));
Thank you very much!
Applying SignalRSwaggerGen on the following example
does yield proper
hubs/SomeHub/OpenSession
entry, however, it's missing all XML-Doc. I naively expected auto discovery to make use of XML descriptions. If I explicitly annotate the methodcomments still won't show up in generated OpenAPI docs.
Only if I use explicit annotation arguments
SignalRSwaggerGen will display summary and description, but not the one from the XML.
I added all relevant XML-documentation files to Swagger generator with
and it works with REST-API, so it's not a configuration error.
Is XML-API-doc supported? If yes, how do I enable it? If not, do you plan to support it in the future?