BasicAuthentication & ApiAuthentication per method in Swagger-Net in .Net MVC 4

62 Views Asked by At

As shown in https://petstore.swagger.io/, apis of the PET controller get authenticated by OAuth2, but that of the STORE controller, gets authenticated by ApiKey.

I want to achieve the same using IOperationFilter in .Net MVC (and not .Net Core).

Though I am able to turn on the BasicAuth for one API, but couldn't turn off the ApiKey Auth for the same. May be I am not able to find the correct documentation of using the tool.

Could someone point me towards the correct documentation please.

Swagger-Net version 8.3.35.101

0

There are 0 best solutions below