RicoSuter/NSwag
Handling Preflight Requests in Generated Controllers in AspNetCore 2.2
Open
#2,086 opened on Apr 4, 2019
help wantedproject: NSwag.CodeGeneration.CSharp (Controllers)
Repository metrics
- Stars
- (7,358 stars)
- PR merge metrics
- (PR metrics pending)
Description
I have a controller class in asp.net core that is generated with nswag studio. The attributes that are autogenerated route for an OPTIONS preflight call. Not sure if I'm doing something wrong in other configuration or if the generated code is incorrect.
[Microsoft.AspNetCore.Mvc.HttpPut, Microsoft.AspNetCore.Mvc.Route("api/resource/{id}")] public System.Threading.Tasks.Task<FileResponse> ApiGeneratedMethod(System.Guid id, [Microsoft.AspNetCore.Mvc.FromBody] Resource resource) { }