XML langword elements ignored when generating Swagger descriptions
See original GitHub issueFor this controller action:
[HttpPost]
[Route("{?index}"]
[SwaggerOperation("Action")]
/// <param name="index">The index of the record to store. <see langword="null"/> for the default record.</param>
public async Task<IHttpActionResult> ActionAsync(
[FromUri, Range(0, int.MaxValue)] int? index = null,
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
The Swagger description for the index
parameter will be The index of the record to store. for the default record.
instead of The index of the record to store. null for the default record.
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
XML comments are not shown in Swagger documentation ...
In my case, the XML comments were missing in Swagger because the API itself and the model classes are in different assemblies.
Read more >Generating xml file for swagger is not working as it should
Generating xml file for swagger is not working as it should. What steps will reproduce the issue? Project properties -> Configurations (Debug or...
Read more >Representing XML
OAS 3 This guide is for OpenAPI 3.0. Representing XML. In your API specification, you can describe data in both XML and JSON...
Read more >Adding Swagger to ASP.NET Core Web API using XML ...
Here's the goal of this tutorial: to setup Swagger to use XML comments generated by ASP.NET, and to show a default Swagger UI...
Read more >Using XML Comments As Web API Documentation With ...
This article demonstrage how to use C# XML Comments as a Web API documentation with Swagger.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think we should replace all
<see ... />
tags with the “langword” attribute value… should be easy to implement.Try throwing a
<see langword="null"/>
in there. You’ll see that it will yield a space.It would be nice if it yielded
null
.