https://github.com/toolsfactory/toolsfactory.common.minimalapi
A small helper library to make MinimalApi development smoother
https://github.com/toolsfactory/toolsfactory.common.minimalapi
Last synced: 5 months ago
JSON representation
A small helper library to make MinimalApi development smoother
- Host: GitHub
- URL: https://github.com/toolsfactory/toolsfactory.common.minimalapi
- Owner: toolsfactory
- License: lgpl-2.1
- Created: 2025-05-16T15:14:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-16T15:32:43.000Z (about 1 year ago)
- Last Synced: 2025-11-27T12:41:42.550Z (7 months ago)
- Language: C#
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Toolsfactory.Common.MinimalApi
This project provides a collection of helper classes and extensions for developing Minimal APIs with .NET 9.
## Features
- Base classes and interfaces for defining endpoints
- Extension methods for `IServiceCollection` and `IEndpointRouteBuilder`
- Support for modular and structured API development
## Usage
Example for registering and defining endpoints:
```csharp
// In Program.cs
builder.Services.AddEndpointDefinitions(typeof(Program).Assembly);
app.UseEndpointDefinitions();
```
```csharp
// In an endpoint definition class
public class MyEndpointDefinition : EndpointDefinition
{
public override void DefineEndpoints(IEndpointRouteBuilder app)
{
app.MapGet("/hello", () => "Hello World!");
}
}
```