API Documentation isnt working

I am on PowerShell Universal 1.3 msi installer.

Running under HTTPS accessing PU via a cname that matches the cert.
If I go to https://site.domain.com/swagger/index.html
I get an error on the page Not Found /swagger/v1/swagger.json

and in the log

    2020-08-26T11:53:23.6658625+00:00 0HM29KNJQI1QH:00000001 [INF] Request starting HTTP/1.1 GET https://site.domain.com/swagger/index.html   (ca22a1cb)
    2020-08-26T11:53:23.6671854+00:00 0HM29KNJQI1QH:00000001 [INF] Request finished in 1.3151ms 200 text/html;charset=utf-8 (791a596a)
    2020-08-26T11:53:23.8368032+00:00 0HM29KNJQI1QH:00000002 [INF] Request starting HTTP/1.1 GET https://site.domain.com/swagger/v1/swagger.json   (ca22a1cb)
    2020-08-26T11:53:23.8495889+00:00 0HM29KNJQI1QI:00000001 [INF] Request starting HTTP/1.1 GET https://site.domain.com/swagger/favicon-32x32.png   (ca22a1cb)
    2020-08-26T11:53:23.8503073+00:00 0HM29KNJQI1QI:00000001 [INF] Sending file. Request path: '"/favicon-32x32.png"'. Physical path: '"N/A"' (27b0a520)
    2020-08-26T11:53:23.8503685+00:00 0HM29KNJQI1QI:00000001 [INF] Request finished in 0.9521ms 200 image/png (791a596a)
    2020-08-26T11:53:23.9043722+00:00 0HM29KNJQI1QH:00000002 [ERR] An unhandled exception has occurred while executing the request. (48a46595)
    System.NotSupportedException: Ambiguous HTTP method for action - UniversalAutomation.DashboardController.GetComponentOverview (Universal.Server). Actions require an explicit HttpMethod binding for Swagger/OpenAPI 3.0
       at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable`1 apiDescriptions, SchemaRepository schemaRepository)
       at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GeneratePaths(IEnumerable`1 apiDescriptions, SchemaRepository schemaRepository)
       at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath)
       at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
       at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
    2020-08-26T11:53:24.1955682+00:00 0HM29KNJQI1QH:00000002 [ERR] An unhandled exception has occurred while executing the request. (48a46595)
    System.NotSupportedException: Ambiguous HTTP method for action - UniversalAutomation.DashboardController.GetComponentOverview (Universal.Server). Actions require an explicit HttpMethod binding for Swagger/OpenAPI 3.0
       at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable`1 apiDescriptions, SchemaRepository schemaRepository)
       at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GeneratePaths(IEnumerable`1 apiDescriptions, SchemaRepository schemaRepository)
       at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath)
       at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
       at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
    2020-08-26T11:53:24.4081346+00:00 0HM29KNJQI1QH:00000002 [INF] Request finished in 571.3465ms 404  (791a596a)

I see this is working in the 1.3.1 nightly.

1 Like