Cover

Minimal APIs Nuget Packages

April 21, 2024
No Comments.

I’ll make this post pretty quick. I’ve been looking at my Nuget packages and they’re kinda a mess. Not justthe packages, but the naming and branding. To start this annoying process, I’ve decided to move all my NuGet packages that support Minimal APIs to a common GitHub repo and package naming.

MinimalApis.Discovery

This package is to help you organize your Minimal APIs by using a code generator to automate registration of your APIs by implementing an IApi interface. You can read more about it here: Docs.

If you’ve been using my package to organize your Minimal APIs, the name of the package has been changed:

Was: WilderMinds.MinimalApiDiscovery
Now: MinimalApis.Discovery

The old package has been depreciated, and you can install the new package by simply:

> dotnet remove package WilderMinds.MinimalApiDiscovery
> dotnet add package MinimalApis.Discovery

MinimalApis.FluentValidation

The second package in this repository is MinimalApis.FluentValidation. I’m a big fan of how Fluent Validation works, but as I was teaching Minimal APIs - it was tedious to add validation. In .NET 7, Microsoft introduced Endpoint Filters as a good solution. You can read more about how this works at: Docs

This package hasn’t changed name, but has been moved from beta to release. You can update or install this package:

> dotnet add package MinimalApis.FluentValidation

Let me know what you think!