mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.6K
active users

#minimalapis

1 post1 participant0 posts today

Kind of sad that the linked issue, about being able to tailor a nice 400 response with actionable information for the API client, doesn't seem to even come close to be a priority.

Does nobody care about providing information about what went wrong when handling an API request? I'd think this should be a must from the get go, but given its complete absence from the framework and lack of folks asking for it, maybe I'm the minority here.

#DotNet #CSharp #MinimalApis

github.com/dotnet/aspnetcore/i

Hi. When trying to migrate some existing endpoints to minimal apis, I discovered that is not as easy as in controllers to change the behaviour of a binding error (and I wanted to return the same re...
GitHub[Question] Is there a way to properly emulate InvalidModelStateResponseFactory in minimal apis? · Issue #57337 · dotnet/aspnetcoreBy michaeltg17

i see how #minimalAPIs are great for "smaller" #services, or if your style is to eschew indirection in favour of clarity.

but, when we start using
#reflection and the #ioc container to register the endpoints, i wonder if it's just re-implementing the controller pattern.

which is fine, i guess, but why not just use
#mvc in #aspnetcore, then? to me this looks more controller-y than extension-methods.

https://www.milanjovanovic.tech/blog/automatically-register-minimal-apis-in-aspnetcore

#dotnet #dev

www.milanjovanovic.tech · Automatically Register Minimal APIs in ASP.NET CoreIn ASP.NET Core applications using Minimal APIs, registering each API endpoint with app.MapGet, app.MapPost, etc. can introduce repetitive code. Today, I'll show you how to automatically register your Minimal APIs with a simple abstraction.