Skip to content

Commit e9c1e9b

Browse files
authored
Merge pull request #1293 from json-api-dotnet/merge-master-v5.3.0-into-openapi
Merge master v5.3.0 into openapi
2 parents adff2a9 + 313864b commit e9c1e9b

File tree

261 files changed

+8410
-2964
lines changed

Some content is hidden

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

261 files changed

+8410
-2964
lines changed

.config/dotnet-tools.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2023.1.0",
6+
"version": "2023.1.2",
77
"commands": [
88
"jb"
99
]
1010
},
1111
"regitlint": {
12-
"version": "6.3.10",
12+
"version": "6.3.11",
1313
"commands": [
1414
"regitlint"
1515
]
@@ -21,13 +21,13 @@
2121
]
2222
},
2323
"dotnet-reportgenerator-globaltool": {
24-
"version": "5.1.19",
24+
"version": "5.1.20",
2525
"commands": [
2626
"reportgenerator"
2727
]
2828
},
2929
"docfx": {
30-
"version": "2.62.2",
30+
"version": "2.67.1",
3131
"commands": [
3232
"docfx"
3333
]

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[*.{config,csproj,css,js,json,props,ruleset,xslt}]
11+
[*.{config,csproj,css,js,json,props,ruleset,xslt,html}]
1212
indent_size = 2
1313

1414
[*.{cs}]

Directory.Build.props

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<AspNetVersion>6.0.*</AspNetVersion>
55
<EFCoreVersion>7.0.*</EFCoreVersion>
66
<EFCorePostgresVersion>7.0.*</EFCorePostgresVersion>
7-
<MicrosoftCodeAnalysisVersion>4.5.*</MicrosoftCodeAnalysisVersion>
7+
<MicrosoftCodeAnalysisVersion>4.6.*</MicrosoftCodeAnalysisVersion>
88
<HumanizerVersion>2.14.1</HumanizerVersion>
9-
<SwashbuckleVersion>6.4.*</SwashbuckleVersion>
10-
<NSwagApiClientVersion>13.16.*</NSwagApiClientVersion>
11-
<MicrosoftApiClientVersion>6.0.*</MicrosoftApiClientVersion>
9+
<SwashbuckleVersion>6.5.*</SwashbuckleVersion>
10+
<NSwagApiClientVersion>13.19.*</NSwagApiClientVersion>
11+
<MicrosoftApiClientVersion>7.0.*</MicrosoftApiClientVersion>
1212
<NewtonsoftJsonVersion>13.0.*</NewtonsoftJsonVersion>
13-
<JsonApiDotNetCoreVersionPrefix>5.2.1</JsonApiDotNetCoreVersionPrefix>
13+
<JsonApiDotNetCoreVersionPrefix>5.3.1</JsonApiDotNetCoreVersionPrefix>
1414
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
1515
<WarningLevel>9999</WarningLevel>
1616
<Nullable>enable</Nullable>
@@ -20,7 +20,7 @@
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
23+
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" PrivateAssets="All" />
2424
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.8.3" 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.2.*</CoverletVersion>
40+
<CoverletVersion>6.0.*</CoverletVersion>
4141
<MoqVersion>4.18.*</MoqVersion>
42-
<TestSdkVersion>17.5.*</TestSdkVersion>
42+
<TestSdkVersion>17.6.*</TestSdkVersion>
4343
</PropertyGroup>
4444
</Project>

PackageReadme.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
A framework for building [JSON:API](http://jsonapi.org/) compliant REST APIs using .NET Core and Entity Framework Core. Includes support for [Atomic Operations](https://jsonapi.org/ext/atomic/).
2+
3+
The ultimate goal of this library is to eliminate as much boilerplate as possible by offering out-of-the-box features such as sorting, filtering and pagination. You just need to focus on defining the resources and implementing your custom business logic. This library has been designed around dependency injection, making extensibility incredibly easy.
4+
5+
For more information, visit [www.jsonapi.net](https://www.jsonapi.net/).

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,8 @@ Alternatively, to build and validate the code, run all tests, generate code cove
130130
```bash
131131
pwsh Build.ps1
132132
```
133+
134+
## Sponsors
135+
136+
<a href="https://jb.gg/OpenSourceSupport"><img align="middle" src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains Logo" style="width:150px"></a> &nbsp;
137+
<a href="https://www.araxis.com/buy/open-source"><img align="middle" src="https://www.araxis.com/theme/37/img/araxis-logo-lg.svg" alt="Araxis Logo" style="width:150px"></a>

appveyor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ for:
6767
Copy-Item CNAME _site/CNAME
6868
Copy-Item home/*.html _site/
6969
Copy-Item home/*.ico _site/
70+
New-Item -Force _site/styles -ItemType Directory | Out-Null
7071
Copy-Item -Recurse home/assets/* _site/styles/
7172
CD _site
7273
git add -A 2>&1

benchmarks/QueryString/QueryStringParserBenchmarks.cs

+18-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
using JsonApiDotNetCore;
55
using JsonApiDotNetCore.Configuration;
66
using JsonApiDotNetCore.Middleware;
7+
using JsonApiDotNetCore.Queries.Parsing;
78
using JsonApiDotNetCore.QueryStrings;
8-
using JsonApiDotNetCore.QueryStrings.Internal;
99
using JsonApiDotNetCore.Resources;
1010
using Microsoft.Extensions.Logging.Abstractions;
1111

@@ -37,11 +37,23 @@ public QueryStringParserBenchmarks()
3737

3838
var resourceFactory = new ResourceFactory(new ServiceContainer());
3939

40-
var includeReader = new IncludeQueryStringParameterReader(request, resourceGraph, options);
41-
var filterReader = new FilterQueryStringParameterReader(request, resourceGraph, resourceFactory, options);
42-
var sortReader = new SortQueryStringParameterReader(request, resourceGraph);
43-
var sparseFieldSetReader = new SparseFieldSetQueryStringParameterReader(request, resourceGraph);
44-
var paginationReader = new PaginationQueryStringParameterReader(request, resourceGraph, options);
40+
var includeParser = new IncludeParser(options);
41+
var includeReader = new IncludeQueryStringParameterReader(includeParser, request, resourceGraph);
42+
43+
var filterScopeParser = new QueryStringParameterScopeParser();
44+
var filterValueParser = new FilterParser(resourceFactory);
45+
var filterReader = new FilterQueryStringParameterReader(filterScopeParser, filterValueParser, request, resourceGraph, options);
46+
47+
var sortScopeParser = new QueryStringParameterScopeParser();
48+
var sortValueParser = new SortParser();
49+
var sortReader = new SortQueryStringParameterReader(sortScopeParser, sortValueParser, request, resourceGraph);
50+
51+
var sparseFieldSetScopeParser = new SparseFieldTypeParser(resourceGraph);
52+
var sparseFieldSetValueParser = new SparseFieldSetParser();
53+
var sparseFieldSetReader = new SparseFieldSetQueryStringParameterReader(sparseFieldSetScopeParser, sparseFieldSetValueParser, request, resourceGraph);
54+
55+
var paginationParser = new PaginationParser();
56+
var paginationReader = new PaginationQueryStringParameterReader(paginationParser, request, resourceGraph, options);
4557

4658
IQueryStringParameterReader[] readers = ArrayFactory.Create<IQueryStringParameterReader>(includeReader, filterReader, sortReader,
4759
sparseFieldSetReader, paginationReader);

benchmarks/Serialization/OperationsSerializationBenchmarks.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using JsonApiDotNetCore.Configuration;
44
using JsonApiDotNetCore.Middleware;
55
using JsonApiDotNetCore.Queries;
6-
using JsonApiDotNetCore.Queries.Internal;
76
using JsonApiDotNetCore.Resources;
87
using JsonApiDotNetCore.Serialization.Objects;
98

benchmarks/Serialization/ResourceSerializationBenchmarks.cs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using JsonApiDotNetCore.Middleware;
77
using JsonApiDotNetCore.Queries;
88
using JsonApiDotNetCore.Queries.Expressions;
9-
using JsonApiDotNetCore.Queries.Internal;
109
using JsonApiDotNetCore.Resources.Annotations;
1110
using JsonApiDotNetCore.Serialization.Objects;
1211

benchmarks/Serialization/SerializationBenchmarkBase.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using JsonApiDotNetCore.Configuration;
66
using JsonApiDotNetCore.Middleware;
77
using JsonApiDotNetCore.Queries;
8-
using JsonApiDotNetCore.Queries.Internal;
98
using JsonApiDotNetCore.Resources;
109
using JsonApiDotNetCore.Resources.Annotations;
1110
using JsonApiDotNetCore.Serialization.Response;

benchmarks/Tools/NeverResourceDefinitionAccessor.cs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using JsonApiDotNetCore.Configuration;
33
using JsonApiDotNetCore.Middleware;
44
using JsonApiDotNetCore.Queries.Expressions;
5+
using JsonApiDotNetCore.Queries.QueryableBuilding;
56
using JsonApiDotNetCore.Resources;
67
using JsonApiDotNetCore.Resources.Annotations;
78

@@ -13,6 +14,7 @@ namespace Benchmarks.Tools;
1314
internal sealed class NeverResourceDefinitionAccessor : IResourceDefinitionAccessor
1415
{
1516
bool IResourceDefinitionAccessor.IsReadOnlyRequest => throw new NotImplementedException();
17+
public IQueryableBuilder QueryableBuilder => throw new NotImplementedException();
1618

1719
public IImmutableSet<IncludeElementExpression> OnApplyIncludes(ResourceType resourceType, IImmutableSet<IncludeElementExpression> existingIncludes)
1820
{

docs/build-dev.ps1

+4
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ if (-Not $NoBuild -Or -Not (Test-Path -Path _site)) {
3737
Invoke-Expression ./generate-examples.ps1
3838
}
3939

40+
dotnet tool restore
41+
VerifySuccessExitCode
42+
4043
dotnet docfx ./docfx.json
4144
VerifySuccessExitCode
4245

4346
Copy-Item -Force home/*.html _site/
4447
Copy-Item -Force home/*.ico _site/
48+
New-Item -Force _site/styles -ItemType Directory | Out-Null
4549
Copy-Item -Force -Recurse home/assets/* _site/styles/
4650

4751
cd _site

docs/docfx.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"dest": "_site",
4141
"globalMetadataFiles": [],
4242
"fileMetadataFiles": [],
43-
"template": [ "default" ],
43+
"template": [ "default", "modern" ],
4444
"postProcessors": [],
4545
"noLangKeyword": false,
4646
"keepFileLink": false,

docs/home/assets/fonts/icofont.eot

1.69 KB
Binary file not shown.

docs/home/assets/fonts/icofont.svg

+11
Loading

docs/home/assets/fonts/icofont.ttf

1.45 KB
Binary file not shown.

docs/home/assets/fonts/icofont.woff

968 Bytes
Binary file not shown.

docs/home/assets/fonts/icofont.woff2

616 Bytes
Binary file not shown.

docs/home/assets/home.css

+28-7
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ h1, h2, h3, h4, h5, h6, .font-primary {
9595
margin-top: 72px;
9696
}
9797

98-
9998
/*--------------------------------------------------------------
10099
# Hero Section
101100
--------------------------------------------------------------*/
@@ -300,12 +299,6 @@ section {
300299
.breadcrumbs ol li {
301300
display: inline-block;
302301
}
303-
304-
305-
}
306-
307-
div[feature]:hover {
308-
cursor: pointer;
309302
}
310303

311304
/*--------------------------------------------------------------
@@ -401,6 +394,34 @@ div[feature]:hover {
401394
margin-bottom: 0;
402395
}
403396

397+
div[feature]:hover {
398+
cursor: pointer;
399+
}
400+
401+
/*--------------------------------------------------------------
402+
# Sponsors
403+
--------------------------------------------------------------*/
404+
.sponsors .icon-box {
405+
padding: 30px;
406+
position: relative;
407+
overflow: hidden;
408+
margin: 0 0 40px 0;
409+
background: #fff;
410+
box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
411+
transition: all 0.3s ease-in-out;
412+
border-radius: 15px;
413+
text-align: center;
414+
border-bottom: 3px solid #fff;
415+
}
416+
417+
.sponsors .icon-box:hover {
418+
transform: translateY(-5px);
419+
border-color: #ef7f4d;
420+
}
421+
422+
div[sponsor]:hover {
423+
cursor: pointer;
424+
}
404425

405426
/*--------------------------------------------------------------
406427
# Footer

docs/home/assets/home.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
}
3939
});
4040

41-
4241
// Feature panels linking
4342
$('div[feature]#filter').on('click', () => navigateTo('usage/reading/filtering.html'));
4443
$('div[feature]#sort').on('click', () => navigateTo('usage/reading/sorting.html'));
@@ -49,13 +48,19 @@
4948
$('div[feature]#validation').on('click', () => navigateTo('usage/options.html#enable-modelstate-validation'));
5049
$('div[feature]#customizable').on('click', () => navigateTo('usage/extensibility/resource-definitions.html'));
5150

52-
5351
const navigateTo = (url) => {
54-
if (!window.getSelection().toString()){
52+
if (!window.getSelection().toString()) {
5553
window.location = url;
5654
}
5755
}
5856

57+
// Sponsor panels linking
58+
$('div[sponsor]#jetbrains').on('click', () => navigateExternalTo('https://jb.gg/OpenSourceSupport'));
59+
$('div[sponsor]#araxis').on('click', () => navigateExternalTo('https://www.araxis.com/buy/open-source'));
60+
61+
const navigateExternalTo = (url) => {
62+
window.open(url, "_blank");
63+
}
5964

6065
hljs.initHighlightingOnLoad()
6166

docs/home/assets/icofont.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)