Skip to content

Commit bf43f39

Browse files
authored
Merge branch 'master' into fix/1056-openapi-capabilities
2 parents 82abcb7 + ae82a95 commit bf43f39

325 files changed

Lines changed: 4837 additions & 3378 deletions

File tree

Some content is hidden

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

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2025.2.4",
6+
"version": "2025.3.1",
77
"commands": [
88
"jb"
99
],
@@ -17,14 +17,14 @@
1717
"rollForward": false
1818
},
1919
"dotnet-reportgenerator-globaltool": {
20-
"version": "5.4.17",
20+
"version": "5.5.1",
2121
"commands": [
2222
"reportgenerator"
2323
],
2424
"rollForward": false
2525
},
2626
"docfx": {
27-
"version": "2.78.2",
27+
"version": "2.78.4",
2828
"commands": [
2929
"docfx"
3030
],

.github/workflows/build.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ concurrency:
2323
env:
2424
DOTNET_NOLOGO: true
2525
DOTNET_CLI_TELEMETRY_OPTOUT: true
26+
SOLUTION_FILE: JsonApiDotNetCore.sln
2627

2728
jobs:
2829
build-and-test:
@@ -48,14 +49,17 @@ jobs:
4849
dotnet-version: |
4950
8.0.*
5051
9.0.*
52+
10.0.*
5153
- name: Show installed versions
5254
shell: pwsh
5355
run: |
5456
Write-Host "$(pwsh --version) is installed at $PSHOME"
5557
psql --version
5658
Write-Host "Active .NET SDK: $(dotnet --version)"
5759
- name: Git checkout
58-
uses: actions/checkout@v5
60+
uses: actions/checkout@v6
61+
with:
62+
persist-credentials: false
5963
- name: Restore tools
6064
run: dotnet tool restore
6165
- name: Restore packages
@@ -100,7 +104,7 @@ jobs:
100104
Logging__LogLevel__Microsoft.Extensions.Hosting.Internal.Host: 'None'
101105
Logging__LogLevel__Microsoft.EntityFrameworkCore.Database.Command: 'None'
102106
Logging__LogLevel__JsonApiDotNetCore: 'None'
103-
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true"
107+
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;annotations-title=@test (@framework);annotations-message=@error\n@trace;summary-include-passed=false"
104108
- name: Upload coverage to codecov.io
105109
if: ${{ matrix.os == 'ubuntu-latest' }}
106110
env:
@@ -113,7 +117,7 @@ jobs:
113117
run: dotnet pack --no-build --configuration Release --output ${{ github.workspace }}/artifacts/packages /p:VersionSuffix=${{ env.PACKAGE_VERSION_SUFFIX }}
114118
- name: Upload packages to artifacts
115119
if: ${{ matrix.os == 'ubuntu-latest' }}
116-
uses: actions/upload-artifact@v4
120+
uses: actions/upload-artifact@v5
117121
with:
118122
name: packages
119123
path: artifacts/packages
@@ -123,20 +127,22 @@ jobs:
123127
# This contains the git tag name on release; in that case, we build the docs without publishing them.
124128
DOCFX_SOURCE_BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
125129
run: |
130+
$ErrorActionPreference = "Stop"
131+
$PSNativeCommandUseErrorActionPreference = $true
126132
cd docs
133+
$zipFile = [IO.Path]::Combine($env:TEMP, 'docfx-net10-binaries.zip')
134+
Invoke-WebRequest -Uri 'https://github.com/json-api-dotnet/docfx/raw/refs/heads/dotnet10-rtm/net10-binaries.zip' -Method 'GET' -OutFile $zipFile
135+
Expand-Archive $zipFile -Force
127136
& ./generate-examples.ps1
128-
dotnet docfx docfx.json --warningsAsErrors true
129-
if ($LastExitCode -ne 0) {
130-
Write-Error "docfx failed with exit code $LastExitCode."
131-
}
137+
dotnet exec docfx-net10-binaries/docfx.dll docfx.json --warningsAsErrors true
132138
Copy-Item CNAME _site/CNAME
133139
Copy-Item home/*.html _site/
134140
Copy-Item home/*.ico _site/
135141
New-Item -Force _site/styles -ItemType Directory | Out-Null
136142
Copy-Item -Recurse home/assets/* _site/styles/
137143
- name: Upload documentation to artifacts
138144
if: ${{ matrix.os == 'ubuntu-latest' }}
139-
uses: actions/upload-artifact@v4
145+
uses: actions/upload-artifact@v5
140146
with:
141147
name: documentation
142148
path: docs/_site
@@ -159,18 +165,22 @@ jobs:
159165
dotnet-version: |
160166
8.0.*
161167
9.0.*
168+
10.0.*
162169
- name: Git checkout
163-
uses: actions/checkout@v5
170+
uses: actions/checkout@v6
171+
with:
172+
persist-credentials: false
164173
- name: Restore tools
165174
run: dotnet tool restore
166175
- name: InspectCode
167176
shell: pwsh
168177
run: |
169178
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
170179
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
171-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --properties:RunAnalyzers=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
180+
dotnet jb inspectcode --version
181+
dotnet jb inspectcode $env:SOLUTION_FILE --build --no-updates --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --settings=WarningSeverities.DotSettings --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;ContinuousIntegrationBuild=false" --severity=WARNING --verbosity=WARN --disable-settings-layers="GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal"
172182
- name: Upload output to artifacts
173-
uses: actions/upload-artifact@v4
183+
uses: actions/upload-artifact@v5
174184
with:
175185
name: InspectCode-${{ matrix.os }}
176186
path: ${{ env.INSPECT_CODE_OUTPUT_PATH }}
@@ -189,7 +199,7 @@ jobs:
189199
$issueType = $xml.report.IssueTypes.SelectSingleNode("IssueType[@Id='$($_.TypeId)']")
190200
$severity = $_.Severity ?? $issueType.Severity
191201
192-
Write-Output "[$severity] $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
202+
Write-Output "[$severity] ($($_.TargetFramework)) $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
193203
})
194204
})
195205
}
@@ -201,7 +211,7 @@ jobs:
201211
}
202212
203213
cleanup-code:
204-
timeout-minutes: 60
214+
timeout-minutes: 90
205215
strategy:
206216
fail-fast: false
207217
matrix:
@@ -218,14 +228,18 @@ jobs:
218228
dotnet-version: |
219229
8.0.*
220230
9.0.*
231+
10.0.*
221232
- name: Git checkout
222-
uses: actions/checkout@v5
233+
uses: actions/checkout@v6
223234
with:
235+
persist-credentials: false
224236
fetch-depth: 2
225237
- name: Restore tools
226238
run: dotnet tool restore
227239
- name: Restore packages
228-
run: dotnet restore
240+
run: dotnet restore /p:NuGetAudit=false
241+
- name: Build
242+
run: dotnet build --no-restore --configuration Release /p:RunAnalyzers=false
229243
- name: CleanupCode (on PR diff)
230244
if: ${{ github.event_name == 'pull_request' }}
231245
shell: pwsh
@@ -236,13 +250,15 @@ jobs:
236250
$baseCommitHash = git rev-parse HEAD~1
237251
238252
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
239-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
253+
dotnet jb cleanupcode --version
254+
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
240255
- name: CleanupCode (on branch)
241256
if: ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
242257
shell: pwsh
243258
run: |
244259
Write-Output 'Running code cleanup on all files.'
245-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN --fail-on-diff --print-diff
260+
dotnet jb cleanupcode --version
261+
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN --fail-on-diff --print-diff
246262
247263
publish:
248264
timeout-minutes: 60
@@ -261,12 +277,12 @@ jobs:
261277
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
262278
run: |
263279
dotnet nuget add source --username 'json-api-dotnet' --password '${{ secrets.GITHUB_TOKEN }}' --store-password-in-clear-text --name 'github' 'https://nuget.pkg.github.com/json-api-dotnet/index.json'
264-
dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'github'
280+
dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'github' --skip-duplicate
265281
- name: Publish to feedz.io
266282
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
267283
run: |
268284
dotnet nuget add source --name 'feedz-io' 'https://f.feedz.io/json-api-dotnet/jsonapidotnetcore/nuget/index.json'
269-
dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.FEEDZ_IO_API_KEY }}' --source 'feedz-io'
285+
dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.FEEDZ_IO_API_KEY }}' --source 'feedz-io' --skip-duplicate
270286
- name: Publish documentation
271287
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
272288
uses: peaceiris/actions-gh-pages@v4

.github/workflows/codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ jobs:
2828
dotnet-version: |
2929
8.0.*
3030
9.0.*
31+
10.0.*
3132
- name: Git checkout
32-
uses: actions/checkout@v5
33+
uses: actions/checkout@v6
34+
with:
35+
persist-credentials: false
3336
- name: Initialize CodeQL
3437
uses: github/codeql-action/init@v4
3538
with:

.github/workflows/deps-review.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ jobs:
88
dependency-review:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: 'Checkout Repository'
12-
uses: actions/checkout@v5
13-
- name: 'Dependency Review'
14-
uses: actions/dependency-review-action@v4
11+
- name: 'Checkout Repository'
12+
uses: actions/checkout@v6
13+
with:
14+
persist-credentials: false
15+
- name: 'Dependency Review'
16+
uses: actions/dependency-review-action@v4

.github/workflows/qodana.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ jobs:
2727
dotnet-version: |
2828
8.0.*
2929
9.0.*
30+
10.0.*
3031
- name: Git checkout
31-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3233
with:
34+
persist-credentials: false
3335
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
3436
fetch-depth: 0 # a full history is required for pull request analysis
3537
- name: Restore tools
3638
run: dotnet tool restore
3739
- name: Restore packages
38-
run: dotnet restore
40+
run: dotnet restore /p:NuGetAudit=false
3941
- name: Build
4042
run: dotnet build --no-restore --configuration Release
4143
- name: Qodana scan

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,3 @@ FodyWeavers.xsd
423423
**/.idea/**/httpRequests/
424424
**/.idea/**/dataSources/
425425
!**/.idea/**/codeStyles/*
426-
427-
# Workaround for https://github.com/microsoft/kiota/issues/4228
428-
kiota-lock.json

Build.ps1

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
function VerifySuccessExitCode {
2-
if ($LastExitCode -ne 0) {
3-
throw "Command failed with exit code $LastExitCode."
4-
}
5-
}
1+
#Requires -Version 7.4
2+
$ErrorActionPreference = "Stop"
3+
$PSNativeCommandUseErrorActionPreference = $true
64

75
Write-Host "$(pwsh --version)"
86
Write-Host ".NET SDK $(dotnet --version)"
@@ -11,16 +9,7 @@ Remove-Item -Recurse -Force artifacts -ErrorAction SilentlyContinue
119
Remove-Item -Recurse -Force * -Include coverage.cobertura.xml
1210

1311
dotnet tool restore
14-
VerifySuccessExitCode
15-
1612
dotnet build --configuration Release
17-
VerifySuccessExitCode
18-
1913
dotnet test --no-build --configuration Release --verbosity quiet --collect:"XPlat Code Coverage"
20-
VerifySuccessExitCode
21-
2214
dotnet reportgenerator -reports:**\coverage.cobertura.xml -targetdir:artifacts\coverage -filefilters:-*.g.cs
23-
VerifySuccessExitCode
24-
2515
dotnet pack --no-build --configuration Release --output artifacts/packages
26-
VerifySuccessExitCode

Directory.Build.props

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@
99
<AnalysisMode>Recommended</AnalysisMode>
1010
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
1111
<RunSettingsFilePath>$(MSBuildThisFileDirectory)tests.runsettings</RunSettingsFilePath>
12-
<VersionPrefix>5.9.2</VersionPrefix>
12+
<VersionPrefix>5.10.1</VersionPrefix>
1313
<VersionSuffix>pre</VersionSuffix>
14-
<OpenApiPreviewNumber>7</OpenApiPreviewNumber>
15-
<NuGetAuditMode>direct</NuGetAuditMode>
14+
<OpenApiPreviewNumber>8</OpenApiPreviewNumber>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<NoWarn>
19+
<!--
20+
Temporary workaround: Stable EF Core 10 package for Pomelo.EntityFrameworkCore.MySql is not available yet.
21+
NU1608: Detected package version outside of dependency constraint
22+
-->
23+
$(NoWarn);NU1608
24+
</NoWarn>
1625
</PropertyGroup>
1726

1827
<PropertyGroup>

Directory.Build.targets

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project>
2+
<Target Name="DisableCompileTimeOpenApiXmlGenerator" BeforeTargets="CoreCompile">
3+
<ItemGroup>
4+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.AspNetCore.OpenApi.SourceGenerators'" />
5+
</ItemGroup>
6+
</Target>
7+
8+
<!-- Workaround for compiler regression at https://github.com/dotnet/roslyn/issues/80756 -->
9+
<Target Name="DisableSlowAnalyzers" Condition="'$(Configuration)' == 'Debug'" BeforeTargets="CoreCompile">
10+
<ItemGroup>
11+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'CSharpGuidelinesAnalyzer'" />
12+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.CSharp.CodeStyle'" />
13+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.NetAnalyzers'" />
14+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.CSharp.NetAnalyzers'" />
15+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'xunit.analyzers'" />
16+
</ItemGroup>
17+
</Target>
18+
</Project>

JetBrainsInspectCodeTransform.xslt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<table style="width:100%">
2525
<tr>
2626
<th>File</th>
27+
<th>Target Framework</th>
2728
<th>Line Number</th>
2829
<th>Type</th>
2930
<th>Message</th>
@@ -33,6 +34,9 @@
3334
<td>
3435
<xsl:value-of select="@File"/>
3536
</td>
37+
<td>
38+
<xsl:value-of select="@TargetFramework"/>
39+
</td>
3640
<td>
3741
<xsl:value-of select="@Line"/>
3842
</td>

0 commit comments

Comments
 (0)