Skip to content

Commit a9b53c0

Browse files
committed
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`.
1 parent 91494d5 commit a9b53c0

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

MinimalHelpers.slnx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<Solution>
2-
<Folder Name="/OpenApi/">
3-
<Project Path="src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj" />
4-
</Folder>
5-
<Folder Name="/Routing/">
6-
<Project Path="src/MinimalHelpers.Routing.Analyzers/MinimalHelpers.Routing.Analyzers.csproj" />
7-
<Project Path="src/MinimalHelpers.Routing/MinimalHelpers.Routing.csproj" />
8-
</Folder>
9-
<Folder Name="/Samples/">
2+
<Folder Name="/samples/">
103
<Project Path="samples/MinimalSample/MinimalSample.csproj" />
114
</Folder>
125
<Folder Name="/Solution Items/">
136
<File Path=".editorconfig" />
147
<File Path=".github/copilot-instructions.md" />
158
<File Path="src/Directory.Build.props" />
169
</Folder>
17-
<Folder Name="/Validation/">
10+
<Folder Name="/src/" />
11+
<Folder Name="/src/OpenApi/">
12+
<Project Path="src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj" />
13+
</Folder>
14+
<Folder Name="/src/Routing/">
15+
<Project Path="src/MinimalHelpers.Routing.Analyzers/MinimalHelpers.Routing.Analyzers.csproj" />
16+
<Project Path="src/MinimalHelpers.Routing/MinimalHelpers.Routing.csproj" />
17+
</Folder>
18+
<Folder Name="/src/Validation/">
1819
<Project Path="src/MinimalHelpers.FluentValidation/MinimalHelpers.FluentValidation.csproj" />
1920
<Project Path="src/MinimalHelpers.Validation.Abstractions/MinimalHelpers.Validation.Abstractions.csproj" />
2021
<Project Path="src/MinimalHelpers.Validation/MinimalHelpers.Validation.csproj" />

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@ A collection of helper libraries for Minimal API projects.
1010
[![Nuget](https://img.shields.io/nuget/v/MinimalHelpers.Routing)](https://www.nuget.org/packages/MinimalHelpers.Routing)
1111
[![Nuget](https://img.shields.io/nuget/dt/MinimalHelpers.Routing)](https://www.nuget.org/packages/MinimalHelpers.Routing)
1212

13-
A library that provides Routing helpers for Minimal API projects for automatic endpoints registration using Reflection.
14-
13+
A library that provides routing helpers for Minimal API projects, enabling automatic endpoint registration using reflection.
1514
### Installation
1615

17-
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**:
16+
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**:
1817

1918
```shell
2019
dotnet add package MinimalHelpers.Routing
2120
```
2221

2322
### Usage
2423

25-
Create a class to hold your route handlers registration and have it implement the `IEndpointRouteHandlerBuilder` interface:
24+
Create a class to hold your route handler registrations and have it implement the `IEndpointRouteHandlerBuilder` interface:
2625

2726
```csharp
2827
public class PeopleEndpoints : MinimalHelpers.Routing.IEndpointRouteHandlerBuilder
@@ -40,7 +39,7 @@ public class PeopleEndpoints : MinimalHelpers.Routing.IEndpointRouteHandlerBuild
4039
}
4140
```
4241

43-
Call the `MapEndpoints()` extension method on the **WebApplication** object inside *Program.cs* before invoking the `Run()` method:
42+
Call the `MapEndpoints()` extension method on the **WebApplication** object in *Program.cs* before invoking the `Run()` method:
4443

4544
```csharp
4645
// using MinimalHelpers.Routing;
@@ -80,15 +79,15 @@ A library that provides a Source Generator for automatic endpoints registration
8079

8180
### Installation
8281

83-
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**:
82+
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**:
8483

8584
```shell
8685
dotnet add package MinimalHelpers.Routing.Analyzers
8786
```
8887

8988
### Usage
9089

91-
Create a class to hold your route handlers registration and have it implement the `IEndpointRouteHandlerBuilder` interface:
90+
Create a class to hold your route handler registrations and have it implement the `IEndpointRouteHandlerBuilder` interface:
9291

