I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think InvalidOperationException coming from with Swagger. I marked
The error is coming from model binding and is not related to Swagger (the presence of ApiExplorerSettings attribute has no impact on error).
You have two complex parameters. i.e. of Complex types
BeverageCapacityCampaign
BeverageCapacity
The default for Model Binding is to bind complex parameters from the body of the request. However, only one parameter per action may be bound from body.
So you need to either
ApiExplorerSettings from System.Web.Http.Description will ignore the attributed action from a help page, or whatever else (maybe swagger)... but you will still get this exception - from problems at level of Model Binding