Codit / practical-api-guidelines

Practical guidelines for building & designing APIs with .NET.
MIT License
16 stars 5 forks source link

Health check middleware #82

Open MassimoC opened 5 years ago

MassimoC commented 5 years ago

consider to use the health check middleware (ASPNET core 2.2) https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-2.2

tomkerkhove commented 5 years ago

The idea of this is great but the implementation is not there yet imo.

For example it has no support for OpenAPI so it will not work with gateways

MassimoC commented 5 years ago

Actually in the first simple implementation I've explicitly excluded the Health check controller from the Open API generation ([ApiExplorerSettings(IgnoreApi = true)]) I thought was better to hide all those technical operations ... I don't have a clear opinion on this.

tomkerkhove commented 5 years ago

My vision on this is that it should be include to improve discovery. Restricted access is up to the gateway or app

But it's up to you

MassimoC commented 5 years ago

Add this as guidance on the maturity level2

tomkerkhove commented 4 years ago

I can pick this up if you want