9392
```csharp
9493
public class PeopleEndpoints : IEndpointRouteHandlerBuilder
@@ -109,7 +108,7 @@ public class PeopleEndpoints : IEndpointRouteHandlerBuilder
109108
> **Note**
110109
You only need to use the **MinimalHelpers.Routing.Analyzers** package. With this Source Generator, the `IEndpointRouteHandlerBuilder` interface is auto-generated.
111110

112-
Call the `MapEndpoints()` extension method on the **WebApplication** object inside *Program.cs* before the `Run()` method invocation:
111+
Call the `MapEndpoints()` extension method on the **WebApplication** object in *Program.cs* before the `Run()` method invocation:
113112

114113
```csharp
115114
app.MapEndpoints();
@@ -129,7 +128,7 @@ A library that provides OpenAPI helpers for Minimal API projects.
129128

130129
### Installation
131130

132-
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**:
131+
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**:
133132

134133
```shell
135134
dotnet add package MinimalHelpers.OpenApi
@@ -139,7 +138,7 @@ dotnet add package MinimalHelpers.OpenApi
139138

140139
***Extension methods for OpenApi***
141140

142-
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:
141+
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:
143142

144143
```csharp
145144
endpoints.MapPost("login", LoginAsync)
@@ -174,7 +173,7 @@ endpoints.MapPost("login", LoginAsync)
174173
.ProducesProblem(StatusCodes.Status404NotFound);
175174
```
176175

177-
To avoid multiple calls to `ProducesProblem`, use the `ProducesDefaultProblem` extension method provided by the library::
176+
To avoid multiple calls to `ProducesProblem`, use the `ProducesDefaultProblem` extension method provided by the library:
178177

179178
```csharp
180179
endpoints.MapGet("/api/people/{id:guid}", Get)
@@ -187,11 +186,11 @@ endpoints.MapGet("/api/people/{id:guid}", Get)
187186
[![Nuget](https://img.shields.io/nuget/v/MinimalHelpers.Validation)](https://www.nuget.org/packages/MinimalHelpers.Validation)
188187
[![Nuget](https://img.shields.io/nuget/dt/MinimalHelpers.Validation)](https://www.nuget.org/packages/MinimalHelpers.Validation)
189188

190-
A library that provides an Endpoint filter for Minimal API projects to perform validation with Data Annotations, using the <a href="https://github.com/DamianEdwards/MiniValidation">MiniValidation</a> library.
189+
A library that provides an endpoint filter for Minimal API projects to perform validation using Data Annotations and the <a href="https://github.com/DamianEdwards/MiniValidation">MiniValidation</a> library.
191190

192191
### Installation
193192

194-
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**:
193+
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**:
195194

196195
```shell
197196
dotnet add package MinimalHelpers.Validation
@@ -274,11 +273,11 @@ You can use the `ValidationErrorTitleMessageFactory`, for example, if you want t
274273
[![Nuget](https://img.shields.io/nuget/v/MinimalHelpers.FluentValidation)](https://www.nuget.org/packages/MinimalHelpers.FluentValidation)
275274
[![Nuget](https://img.shields.io/nuget/dt/MinimalHelpers.FluentValidation)](https://www.nuget.org/packages/MinimalHelpers.FluentValidation)
276275

277-
A library that provides an Endpoint filter for Minimal API projects to perform validation using <a href="https://fluentvalidation.net">FluentValidation</a>.
276+
A library that provides an endpoint filter for Minimal API projects to perform validation using <a href="https://fluentvalidation.net">FluentValidation</a>.
278277

279278
### Installation
280279

281-
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**:
280+
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**:
282281

283282
```shell
284283
dotnet add package MinimalHelpers.FluentValidation
@@ -367,4 +366,4 @@ You can use the `ValidationErrorTitleMessageFactory`, for example, if you want t
367366

368367
**Contributing**
369368

370-
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.
369+
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.

samples/MinimalSample/MinimalSample.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<ItemGroup>
1010
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="12.0.0" />
11-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.8" />
11+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.9" />
1212
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="9.0.4" />
13-
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.1.4" />
13+
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.1.6" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

src/MinimalHelpers.OpenApi/MinimalHelpers.OpenApi.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
</ItemGroup>
3131

3232
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
33-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.19" />
33+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.20" />
3434
</ItemGroup>
3535

3636
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
37-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.8" />
37+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.9" />
3838
</ItemGroup>
3939

4040
<ItemGroup>

0 commit comments

Comments
 (0)