RicoSuter/NSwag

Controller Code does not compile .NET Core 2.1 / ASP.NET Core 2.1.1

Open

#1,564 opened on Aug 29, 2018

View on GitHub
 (3 comments) (1 reaction) (0 assignees)C# (1,189 forks)batch import
help wantedproject: NSwag.CodeGeneration.CSharp (Controllers)type: enhancement

Repository metrics

Stars
 (6,291 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hello,

There is several issues in compiling Controller code for .NET Core 2.1 / ASP.NET Core 2.1.1 - I cannot compile the code. Is it my mistake?

  • Microsoft.AspNetCore.Mvc.RoutePrefix attribute does not exist
  • (Check "Generate optional parameters" + Check "Add cancellation token"): optional parameters cannot be specified like that before the mandatory cancellation token
  • (Check "Wrap success responses to allow full response access"): Request.CreateResponse (no overload takes 2 arguments)

Best wishes!

Contributor guide