Closed MarkusG closed 3 months ago
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.
This issue was closed because it has been inactive for 14 days since being marked as stale.
When generating a description file (YAML or JSON), it appears that the Swagger command line tool is writing some extraneous output from the application itself into the description document. This bug only occurs when running the tool from a directory outside of the one containing the project's
csproj
. I noticed this occurring after adding JWT authentication to my web API. ASP.NET logged some information about storing keys locally without encryption, and that log information was written to the API description.Reproduction repository: https://github.com/MarkusG/SwaggerCliRepro
Version: 6.2.3 (globally installed) Steps to reproduce:
dotnet new webapi
)System.IdentityModel.Tokens.Jwt
andMicrosoft.AspNetCore.Authentication.JwtBearer
Program.cs
, as shown in the linked repositorycsproj
. For example,bin
dotnet swagger tofile Debug/net6.0/YourProject.dll v1
(or whatever other path you need, relative to where you navigated to)