1
resposta

Erro ao executar endpoint http://localhost:6000/swagger/v1/swagger.json

fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. System.NotSupportedException: HTTP method "GET" & path "api/v{version}/Livros" overloaded by actions - Alura.WebAPI.WebApp.Api.LivrosController.ListaDeLivros (Alura.WebAPI.Api),Alura.WebAPI.WebApp.Api.Livros2Controller.ListaDeLivros (Alura.WebAPI.Api). Actions require unique method/path combination for Swagger 2.0. Use ConflictingActionsResolver as a workaround at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreatePathItem(IEnumerable1 apiDescriptions, ISchemaRegistry schemaRegistry) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreatePathItems(IEnumerable1 apiDescriptions, ISchemaRegistry schemaRegistry) at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath, String[] schemes) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 354.685ms 500 text/html; charset=utf-8

1 resposta

Matheus, boa tarde.

Coloca aqui o código da sua classe Startup, por favor.

Fico no aguardo.