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
* - update modresults deps to latest
- update readme for ModEndpoints.Core package
* - add support to use different serializers from default service channel implementation
* - decouple ServiceChannel from System.Text.Json
* - bugfix: ServiceChannelSerializer not utilizing null DeserializationOptions
* - make created http request message in service channel customizable via action input parameter
- remove redundant input parameters
* - cleanup code
* - make http request customization delegate awaitable/async with additional cancellation token input
* - default service channel implementation now sends http request with ContentsRead option
- service channel send methods now accept an additional func parameter to process http response message received from remote endpoint and executes that function before deserialization starts
- rename various classes
* - code cleanup
* - update deps to latest
- bump version
MinimalEndpoints is the barebone implementation for organizing ASP.NET Core Minimal Apis in REPR format endpoints. Does not come integrated with a result pattern like endpoints in ModEndpoints project.
3
+
[MinimalEndpoints](#minimalendpoint) are the barebone implementation for organizing ASP.NET Core Minimal Apis in REPR format endpoints. They have built-in input validation and their handler methods may return Minimal Api IResult based, string or T (any other type) response.
4
4
5
5
Also contains core classes for ModEndpoints project.
6
+
7
+
## Key Features
8
+
9
+
- Organizes ASP.NET Core Minimal Apis in REPR pattern endpoints
10
+
- Encapsulates endpoint behaviors like request validation and request handling.
11
+
- Supports anything that Minimal Apis does. Configuration, parameter binding, authentication, Open Api tooling, filters, etc. are all Minimal Apis under the hood.
12
+
- Supports auto discovery and registration.
13
+
- Has built-in validation support with [FluentValidation](https://github.com/FluentValidation/FluentValidation). If a validator is registered for request model, request is automatically validated before being handled.
14
+
- Supports constructor dependency injection in endpoint implementations.
@@ -18,19 +16,19 @@ public interface IServiceChannel
18
16
/// <param name="req">Request to be sent.</param>
19
17
/// <param name="ct">The <see cref="CancellationToken"/> to cancel operation.</param>
20
18
/// <param name="endpointUriPrefix">Path to append as prefix to resolved enpoint uri. Usually used to add path segments to configured client's base address.</param>
21
-
/// <param name="mediaType">The media type to use for the content.</param>
22
-
/// <param name="jsonSerializerOptions">Options to control the behavior during serialization.</param>
23
-
/// <param name="configureRequestHeaders">Delegate to configure HTTP request headers.</param>
19
+
/// <param name="processHttpRequest">Delegate to further configure created HTTP request message (headers, etc) before sending to ServiceEndpoint.</param>
20
+
/// <param name="processHttpResponse">Delegate to process received HTTP response message of ServiceEndpoint before deserialization.</param>
24
21
/// <param name="uriResolverName"><see cref="IServiceEndpointUriResolver"/> name to be used to resolve ServiceEnpoint Uri.</param>
22
+
/// <param name="serializerName"><see cref="IServiceChannelSerializer"/> name to be used to resolve ServiceEnpoint Uri.</param>
25
23
/// <returns>Response of remote service endpoint or failure result.</returns>
/// <param name="ct">The <see cref="CancellationToken"/> to cancel operation.</param>
43
41
/// <param name="endpointUriPrefix">Path to append as prefix to resolved enpoint uri. Usually used to add path segments to configured client's base address.</param>
44
-
/// <param name="mediaType">The media type to use for the content.</param>
45
-
/// <param name="jsonSerializerOptions">Options to control the behavior during serialization.</param>
46
-
/// <param name="configureRequestHeaders">Delegate to configure HTTP request headers.</param>
42
+
/// <param name="processHttpRequest">Delegate to further configure created HTTP request message (headers, etc) before sending to ServiceEndpoint.</param>
43
+
/// <param name="processHttpResponse">Delegate to process received HTTP response message of ServiceEndpoint before deserialization.</param>
47
44
/// <param name="uriResolverName"><see cref="IServiceEndpointUriResolver"/> name to be used to resolve ServiceEnpoint Uri.</param>
45
+
/// <param name="serializerName"><see cref="IServiceChannelSerializer"/> name to be used to resolve ServiceEnpoint Uri.</param>
48
46
/// <returns>Response of remote service endpoint or failure result.</returns>
0 commit comments