Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b06654c
Install .NET 10 in GHA workflows
bkoelman Nov 14, 2025
117bbc6
Update to new R# major version
bkoelman Nov 13, 2025
72c62dd
Change severity of new R# inspections to warning
bkoelman Nov 21, 2025
6de8ade
Resharper: use field keyword
bkoelman Nov 13, 2025
3ff6583
Fix IDE0340: Use unbound generic type
bkoelman Nov 13, 2025
947d606
Add net10.0 to target frameworks
bkoelman Nov 13, 2025
8ae1de7
Update versions, add workaround for missing Pomelo package for EF Cor…
bkoelman Nov 13, 2025
82d14cf
Fix warning CA1873: Evaluation of this argument may be expensive and …
bkoelman Nov 14, 2025
b2105de
Package updates
bkoelman Nov 14, 2025
ffeb932
Remove reference to Microsoft.Extensions.ApiDescription.Client, becau…
bkoelman Nov 14, 2025
7d05468
Review warning suppressions
bkoelman Nov 14, 2025
375f6fb
Use type alias for lock primitive
bkoelman Nov 14, 2025
9bcddca
Update to Swashbuckle v10 and Microsoft.OpenAPI v2 (adds support for …
bkoelman Nov 15, 2025
65b0520
Switch NuGetAuditMode to all, which is the new default in the .NET 10…
bkoelman Nov 19, 2025
131d0f8
Adapt to breaking change in dotnet run
bkoelman Nov 19, 2025
a4346ac
Update and simplify version table
bkoelman Nov 21, 2025
b6b89d1
Perf: turn off the ASP.NET OpenAPI source generator globally
bkoelman Nov 19, 2025
fc695bb
Add workaround for extremely slow builds on .NET 10
bkoelman Nov 21, 2025
6735131
Generate examples in docs against .NET 10
bkoelman Nov 21, 2025
4da013c
Remove kiota workaround
bkoelman Nov 22, 2025
0c151e2
Remove NSwag workaround
bkoelman Nov 22, 2025
13068e8
Remove R# workaround
bkoelman Nov 22, 2025
e0f8af0
Fix incorrect API documentation
bkoelman Nov 22, 2025
66910f1
Cleanup and improve scripts
bkoelman Nov 22, 2025
d582105
Add temporary workaround until docfx version is available that is com…
bkoelman Nov 22, 2025
f743094
Convert to slnx
bkoelman Nov 22, 2025
c211400
Revert "Convert to slnx"
bkoelman Nov 22, 2025
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
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2025.2.4",
"version": "2025.3.0.2",
"commands": [
"jb"
],
Expand All @@ -17,14 +17,14 @@
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.4.17",
"version": "5.5.0",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"docfx": {
"version": "2.78.2",
"version": "2.78.4",
"commands": [
"docfx"
],
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ concurrency:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
SOLUTION_FILE: JsonApiDotNetCore.sln

jobs:
build-and-test:
Expand All @@ -48,6 +49,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
10.0.*
- name: Show installed versions
shell: pwsh
run: |
Expand Down Expand Up @@ -123,12 +125,14 @@ jobs:
# This contains the git tag name on release; in that case, we build the docs without publishing them.
DOCFX_SOURCE_BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
run: |
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
cd docs
$zipFile = [IO.Path]::Combine($env:TEMP, 'docfx-net10-binaries.zip')
Invoke-WebRequest -Uri 'https://github.com/json-api-dotnet/docfx/raw/refs/heads/dotnet10-rtm/net10-binaries.zip' -Method 'GET' -OutFile $zipFile
Expand-Archive $zipFile -Force
& ./generate-examples.ps1
dotnet docfx docfx.json --warningsAsErrors true
if ($LastExitCode -ne 0) {
Write-Error "docfx failed with exit code $LastExitCode."
}
dotnet exec docfx-net10-binaries/docfx.dll docfx.json --warningsAsErrors true
Copy-Item CNAME _site/CNAME
Copy-Item home/*.html _site/
Copy-Item home/*.ico _site/
Expand Down Expand Up @@ -159,6 +163,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
10.0.*
- name: Git checkout
uses: actions/checkout@v5
- name: Restore tools
Expand All @@ -168,7 +173,8 @@ jobs:
run: |
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
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
dotnet jb inspectcode --version
dotnet jb inspectcode $env:SOLUTION_FILE --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
- name: Upload output to artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -218,6 +224,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
10.0.*
- name: Git checkout
uses: actions/checkout@v5
with:
Expand All @@ -236,13 +243,15 @@ jobs:
$baseCommitHash = git rev-parse HEAD~1

Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
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
dotnet jb cleanupcode --version
dotnet regitlint -s $env:SOLUTION_FILE --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
- name: CleanupCode (on branch)
if: ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: |
Write-Output 'Running code cleanup on all files.'
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
dotnet jb cleanupcode --version
dotnet regitlint -s $env:SOLUTION_FILE --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

publish:
timeout-minutes: 60
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
10.0.*
- name: Git checkout
uses: actions/checkout@v5
- name: Initialize CodeQL
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
10.0.*
- name: Git checkout
uses: actions/checkout@v5
with:
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,3 @@ FodyWeavers.xsd
**/.idea/**/httpRequests/
**/.idea/**/dataSources/
!**/.idea/**/codeStyles/*

# Workaround for https://github.com/microsoft/kiota/issues/4228
kiota-lock.json
17 changes: 3 additions & 14 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
function VerifySuccessExitCode {
if ($LastExitCode -ne 0) {
throw "Command failed with exit code $LastExitCode."
}
}
#Requires -Version 7.4
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true

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

dotnet tool restore
VerifySuccessExitCode

dotnet build --configuration Release
VerifySuccessExitCode

dotnet test --no-build --configuration Release --verbosity quiet --collect:"XPlat Code Coverage"
VerifySuccessExitCode

dotnet reportgenerator -reports:**\coverage.cobertura.xml -targetdir:artifacts\coverage -filefilters:-*.g.cs
VerifySuccessExitCode

dotnet pack --no-build --configuration Release --output artifacts/packages
VerifySuccessExitCode
11 changes: 10 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
<VersionPrefix>5.9.2</VersionPrefix>
<VersionSuffix>pre</VersionSuffix>
<OpenApiPreviewNumber>7</OpenApiPreviewNumber>
<NuGetAuditMode>direct</NuGetAuditMode>
</PropertyGroup>

<PropertyGroup>
<NoWarn>
<!--
Temporary workaround: Stable EF Core 10 package for Pomelo.EntityFrameworkCore.MySql is not available yet.
NU1608: Detected package version outside of dependency constraint
-->
$(NoWarn);NU1608
</NoWarn>
</PropertyGroup>

<PropertyGroup>
Expand Down
18 changes: 18 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>
<Target Name="DisableCompileTimeOpenApiXmlGenerator" BeforeTargets="CoreCompile">
<ItemGroup>
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.AspNetCore.OpenApi.SourceGenerators'" />
</ItemGroup>
</Target>

<!-- Workaround for compiler regression at https://github.com/dotnet/roslyn/issues/80756 -->
<Target Name="DisableSlowAnalyzers" Condition="'$(Configuration)' == 'Debug'" BeforeTargets="CoreCompile">
<ItemGroup>
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'CSharpGuidelinesAnalyzer'" />
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.CSharp.CodeStyle'" />
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.NetAnalyzers'" />
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.CSharp.NetAnalyzers'" />
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'xunit.analyzers'" />
</ItemGroup>
</Target>
</Project>
2 changes: 2 additions & 0 deletions JsonApiDotNetCore.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantOverload_002ELocal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantQueryOrderByAscendingKeyword/@EntryIndexedValue">SUGGESTION</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantToStringCallForValueType/@EntryIndexedValue">SUGGESTION</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeArgumentsInsideNameof/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RemoveConstructorInvocation/@EntryIndexedValue">SUGGESTION</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceSequenceEqualWithConstantPattern/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceWithFieldKeyword/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReplaceWithPrimaryConstructorParameter/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SimplifyStringInterpolation/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SpecifyStringComparison/@EntryIndexedValue">WARNING</s:String>
Expand Down
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,17 @@ The following links explain what this project provides, why it exists, and how y
The following chart should help you pick the best version, based on your environment.
See also our [versioning policy](./VERSIONING_POLICY.md).

| JsonApiDotNetCore | Status | .NET | Entity Framework Core |
| ----------------- | ------------ | -------- | --------------------- |
| master | Preview | 9 | 9 |
| | | 8 | 8, 9 |
| 5.7.0+ | Stable | 9 | 9 |
| | | 8 | 8, 9 |
| 5.5.0-5.6.0 | Stable | 9 | 9 |
| | | 8 | 8, 9 |
| | | 7 | 7 |
| | | 6 | 6, 7 |
| 5.0.3-5.4.0 | Stable | 7 | 7 |
| | | 6 | 6, 7 |
| 5.0.0-5.0.2 | Stable | 6 | 6 |
| 4.x | Stable | 6 | 5 |
| | | 5 | 5 |
| | | Core 3.1 | 3.1, 5 |
| 3.x | Stable | Core 2.x | 2.x |
| .NET | Entity Framework Core | JsonApiDotNetCore | Status |
| -------- | --------------------- | ----------------- | -------------- |
| 10 | 10 | master | Preview |
| 9 | 9 | 5.5.0+ | Stable |
| 8 | 8, 9 | 5.5.0+ | Stable |
| 7 | 7 | 5.0.3 - 5.6.0 | Out of support |
| 6 | 7 | 5.0.3 - 5.6.0 | Out of support |
| 6 | 6 | 5.0.0 - 5.6.0 | Out of support |
| 5 | 5 | 4.x | Out of support |
| Core 3.1 | 3.1, 5 | 4.x | Out of support |
| Core 2.x | 2.x | 3.x | Out of support |

## Trying out the latest build

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>

Expand Down
29 changes: 11 additions & 18 deletions cleanupcode.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Requires -Version 7.0
#Requires -Version 7.4

# This script reformats (part of) the codebase to make it compliant with our coding guidelines.

Expand All @@ -7,38 +7,31 @@ param(
[string] $revision
)

function VerifySuccessExitCode {
if ($LastExitCode -ne 0) {
throw "Command failed with exit code $LastExitCode."
}
}
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true

dotnet tool restore
VerifySuccessExitCode

dotnet restore
VerifySuccessExitCode

$solutionFile = 'JsonApiDotNetCore.sln'

if ($revision) {
$headCommitHash = git rev-parse HEAD
VerifySuccessExitCode

$baseCommitHash = git rev-parse $revision
VerifySuccessExitCode

if ($baseCommitHash -eq $headCommitHash) {
Write-Output "Running code cleanup on staged/unstaged files."
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 staged,modified
VerifySuccessExitCode
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --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 staged,modified
}
else {
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
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 staged,modified,commits -a $headCommitHash -b $baseCommitHash
VerifySuccessExitCode
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --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 staged,modified,commits -a $headCommitHash -b $baseCommitHash
}
}
else {
Write-Output "Running code cleanup on all files."
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
VerifySuccessExitCode
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --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
}
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ api/*.yml
api/.manifest
request-examples/*.json
request-examples/*.temp
docfx-net10-binaries/
Loading