Skip to content

Commit c9fe323

Browse files
committed
- update readme
1 parent 99b1d50 commit c9fe323

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ internal class ListBooks(ServiceDbContext db)
148148

149149
### Parameter binding
150150

151-
Request model defined for an endpoint is bound with [AsParameters] attribute. Any field under request model can be bound from route, query, body, form, etc. with corresponding [From...] attribute (see [Minimal Apis Parameter Binding](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/parameter-binding?view=aspnetcore-8.0) for more information).
151+
Request model defined for an endpoint is bound with [AsParameters] attribute (except for ServiceEndpoints). Any field under request model can be bound from route, query, body, form, etc. with corresponding [From...] attribute (see [Minimal Apis Parameter Binding](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/parameter-binding?view=aspnetcore-8.0) for more information).
152152

153153
The following sample demonstrates route and body parameter binding.
154154

@@ -383,14 +383,15 @@ This is a very specialized endpoint suitable for internal services. A ServiceEnd
383383
- ServiceEndpoint<TRequest>: Has a request model, supports request validation and returns a [Result](https://github.com/modabas/ModResults) within HTTP 200 IResult.
384384

385385
A ServiceEndpoint has following special traits and constraints:
386-
- A ServiceEndpoint is always registered with HttpMethod.Post method, and its bound pattern is determined accourding to its request type.
387-
- A ServiceEndpoint's request must implement either IServiceRequest (for ServiceEndpoint<TRequest>) or IServiceRequest<TResultValue> (for ServiceEndpoint<TRequest, TResultValue>)
386+
- A ServiceEndpoint is always registered as a POST method, and its bound pattern is determined accourding to its request type.
387+
- Request model defined for a ServiceEndpoint is bound with [FromBody] attribute.
388+
- A ServiceEndpoint's request must implement either IServiceRequest (for endpoints implementing ServiceEndpoint<TRequest>) or IServiceRequest<TResultValue> (for endpoints implementing ServiceEndpoint<TRequest, TResultValue>)
388389
- A ServiceEndpoint's request is specific to that endpoint. Each endpoint must have its unique request type.
389390
- To utilize the advantages of a ServiceEndpoint over other endpoint types, its request and response types has to be shared with clients and therefore has to be in a seperate class library.
390391

391392
These enable clients to call ServiceEndpoints by a specialized message channel resolved from dependency injection, which has to be registered at client application startup with only service base address and service request type information. No other knowledge about service or client implementation is required.
392393

393-
Have a look at [sample ServiceEndpoint implementations](https://github.com/modabas/ModEndpoints/tree/main/samples/ShowcaseWebApi/Features/StoresWithServiceEndpoints) along with [sample client implementation](https://github.com/modabas/ModEndpoints/tree/main/samples/Client) and [request/response model shared library](https://github.com/modabas/ModEndpoints/tree/main/samples/ShowcaseWebApi.FeatureContracts).
394+
Have a look at [sample ServiceEndpoint implementations](https://github.com/modabas/ModEndpoints/tree/main/samples/ShowcaseWebApi/Features/StoresWithServiceEndpoint) along with [sample client implementation](https://github.com/modabas/ModEndpoints/tree/main/samples/Client) and [request/response model shared library](https://github.com/modabas/ModEndpoints/tree/main/samples/ShowcaseWebApi.FeatureContracts).
394395

395396
### ServiceEndpoint clients
396397

0 commit comments

Comments
 (0)