Skip to content

Commit 8dc82d3

Browse files
Merge branch 'master' into request-meta-tests-boilerplate
2 parents 3605490 + 3cd643a commit 8dc82d3

File tree

1,963 files changed

+43588
-7896
lines changed

Some content is hidden

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

1,963 files changed

+43588
-7896
lines changed

.config/dotnet-tools.json

Lines changed: 5 additions & 5 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.1.4",
6+
"version": "2025.3.0.3",
77
"commands": [
88
"jb"
99
],
@@ -17,25 +17,25 @@
1717
"rollForward": false
1818
},
1919
"dotnet-reportgenerator-globaltool": {
20-
"version": "5.4.7",
20+
"version": "5.5.0",
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
],
3131
"rollForward": false
3232
},
3333
"microsoft.openapi.kiota": {
34-
"version": "1.27.0",
34+
"version": "1.29.0",
3535
"commands": [
3636
"kiota"
3737
],
3838
"rollForward": false
3939
}
4040
}
41-
}
41+
}

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ updates:
2222
# Block major updates of packages that require a matching .NET version.
2323
- dependency-name: "Microsoft.AspNetCore*"
2424
update-types: ["version-update:semver-major"]
25+
- dependency-name: "Microsoft.Extensions*"
26+
update-types: ["version-update:semver-major"]

.github/workflows/build.yml

Lines changed: 46 additions & 25 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:
@@ -38,24 +39,27 @@ jobs:
3839
- name: Tune GitHub-hosted runner network
3940
uses: smorimoto/tune-github-hosted-runner-network@v1
4041
- name: Setup PostgreSQL
41-
uses: ikalnytskyi/action-setup-postgres@v6
42+
uses: ikalnytskyi/action-setup-postgres@v8
4243
with:
4344
username: postgres
4445
password: postgres
4546
- name: Setup .NET
46-
uses: actions/setup-dotnet@v4
47+
uses: actions/setup-dotnet@v5
4748
with:
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@v4
60+
uses: actions/checkout@v6
61+
with:
62+
persist-credentials: false
5963
- name: Restore tools
6064
run: dotnet tool restore
6165
- name: Restore packages
@@ -85,8 +89,8 @@ jobs:
8589
# Get the version suffix from the auto-incrementing build number. For example: '123' => 'master-00123'
8690
$revision = "{0:D5}" -f [convert]::ToInt32($env:GITHUB_RUN_NUMBER, 10)
8791
$branchName = ![string]::IsNullOrEmpty($env:GITHUB_HEAD_REF) ? $env:GITHUB_HEAD_REF : $env:GITHUB_REF_NAME
88-
$safeName = $branchName.Replace('/', '-').Replace('_', '-')
89-
$versionSuffix = "$safeName-$revision"
92+
$safeBranchName = $($branchName -Replace '[^a-zA-Z0-9-]', '-')[0..40] -Join ""
93+
$versionSuffix = "$safeBranchName-$revision"
9094
}
9195
Write-Output "Using version suffix: $versionSuffix"
9296
Write-Output "PACKAGE_VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
@@ -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
@@ -154,21 +160,30 @@ jobs:
154160
- name: Tune GitHub-hosted runner network
155161
uses: smorimoto/tune-github-hosted-runner-network@v1
156162
- name: Setup .NET
157-
uses: actions/setup-dotnet@v4
163+
uses: actions/setup-dotnet@v5
158164
with:
159165
dotnet-version: |
160166
8.0.*
161167
9.0.*
168+
10.0.*
162169
- name: Git checkout
163-
uses: actions/checkout@v4
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"
182+
- name: Upload output to artifacts
183+
uses: actions/upload-artifact@v5
184+
with:
185+
name: InspectCode-${{ matrix.os }}
186+
path: ${{ env.INSPECT_CODE_OUTPUT_PATH }}
172187
- name: Verify outcome
173188
shell: pwsh
174189
run: |
@@ -184,7 +199,7 @@ jobs:
184199
$issueType = $xml.report.IssueTypes.SelectSingleNode("IssueType[@Id='$($_.TypeId)']")
185200
$severity = $_.Severity ?? $issueType.Severity
186201
187-
Write-Output "[$severity] $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
202+
Write-Output "[$severity] ($($_.TargetFramework)) $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
188203
})
189204
})
190205
}
@@ -196,7 +211,7 @@ jobs:
196211
}
197212
198213
cleanup-code:
199-
timeout-minutes: 60
214+
timeout-minutes: 90
200215
strategy:
201216
fail-fast: false
202217
matrix:
@@ -208,19 +223,23 @@ jobs:
208223
- name: Tune GitHub-hosted runner network
209224
uses: smorimoto/tune-github-hosted-runner-network@v1
210225
- name: Setup .NET
211-
uses: actions/setup-dotnet@v4
226+
uses: actions/setup-dotnet@v5
212227
with:
213228
dotnet-version: |
214229
8.0.*
215230
9.0.*
231+
10.0.*
216232
- name: Git checkout
217-
uses: actions/checkout@v4
233+
uses: actions/checkout@v6
218234
with:
235+
persist-credentials: false
219236
fetch-depth: 2
220237
- name: Restore tools
221238
run: dotnet tool restore
222239
- name: Restore packages
223-
run: dotnet restore
240+
run: dotnet restore /p:NuGetAudit=false
241+
- name: Build
242+
run: dotnet build --no-restore --configuration Release /p:RunAnalyzers=false
224243
- name: CleanupCode (on PR diff)
225244
if: ${{ github.event_name == 'pull_request' }}
226245
shell: pwsh
@@ -231,13 +250,15 @@ jobs:
231250
$baseCommitHash = git rev-parse HEAD~1
232251
233252
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
234-
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
235255
- name: CleanupCode (on branch)
236-
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
256+
if: ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
237257
shell: pwsh
238258
run: |
239259
Write-Output 'Running code cleanup on all files.'
240-
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
241262
242263
publish:
243264
timeout-minutes: 60
@@ -256,12 +277,12 @@ jobs:
256277
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
257278
run: |
258279
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'
259-
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
260281
- name: Publish to feedz.io
261282
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
262283
run: |
263284
dotnet nuget add source --name 'feedz-io' 'https://f.feedz.io/json-api-dotnet/jsonapidotnetcore/nuget/index.json'
264-
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
265286
- name: Publish documentation
266287
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
267288
uses: peaceiris/actions-gh-pages@v4

