Skip to content

Commit 2304584

Browse files
authored
Docs (#37)
* - some clarification * - copy changes to route groups document
1 parent 2dfda46 commit 2304584

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
[![Nuget](https://img.shields.io/nuget/dt/ModEndpoints)](https://www.nuget.org/packages/ModEndpoints/)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/modabas/ModEndpoints/blob/main/LICENSE.txt)
66

7-
**ModEndpoints** provides a structured approach to organizing ASP.NET Core Minimal APIs using the REPR (Request - Endpoint - Response) pattern. It enhances the Minimal API paradigm by introducing reusable, testable, and consistent components for request validation, handling, and response mapping.
7+
**ModEndpoints** provides various base endpoint types to organize ASP.NET Core Minimal APIs in the REPR (Request - Endpoint - Response) pattern. It shapes Minimal APIs into components encapsulating configuration, automatic request validation, request handling, and, depending on endpoint type, response mapping.
88

99
---
1010

1111
## ✨ Features
1212

1313
- **REPR Pattern Implementation**: Organizes Minimal APIs into Request, Endpoint and Response components.
14-
- **Seamless Integration**: Fully compatible with ASP.NET Core Minimal APIs, supporting configurations, parameter binding, authentication, OpenAPI tooling, filters, and more.
15-
- **Auto-Discovery and Registration**: Automatically discovers and registers endpoints.
14+
- **Seamless Integration**: Fully compatible with ASP.NET Core Minimal APIs, supporting configurations, parameter binding, authentication, OpenAPI tooling, endpoint filters, route groups, etc.
15+
- **Auto-Discovery and Registration**: Automatically discovers and registers endpoints and route groups.
1616
- **FluentValidation Support**: Built-in validation using FluentValidation; requests are automatically validated if a validator is registered.
17-
- **Dependency Injection**: Supports constructor-based dependency injection in endpoint implementations.
18-
- **Type-Safe Responses**: Enforces response model type safety in request handlers.
17+
- **Dependency Injection**: Supports constructor-based dependency injection in endpoint implementation types.
18+
- **Type-Safe Responses**: Provides response type safety in request handlers.
1919

2020
---
2121

@@ -24,7 +24,7 @@
2424
### MinimalEndpoint
2525

2626
- **Purpose**: Enables full flexibility and capability of Minimal APIs within a structured approach.
27-
- **Usage**: Suitable for implementing any Minimal API endpoint, from simple to complex scenarios, while benefiting from clear separation of concerns and all features available to Minimal APIs.
27+
- **Usage**: Suitable for implementing any Minimal API in endpoint format, from simple to complex scenarios.
2828
- **Package**: `ModEndpoints.Core`
2929

3030
### WebResultEndpoint
@@ -41,8 +41,8 @@
4141

4242
### ServiceEndpoint
4343

44-
- **Purpose**: Designed for simplifying remote service consumption with strongly typed request and response models.
45-
- **Usage**: Works in conjunction with the `ModEndpoints.RemoteServices` package to abstract HTTP plumbing on the client side.
44+
- **Purpose**: Designed for simplifying remote service consumption only with knowledge of remote service base address and request model.
45+
- **Usage**: Works in conjunction with the `ModEndpoints.RemoteServices` package on client side to abstract HTTP plumbing while calling remote ServiceEndpoints.
4646
- **Package**: `ModEndpoints`
4747

4848
> **Note**: For detailed information on each endpoint type, refer to the [Endpoint Types](./docs/EndpointTypes.md) documentation.
@@ -53,11 +53,11 @@
5353

5454
Each endpoint must implement two virtual methods:
5555

56-
1. **Configure**: Invoked during application startup to define the route and HTTP method for an endpoint. It begins with calling input parameter `builder`'s methods like `MapGet`, `MapPost`, etc., to specify the route pattern. The returned `RouteHandlerBuilder` from the Map[HttpVerb] method can then be used for further endpoint customization.
56+
1. **Configure**: Invoked during application startup to define the route and HTTP method along with any additional configuration endpoint requires. It begins with calling input parameter `builder`'s methods like `MapGet`, `MapPost`, etc., to specify the route pattern. The returned `RouteHandlerBuilder` from the Map[HttpVerb] method can then be used for further endpoint customization.
5757

5858
2. **HandleAsync**: Contains the logic to handle incoming requests. Called after the request is validated (if applicable).
5959

60-
> **Note**: Dependencies resolved from constructor are not available during configuration. To access a service from dependency injection in the configuration phase, use the `ServiceProvider` property of the configuration context parameter in the `Configure` method.
60+
> **Note**: Dependencies resolved from constructor are not available during configuration. To access a service from dependency injection in the configuration phase, use the `ServiceProvider` property of the configuration context parameter provided to the `Configure` method.
6161
6262
> **Note**: `ServiceEndpoint` provides a default implementation for the `Configure` method, and only requires `HandleAsync` method implementation.
6363

docs/RouteGroups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ By default, all endpoints are mapped under root route group. It is possible to d
88

99
Following sample creates a parent route group (FeaturesRouteGroup), a child route group under it (BooksV1RouteGroup) and maps an endpoint (CreateBook) to child route group. Group configuration methods used for this particular sample are all part of Minimal APIs ecosystem and are under [Asp.Versioning](https://github.com/dotnet/aspnet-api-versioning).
1010

11-
> **Note**: Dependencies resolved from constructor are not available during configuration. To access a service from dependency injection in the configuration phase, use the `ServiceProvider` property of the configuration context parameter in the `Configure` method.
11+
> **Note**: Dependencies resolved from constructor are not available during configuration. To access a service from dependency injection in the configuration phase, use the `ServiceProvider` property of the configuration context parameter provided to the `Configure` method.
1212
1313
```csharp
1414
internal class FeaturesRouteGroup : RouteGroupConfigurator

0 commit comments

Comments
 (0)