...
Adding conditional headers
In order to display required request headers in the Swagger UI (for example "Authorization" header that requires Bearer token to be used for secure calls) we can use [BimAuthenticate] attribute to decorate the API endpoint method.
See implementation here
https://git.allplan. in progresscom/projects/SRVC/repos/api/browse/src/BimPlus.Server.Web/Core/BimAuthenticate.cs
- Here is an example of the attribute usage :
- and here is an example how it looks like in Swagger UI
How to keep Swagger documentation up to date
...