-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature. Add Request/Response to API endpoint for flexibility (#28)
- Loading branch information
1 parent
91408ed
commit 641fa89
Showing
15 changed files
with
115 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
namespace Arbus.Network.Demo; | ||
|
||
public record OrdersResponseDto(List<Guid> Orders); | ||
public record OrdersResponseDto(IReadOnlyList<Guid> Orders); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
src/Arbus.Network.UnitTests/Tests/HttpClientContextTests.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | ||
<LangVersion>Latest</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<Authors>ArbusBiz</Authors> | ||
<Description>All the best practices of using the HttpClient in just one library.</Description> | ||
<RepositoryUrl>https://github.com/ArbusBiz/Arbus.Network</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/ArbusBiz/Arbus.Network</PackageProjectUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Text.Json" Version="7.0.0" /> | ||
<PackageReference Include="System.Text.Json" Version="7.0.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> | ||
<Compile Remove="IsExternalInit.cs"/> | ||
<Compile Remove="IsExternalInit.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Using Include="System.Text.Json" /> | ||
</ItemGroup> | ||
|
||
</Project> |
37 changes: 0 additions & 37 deletions
37
src/Arbus.Network/ContentSerializers/DefaultJsonSerializer.cs
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/Arbus.Network/ContentSerializers/JsonContentSerializer.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Text.Encodings.Web; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Arbus.Network; | ||
|
||
public static class GlobalJsonSerializerOptions | ||
{ | ||
public static JsonSerializerOptions Options { get; set; } = GetDefaultSerializerOptions(); | ||
|
||
public static JsonSerializerOptions GetDefaultSerializerOptions() => new() | ||
{ | ||
PropertyNameCaseInsensitive = true, | ||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | ||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase, | ||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping | ||
}; | ||
} |
Oops, something went wrong.