You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,18 @@ The request is processed in 'HandleAsync' method which returns a strongly typed
45
45
46
46
Use AddModEndpointsFromAssembly extension method to register all endpoints defined in an assembly.
47
47
48
+
Optional: Use FluentValidation.DependencyInjectionExtensions package to add FluentValidation validators to dependency injection for request validation.
49
+
48
50
Use MapModEndpoint extension method to map registered endpoints.
49
51
50
52
These methods register and map services required for all endpoint types.
@@ -293,9 +297,9 @@ A ServiceResultEndpoint implementation, after handling request, encapsulates the
293
297
294
298
A WebResultEndpoint implementation, after handling request, maps the [business result](https://github.com/modabas/ModResults) of HandleAsync method to an IResult depending on the result type, state and failure type (if any). Mapping behaviour can be modified or replaced with a custom one.
295
299
296
-
- WebResultEndpoint<TRequest, TResultValue>: Has a request model, supports request validation and returns a response model as body of Minimal Api IResult if successful.
300
+
- WebResultEndpoint<TRequest, TResponse>: Has a request model, supports request validation and returns a response model as body of Minimal Api IResult if successful.
297
301
- WebResultEndpoint<TRequest>: Has a request model, supports request validation, doesn't have a response model to return within Minimal Api IResult.
298
-
- WebResultEndpointWithEmptyRequest<TResultValue>: Doesn't have a request model and returns a response model as body of Minimal Api IResult if successful.
302
+
- WebResultEndpointWithEmptyRequest<TResponse>: Doesn't have a request model and returns a response model as body of Minimal Api IResult if successful.
299
303
- WebResultEndpointWithEmptyRequest: Doesn't have a request model, doesn't have a response model to return within Minimal Api IResult.
300
304
301
305
When result returned from handler method is in Ok state, default WebResultEndpoint response mapping behaviour is:
0 commit comments