...
- When initially invoking the Swagger url, it reads all XML documentation comments from all public methods representing API endpoints and generates "openapi" specification file (swagger.json)
- This file serves as input for Swagger UI (that means Swagger UI doesn't dynamically reflect current source code but only shows a content of openapi spec. file generated out of current XML comments)
XML Documentation comments
C# documentation comments use XML elements to define the structure of the output documentation. For more details see the following reference : https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags