Skip to content

Commit ec52cf7

Browse files
committed
Merge branch 'master' into merge-v5.1-into-openapi
2 parents 1ab58db + 84d01c3 commit ec52cf7

File tree

49 files changed

+146
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+146
-113
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2022.2.3",
6+
"version": "2022.2.4",
77
"commands": [
88
"jb"
99
]
1010
},
1111
"regitlint": {
12-
"version": "6.1.1",
12+
"version": "6.2.1",
1313
"commands": [
1414
"regitlint"
1515
]
@@ -21,7 +21,7 @@
2121
]
2222
},
2323
"dotnet-reportgenerator-globaltool": {
24-
"version": "5.1.3",
24+
"version": "5.1.11",
2525
"commands": [
2626
"reportgenerator"
2727
]

Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function RunCleanupCode {
5151

5252
if ($baseCommitHash -ne $headCommitHash) {
5353
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
54-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
54+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
5555
CheckLastExitCode
5656
}
5757
}

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
23+
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
2424
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.8.2" PrivateAssets="All" />
2525
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
2626
</ItemGroup>
@@ -37,8 +37,8 @@
3737

3838
<!-- Test Project Dependencies -->
3939
<PropertyGroup>
40-
<CoverletVersion>3.1.2</CoverletVersion>
40+
<CoverletVersion>3.2.0</CoverletVersion>
4141
<MoqVersion>4.18.2</MoqVersion>
42-
<TestSdkVersion>17.3.1</TestSdkVersion>
42+
<TestSdkVersion>17.4.0</TestSdkVersion>
4343
</PropertyGroup>
4444
</Project>

appveyor.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ image:
44

55
version: '{build}'
66

7-
stack: postgresql 13.4
7+
stack: postgresql 15
88

99
environment:
1010
PGUSER: postgres
@@ -35,7 +35,10 @@ for:
3535
only:
3636
- image: Visual Studio 2022
3737
services:
38-
- postgresql13
38+
- postgresql15
39+
install:
40+
# Temporary workaround for https://help.appveyor.com/discussions/questions/60488-postgresql-version
41+
- net start postgresql-x64-15
3942
# REF: https://github.com/docascode/docfx-seed/blob/master/appveyor.yml
4043
before_build:
4144
- pwsh: |
@@ -102,7 +105,7 @@ build_script:
102105
103106
Write-Output "PostgreSQL version:"
104107
if ($IsWindows) {
105-
. "${env:ProgramFiles}\PostgreSQL\13\bin\psql" --version
108+
. "${env:ProgramFiles}\PostgreSQL\15\bin\psql" --version
106109
}
107110
else {
108111
psql --version

cleanupcode.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ if ($revision) {
2828

2929
if ($baseCommitHash -eq $headCommitHash) {
3030
Write-Output "Running code cleanup on staged/unstaged files."
31-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified
31+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified
3232
VerifySuccessExitCode
3333
}
3434
else {
3535
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
36-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
36+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
3737
VerifySuccessExitCode
3838
}
3939
}
4040
else {
4141
Write-Output "Running code cleanup on all files."
42-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN
42+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN
4343
VerifySuccessExitCode
4444
}

run-docker-postgres.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ docker run --rm --name jsonapi-dotnet-core-testing `
99
-e POSTGRES_USER=postgres `
1010
-e POSTGRES_PASSWORD=postgres `
1111
-p 5432:5432 `
12-
postgres:13.4
12+
postgres:15

src/Examples/DatabasePerTenantExample/Data/AppDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
3636
private string GetConnectionString()
3737
{
3838
string? tenantName = GetTenantName();
39-
string connectionString = _configuration[$"Data:{tenantName ?? "Default"}Connection"];
39+
string? connectionString = _configuration[$"Data:{tenantName ?? "Default"}Connection"];
4040

4141
if (connectionString == null)
4242
{

src/Examples/NoEntityFrameworkExample/Services/WorkItemService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace NoEntityFrameworkExample.Services;
1111
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
1212
public sealed class WorkItemService : IResourceService<WorkItem, int>
1313
{
14-
private readonly string _connectionString;
14+
private readonly string? _connectionString;
1515

1616
public WorkItemService(IConfiguration configuration)
1717
{
1818
string postgresPassword = Environment.GetEnvironmentVariable("PGPASSWORD") ?? "postgres";
19-
_connectionString = configuration["Data:DefaultConnection"].Replace("###", postgresPassword);
19+
_connectionString = configuration["Data:DefaultConnection"]?.Replace("###", postgresPassword);
2020
}
2121

2222
public async Task<IReadOnlyCollection<WorkItem>> GetAsync(CancellationToken cancellationToken)

src/JsonApiDotNetCore/QueryStrings/Internal/FilterQueryStringParameterReader.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,21 @@ public virtual void Read(string parameterName, StringValues parameterValue)
7777
}
7878
}
7979

80-
private IEnumerable<string> ExtractParameterValue(string parameterValue)
80+
private IEnumerable<string> ExtractParameterValue(string? parameterValue)
8181
{
82-
if (_options.EnableLegacyFilterNotation)
82+
if (parameterValue != null)
8383
{
84-
foreach (string condition in LegacyConverter.ExtractConditions(parameterValue))
84+
if (_options.EnableLegacyFilterNotation)
8585
{
86-
yield return condition;
86+
foreach (string condition in LegacyConverter.ExtractConditions(parameterValue))
87+
{
88+
yield return condition;
89+
}
90+
}
91+
else
92+
{
93+
yield return parameterValue;
8794
}
88-
}
89-
else
90-
{
91-
yield return parameterValue;
9295
}
9396
}
9497

src/JsonApiDotNetCore/QueryStrings/Internal/IncludeQueryStringParameterReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public virtual void Read(string parameterName, StringValues parameterValue)
4848
{
4949
try
5050
{
51-
_includeExpression = GetInclude(parameterValue);
51+
_includeExpression = GetInclude(parameterValue.ToString());
5252
}
5353
catch (QueryParseException exception)
5454
{

0 commit comments

Comments
 (0)