.github/workflows/codeql.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,26 @@ jobs:
2323
language: [ 'csharp' ]
2424
steps:
2525
- name: Setup .NET
26-
uses: actions/setup-dotnet@v4
26+
uses: actions/setup-dotnet@v5
2727
with:
2828
dotnet-version: |
2929
8.0.*
3030
9.0.*
31+
10.0.*
3132
- name: Git checkout
32-
uses: actions/checkout@v4
33+
uses: actions/checkout@v6
34+
with:
35+
persist-credentials: false
3336
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v3
37+
uses: github/codeql-action/init@v4
3538
with:
3639
languages: ${{ matrix.language }}
3740
- name: Restore .NET tools
3841
run: |
3942
dotnet tool restore
4043
- name: Autobuild
41-
uses: github/codeql-action/autobuild@v3
44+
uses: github/codeql-action/autobuild@v4
4245
- name: Perform CodeQL Analysis
43-
uses: github/codeql-action/analyze@v3
46+
uses: github/codeql-action/analyze@v4
4447
with:
4548
category: "/language:${{matrix.language}}"

.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@v4
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,22 @@ jobs:
2222
checks: write
2323
steps:
2424
- name: Setup .NET
25-
uses: actions/setup-dotnet@v4
25+
uses: actions/setup-dotnet@v5
2626
with:
2727
dotnet-version: |
2828
8.0.*
2929
9.0.*
30+
10.0.*
3031
- name: Git checkout
31-
uses: actions/checkout@v4
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
@@ -47,6 +49,6 @@ jobs:
4749
env:
4850
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
4951
- name: Upload SARIF report
50-
uses: github/codeql-action/upload-sarif@v3
52+
uses: github/codeql-action/upload-sarif@v4
5153
with:
5254
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json

.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

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Violating these terms may lead to a permanent ban.
105105
### 4. Permanent Ban
106106

107107
**Community Impact**: Demonstrating a pattern of violation of community
108-
standards, including sustained inappropriate behavior, harassment of an
108+
standards, including sustained inappropriate behavior, harassment of an
109109
individual, or aggression toward or disparagement of classes of individuals.
110110

111111
**Consequence**: A permanent ban from any sort of public interaction within

0 commit comments

Comments
 (0)