I updated the Api.Server.Module to include a ShowSwaggerUI procedure and call that procedure from the XDataMusicServer.StartServers after the servers have been created and started. I enabled the jwt Auth for the SwaggerUI.
After the browser window is opened I receive a 401 Unauthorized on Get in the console window and an "Unauthorized" displayed in the browser window. What am I missing?
If you have protected your API with JWT middleware to prevent anonymous (unauthorized) access, then the SwaggerUI endpoint will also be protected. You can only access it by authenticating with a token.
If you want to allow anonymous access in specific endpoints, you can use the OnForbidRequest event and set the Forbid parameter to False for the SwaggerUI endpoint.