From a9b53c065ab52b25d9bd437a0215624a62dc160f Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Wed, 10 Sep 2025 11:51:53 +0200 Subject: [PATCH] Reorganize solution structure and update documentation - Restructured `MinimalHelpers.slnx` to improve project organization by moving `/OpenApi/`, `/Routing/`, and `/Validation/` folders under `/src/` and adding a new `/samples/` folder. - Enhanced clarity and consistency in `README.md` descriptions, including updates to installation instructions and usage examples. - Updated `MinimalSample.csproj` and `MinimalHelpers.OpenApi.csproj` to reference the latest versions of `Microsoft.AspNetCore.OpenApi` and `TinyHelpers.AspNetCore` packages. - Made minor grammatical improvements in `README.md`. --- MinimalHelpers.slnx | 19 ++++++------ README.md | 31 +++++++++---------- samples/MinimalSample/MinimalSample.csproj | 4 +-- .../MinimalHelpers.OpenApi.csproj | 4 +-- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/MinimalHelpers.slnx b/MinimalHelpers.slnx index ed0f760..62f4700 100644 --- a/MinimalHelpers.slnx +++ b/MinimalHelpers.slnx @@ -1,12 +1,5 @@ - - - - - - - - + @@ -14,7 +7,15 @@ - + + + + + + + + + diff --git a/README.md b/README.md index bb39774..071f35f 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,10 @@ A collection of helper libraries for Minimal API projects. [![Nuget](https://img.shields.io/nuget/v/MinimalHelpers.Routing)](https://www.nuget.org/packages/MinimalHelpers.Routing) [![Nuget](https://img.shields.io/nuget/dt/MinimalHelpers.Routing)](https://www.nuget.org/packages/MinimalHelpers.Routing) -A library that provides Routing helpers for Minimal API projects for automatic endpoints registration using Reflection. - +A library that provides routing helpers for Minimal API projects, enabling automatic endpoint registration using reflection. ### Installation -The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.Routing). Just search for *MinimalHelpers.Routing* in the **Package Manager GUI** or run the following command in the **.NET CLI**: +The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.Routing). Search for *MinimalHelpers.Routing* in the **Package Manager GUI** or run the following command in the **.NET CLI**: ```shell dotnet add package MinimalHelpers.Routing @@ -22,7 +21,7 @@ dotnet add package MinimalHelpers.Routing ### Usage -Create a class to hold your route handlers registration and have it implement the `IEndpointRouteHandlerBuilder` interface: +Create a class to hold your route handler registrations and have it implement the `IEndpointRouteHandlerBuilder` interface: ```csharp public class PeopleEndpoints : MinimalHelpers.Routing.IEndpointRouteHandlerBuilder @@ -40,7 +39,7 @@ public class PeopleEndpoints : MinimalHelpers.Routing.IEndpointRouteHandlerBuild } ``` -Call the `MapEndpoints()` extension method on the **WebApplication** object inside *Program.cs* before invoking the `Run()` method: +Call the `MapEndpoints()` extension method on the **WebApplication** object in *Program.cs* before invoking the `Run()` method: ```csharp // using MinimalHelpers.Routing; @@ -80,7 +79,7 @@ A library that provides a Source Generator for automatic endpoints registration ### Installation -The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.Routing.Analyzers). Just search for *MinimalHelpers.Routing* in the **Package Manager GUI** or run the following command in the **.NET CLI**: +The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.Routing.Analyzers). Search for *MinimalHelpers.Routing* in the **Package Manager GUI** or run the following command in the **.NET CLI**: ```shell dotnet add package MinimalHelpers.Routing.Analyzers @@ -88,7 +87,7 @@ dotnet add package MinimalHelpers.Routing.Analyzers ### Usage -Create a class to hold your route handlers registration and have it implement the `IEndpointRouteHandlerBuilder` interface: +Create a class to hold your route handler registrations and have it implement the `IEndpointRouteHandlerBuilder` interface: ```csharp public class PeopleEndpoints : IEndpointRouteHandlerBuilder @@ -109,7 +108,7 @@ public class PeopleEndpoints : IEndpointRouteHandlerBuilder > **Note** You only need to use the **MinimalHelpers.Routing.Analyzers** package. With this Source Generator, the `IEndpointRouteHandlerBuilder` interface is auto-generated. -Call the `MapEndpoints()` extension method on the **WebApplication** object inside *Program.cs* before the `Run()` method invocation: +Call the `MapEndpoints()` extension method on the **WebApplication** object in *Program.cs* before the `Run()` method invocation: ```csharp app.MapEndpoints(); @@ -129,7 +128,7 @@ A library that provides OpenAPI helpers for Minimal API projects. ### Installation -The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.OpenApi). Just search for *MinimalHelpers.OpenApi* in the **Package Manager GUI** or run the following command in the **.NET CLI**: +The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.OpenApi). Search for *MinimalHelpers.OpenApi* in the **Package Manager GUI** or run the following command in the **.NET CLI**: ```shell dotnet add package MinimalHelpers.OpenApi @@ -139,7 +138,7 @@ dotnet add package MinimalHelpers.OpenApi ***Extension methods for OpenApi*** -This library provides several extension methods that simplify the OpenAPI configuration in Minimal API projects. For example, it is possible to customize the description of a response using its status code: +This library provides several extension methods that simplify the OpenAPI configuration in Minimal API projects. For example, you can customize the description of a response using its status code: ```csharp endpoints.MapPost("login", LoginAsync) @@ -174,7 +173,7 @@ endpoints.MapPost("login", LoginAsync) .ProducesProblem(StatusCodes.Status404NotFound); ``` -To avoid multiple calls to `ProducesProblem`, use the `ProducesDefaultProblem` extension method provided by the library:: +To avoid multiple calls to `ProducesProblem`, use the `ProducesDefaultProblem` extension method provided by the library: ```csharp endpoints.MapGet("/api/people/{id:guid}", Get) @@ -187,11 +186,11 @@ endpoints.MapGet("/api/people/{id:guid}", Get) [![Nuget](https://img.shields.io/nuget/v/MinimalHelpers.Validation)](https://www.nuget.org/packages/MinimalHelpers.Validation) [![Nuget](https://img.shields.io/nuget/dt/MinimalHelpers.Validation)](https://www.nuget.org/packages/MinimalHelpers.Validation) -A library that provides an Endpoint filter for Minimal API projects to perform validation with Data Annotations, using the MiniValidation library. +A library that provides an endpoint filter for Minimal API projects to perform validation using Data Annotations and the MiniValidation library. ### Installation -The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.Validation). Just search for *MinimalHelpers.Validation* in the **Package Manager GUI** or run the following command in the **.NET CLI**: +The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.Validation). Search for *MinimalHelpers.Validation* in the **Package Manager GUI** or run the following command in the **.NET CLI**: ```shell dotnet add package MinimalHelpers.Validation @@ -274,11 +273,11 @@ You can use the `ValidationErrorTitleMessageFactory`, for example, if you want t [![Nuget](https://img.shields.io/nuget/v/MinimalHelpers.FluentValidation)](https://www.nuget.org/packages/MinimalHelpers.FluentValidation) [![Nuget](https://img.shields.io/nuget/dt/MinimalHelpers.FluentValidation)](https://www.nuget.org/packages/MinimalHelpers.FluentValidation) -A library that provides an Endpoint filter for Minimal API projects to perform validation using FluentValidation. +A library that provides an endpoint filter for Minimal API projects to perform validation using FluentValidation. ### Installation -The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.FluentValidation). Just search for *MinimalHelpers.FluentValidation* in the **Package Manager GUI** or run the following command in the **.NET CLI**: +The library is available on [NuGet](https://www.nuget.org/packages/MinimalHelpers.FluentValidation). Search for *MinimalHelpers.FluentValidation* in the **Package Manager GUI** or run the following command in the **.NET CLI**: ```shell dotnet add package MinimalHelpers.FluentValidation @@ -367,4 +366,4 @@ You can use the `ValidationErrorTitleMessageFactory`, for example, if you want t **Contributing** -The project is constantly evolving. Contributions are welcome! Please file issues or pull requests in the repository and they will be addressed as soon as possible. +The project is constantly evolving. Contributions are welcome. Feel free to file issues and pull requests in the repository, and we'll address them as we can. \ No newline at end of file diff --git a/samples/MinimalSample/MinimalSample.csproj b/samples/MinimalSample/MinimalSample.csproj index 969f278..3a47f17 100644 --- a/samples/MinimalSample/MinimalSample.csproj +++ b/samples/MinimalSample/MinimalSample.csproj @@ -8,9 +8,9 @@ - + - + diff --git a/src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj b/src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj index 7f6da70..5befa30 100644 --- a/src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj +++ b/src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj @@ -30,11 +30,11 @@ - + - +