Open knowhoper opened 7 years ago
This problem was solved by ensuring any Name
parameters in the Route
attribute are unique across both controller versions. I had an operation named Add, with a Route Name parameter of Add across both controllers and this was preventing Swagger from functioning.
i.e this
[Route("", Name = nameof(AddAdvertiser))]
changed to this
[Route("", Name = nameof(V1AddAdvertiser))]
I am struggling to get Swagger to document multi-tenanted routes in WebApi.I have used this approach before but never in a self-hosted project. It seems
MultipleApiVersions
is never invoked - when i've added logging code.StatupConfig.cs
Note: This predates WebApiVersioning so I am using a route constraint: