Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AutoTask.Psa.Api/AutoTask.Psa.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@
</PackageReference>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Refit" />
<PackageReference Include="Refit.Newtonsoft.Json" />
<PackageReference Include="System.ComponentModel.Annotations" />
</ItemGroup>
<ItemGroup>
<None Remove="Icon.png" />
<None Include="Icon.png" Pack="true" PackagePath="" />
<None Include="..\README.md" Pack="true" PackagePath="" Link="README.md" />
</ItemGroup>
</Project>
</Project>
21 changes: 9 additions & 12 deletions AutoTask.Psa.Api/AutoTaskClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Newtonsoft.Json;

Check warning on line 1 in AutoTask.Psa.Api/AutoTaskClient.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

AutoTask.Psa.Api/AutoTaskClient.cs#L1

File AutoTask.Psa.Api/AutoTaskClient.cs has 619 non-comment lines of code
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using System.Text;

namespace AutoTask.Psa.Api;
Expand Down Expand Up @@ -31,18 +33,13 @@
_httpClient = client;
_refitSettings = new RefitSettings
{
//ContentSerializer = new NewtonsoftJsonContentSerializer(
// new JsonSerializerSettings
// {
// // By default nulls should not be rendered out, this will allow the receiving API to apply any defaults.
// // Use [JsonProperty(NullValueHandling = NullValueHandling.Include)] to send
// // nulls for specific properties, e.g. disassociating port schedule ids from a port
// NullValueHandling = NullValueHandling.Ignore,
// #if DEBUG
// MissingMemberHandling = MissingMemberHandling.Error,
// #endif
// Converters = new List<JsonConverter> { new StringEnumConverter() }
// })
ContentSerializer = new NewtonsoftJsonContentSerializer(
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Formatting = Formatting.Indented,
})
};
ActionTypes = RefitFor(ActionTypes!);
AdditionalInvoiceFieldValues = RefitFor(AdditionalInvoiceFieldValues!);
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.10.85" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Refit" Version="11.0.1" />
<PackageVersion Include="Refit.Newtonsoft.Json" Version="11.0.1" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.15.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="Xunit.Microsoft.DependencyInjection" Version="10.0.4" />
Expand Down