Skip to content

Merge master v5.3.0 into openapi #1293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4dfbeab
Fixed NoEntityFrameworkExample: block write endpoints
bkoelman May 14, 2023
793570f
Package updates
bkoelman May 18, 2023
a1cf3ab
use mermaid diagrams
bkoelman May 18, 2023
4bfe4da
Merge pull request #1274 from json-api-dotnet/package-updates
bkoelman May 18, 2023
e49a8f4
Fix broken docs home page
bkoelman May 18, 2023
46b50d4
Fix broken 'up' icon on home page
bkoelman May 18, 2023
99da7af
Corrected HTTP method in updating.md
boginw May 26, 2023
5d705d6
Merge pull request #1278 from boginw/master
bkoelman May 29, 2023
b3b6262
Repro for https://youtrack.jetbrains.com/issue/RSRP-491451
bkoelman May 23, 2023
3ebe52c
Add missing controller annotations in tests
bkoelman Jun 14, 2023
210b0dd
Merge pull request #1276 from json-api-dotnet/repro-for-RSRP-491451
bkoelman Jun 14, 2023
c0eb108
Fix build warning ASP0019, produced by ASP.NET Core 8
bkoelman Jun 14, 2023
6d8e44e
Fix Resharper warnings from upcoming new version
bkoelman Jun 14, 2023
336b725
Do not execute unneeded SQL query in 1-to-1 relationship update, whic…
bkoelman Jul 16, 2023
c07b0c2
Reformat .html file with 2 spaces as indent
bkoelman Jul 22, 2023
392d724
Add sponsors to docs landing page and root readme
bkoelman Jul 22, 2023
7f99f72
Merge pull request #1292 from json-api-dotnet/sponsor-credits
bkoelman Jul 22, 2023
c6584b6
Set background color of Araxis sponsor logo
bkoelman Jul 23, 2023
28ca7d5
Add readme to NuGet packages
bkoelman Jul 23, 2023
fe64052
Merge pull request #1289 from json-api-dotnet/fix-efcore8
bkoelman Jul 23, 2023
fa14729
Fixed: do not allow comparison of count() with null; do not treat nul…
bkoelman Jun 14, 2023
abaa7b1
Add extensibility point for pluggable filter value conversions
bkoelman Jun 15, 2023
a5794c3
Move checks for blocked fields into parsers: this simplifies the API …
bkoelman Jun 16, 2023
74859bc
Track position in query string parsing and report location on failure
bkoelman Jun 22, 2023
692101b
Simplify query string parse assertions
bkoelman Jun 24, 2023
e9a5a62
Correct test names: 'at' endpoint
bkoelman Jul 4, 2023
f463f29
Replace FieldChainRequirements with pattern syntax
bkoelman Jun 23, 2023
1bfe3ee
Make query string parameter parsers injectable and extendable
bkoelman Jun 25, 2023
1fa5690
Make query building injectable and extendable
bkoelman Jun 26, 2023
1085a70
Move the remaining query string types out of Internal namespace
bkoelman Jun 27, 2023
2f5e506
Add example for 'isUpperCase' custom filter function
bkoelman Jun 27, 2023
10b617d
Replace IFilterValueConverter with pluggable functions in filters
bkoelman Jul 4, 2023
58564ec
Add example for 'length' custom filter/sort function
bkoelman Jul 4, 2023
d62327f
Add example for 'sum' custom filter function
bkoelman Jul 4, 2023
fbc5766
Document the types in QueryExpression hierarchy
bkoelman Jul 5, 2023
38a4a83
Move RuntimeTypeConverter out of pubternal namespace
bkoelman Jul 5, 2023
99f106f
Merge pull request #1286 from json-api-dotnet/query-string-extensibility
bkoelman Jul 23, 2023
129944f
Package updates
bkoelman Jul 23, 2023
f248625
Deterministic CI-builds
bkoelman Jul 23, 2023
1535b64
Simplified check
bkoelman Jul 23, 2023
f6e2616
Adapt for corrected nullability annotation
bkoelman Jul 23, 2023
2b461a9
Update version to 5.3.0
bkoelman Jul 23, 2023
4183f62
Increment version to 5.3.1 (used for pre-release builds from ci)
bkoelman Jul 23, 2023
1c599ad
Merge branch 'master' into merge-master-v5.3.0-into-openapi
bkoelman Jul 23, 2023
8daadff
Add missing controller annotations in tests
bkoelman Jul 23, 2023
5b07abe
Add readme to NuGet packages
bkoelman Jul 23, 2023
c8f47e6
Deterministic CI-builds
bkoelman Jul 23, 2023
313864b
Package updates
bkoelman Jul 23, 2023
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
8 changes: 4 additions & 4 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2023.1.0",
"version": "2023.1.2",
"commands": [
"jb"
]
},
"regitlint": {
"version": "6.3.10",
"version": "6.3.11",
"commands": [
"regitlint"
]
Expand All @@ -21,13 +21,13 @@
]
},
"dotnet-reportgenerator-globaltool": {
"version": "5.1.19",
"version": "5.1.20",
"commands": [
"reportgenerator"
]
},
"docfx": {
"version": "2.62.2",
"version": "2.67.1",
"commands": [
"docfx"
]
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{config,csproj,css,js,json,props,ruleset,xslt}]
[*.{config,csproj,css,js,json,props,ruleset,xslt,html}]
indent_size = 2

[*.{cs}]
Expand Down
16 changes: 8 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<AspNetVersion>6.0.*</AspNetVersion>
<EFCoreVersion>7.0.*</EFCoreVersion>
<EFCorePostgresVersion>7.0.*</EFCorePostgresVersion>
<MicrosoftCodeAnalysisVersion>4.5.*</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisVersion>4.6.*</MicrosoftCodeAnalysisVersion>
<HumanizerVersion>2.14.1</HumanizerVersion>
<SwashbuckleVersion>6.4.*</SwashbuckleVersion>
<NSwagApiClientVersion>13.16.*</NSwagApiClientVersion>
<MicrosoftApiClientVersion>6.0.*</MicrosoftApiClientVersion>
<SwashbuckleVersion>6.5.*</SwashbuckleVersion>
<NSwagApiClientVersion>13.19.*</NSwagApiClientVersion>
<MicrosoftApiClientVersion>7.0.*</MicrosoftApiClientVersion>
<NewtonsoftJsonVersion>13.0.*</NewtonsoftJsonVersion>
<JsonApiDotNetCoreVersionPrefix>5.2.1</JsonApiDotNetCoreVersionPrefix>
<JsonApiDotNetCoreVersionPrefix>5.3.1</JsonApiDotNetCoreVersionPrefix>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
<WarningLevel>9999</WarningLevel>
<Nullable>enable</Nullable>
Expand All @@ -20,7 +20,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" PrivateAssets="All" />
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.8.3" PrivateAssets="All" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
</ItemGroup>
Expand All @@ -37,8 +37,8 @@

<!-- Test Project Dependencies -->
<PropertyGroup>
<CoverletVersion>3.2.*</CoverletVersion>
<CoverletVersion>6.0.*</CoverletVersion>
<MoqVersion>4.18.*</MoqVersion>
<TestSdkVersion>17.5.*</TestSdkVersion>
<TestSdkVersion>17.6.*</TestSdkVersion>
</PropertyGroup>
</Project>
5 changes: 5 additions & 0 deletions PackageReadme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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/).

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.

For more information, visit [www.jsonapi.net](https://www.jsonapi.net/).
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,8 @@ Alternatively, to build and validate the code, run all tests, generate code cove
```bash
pwsh Build.ps1
```

## Sponsors

<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;
<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>
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ for:
Copy-Item CNAME _site/CNAME
Copy-Item home/*.html _site/
Copy-Item home/*.ico _site/
New-Item -Force _site/styles -ItemType Directory | Out-Null
Copy-Item -Recurse home/assets/* _site/styles/
CD _site
git add -A 2>&1
Expand Down
24 changes: 18 additions & 6 deletions benchmarks/QueryString/QueryStringParserBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using JsonApiDotNetCore;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Middleware;
using JsonApiDotNetCore.Queries.Parsing;
using JsonApiDotNetCore.QueryStrings;
using JsonApiDotNetCore.QueryStrings.Internal;
using JsonApiDotNetCore.Resources;
using Microsoft.Extensions.Logging.Abstractions;

Expand Down Expand Up @@ -37,11 +37,23 @@ public QueryStringParserBenchmarks()

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

var includeReader = new IncludeQueryStringParameterReader(request, resourceGraph, options);
var filterReader = new FilterQueryStringParameterReader(request, resourceGraph, resourceFactory, options);
var sortReader = new SortQueryStringParameterReader(request, resourceGraph);
var sparseFieldSetReader = new SparseFieldSetQueryStringParameterReader(request, resourceGraph);
var paginationReader = new PaginationQueryStringParameterReader(request, resourceGraph, options);
var includeParser = new IncludeParser(options);
var includeReader = new IncludeQueryStringParameterReader(includeParser, request, resourceGraph);

var filterScopeParser = new QueryStringParameterScopeParser();
var filterValueParser = new FilterParser(resourceFactory);
var filterReader = new FilterQueryStringParameterReader(filterScopeParser, filterValueParser, request, resourceGraph, options);

var sortScopeParser = new QueryStringParameterScopeParser();
var sortValueParser = new SortParser();
var sortReader = new SortQueryStringParameterReader(sortScopeParser, sortValueParser, request, resourceGraph);

var sparseFieldSetScopeParser = new SparseFieldTypeParser(resourceGraph);
var sparseFieldSetValueParser = new SparseFieldSetParser();
var sparseFieldSetReader = new SparseFieldSetQueryStringParameterReader(sparseFieldSetScopeParser, sparseFieldSetValueParser, request, resourceGraph);

var paginationParser = new PaginationParser();
var paginationReader = new PaginationQueryStringParameterReader(paginationParser, request, resourceGraph, options);

IQueryStringParameterReader[] readers = ArrayFactory.Create<IQueryStringParameterReader>(includeReader, filterReader, sortReader,
sparseFieldSetReader, paginationReader);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Middleware;
using JsonApiDotNetCore.Queries;
using JsonApiDotNetCore.Queries.Internal;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Serialization.Objects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using JsonApiDotNetCore.Middleware;
using JsonApiDotNetCore.Queries;
using JsonApiDotNetCore.Queries.Expressions;
using JsonApiDotNetCore.Queries.Internal;
using JsonApiDotNetCore.Resources.Annotations;
using JsonApiDotNetCore.Serialization.Objects;

Expand Down
1 change: 0 additions & 1 deletion benchmarks/Serialization/SerializationBenchmarkBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Middleware;
using JsonApiDotNetCore.Queries;
using JsonApiDotNetCore.Queries.Internal;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;
using JsonApiDotNetCore.Serialization.Response;
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/Tools/NeverResourceDefinitionAccessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Middleware;
using JsonApiDotNetCore.Queries.Expressions;
using JsonApiDotNetCore.Queries.QueryableBuilding;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;

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

public IImmutableSet<IncludeElementExpression> OnApplyIncludes(ResourceType resourceType, IImmutableSet<IncludeElementExpression> existingIncludes)
{
Expand Down
4 changes: 4 additions & 0 deletions docs/build-dev.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ if (-Not $NoBuild -Or -Not (Test-Path -Path _site)) {
Invoke-Expression ./generate-examples.ps1
}

dotnet tool restore
VerifySuccessExitCode

dotnet docfx ./docfx.json
VerifySuccessExitCode

Copy-Item -Force home/*.html _site/
Copy-Item -Force home/*.ico _site/
New-Item -Force _site/styles -ItemType Directory | Out-Null
Copy-Item -Force -Recurse home/assets/* _site/styles/

cd _site
Expand Down
2 changes: 1 addition & 1 deletion docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dest": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [ "default" ],
"template": [ "default", "modern" ],
"postProcessors": [],
"noLangKeyword": false,
"keepFileLink": false,
Expand Down
Binary file added docs/home/assets/fonts/icofont.eot
Binary file not shown.
11 changes: 11 additions & 0 deletions docs/home/assets/fonts/icofont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/home/assets/fonts/icofont.ttf
Binary file not shown.
Binary file added docs/home/assets/fonts/icofont.woff
Binary file not shown.
Binary file added docs/home/assets/fonts/icofont.woff2
Binary file not shown.
35 changes: 28 additions & 7 deletions docs/home/assets/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ h1, h2, h3, h4, h5, h6, .font-primary {
margin-top: 72px;
}


/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
Expand Down Expand Up @@ -300,12 +299,6 @@ section {
.breadcrumbs ol li {
display: inline-block;
}


}

div[feature]:hover {
cursor: pointer;
}

/*--------------------------------------------------------------
Expand Down Expand Up @@ -401,6 +394,34 @@ div[feature]:hover {
margin-bottom: 0;
}

div[feature]:hover {
cursor: pointer;
}

/*--------------------------------------------------------------
# Sponsors
--------------------------------------------------------------*/
.sponsors .icon-box {
padding: 30px;
position: relative;
overflow: hidden;
margin: 0 0 40px 0;
background: #fff;
box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
transition: all 0.3s ease-in-out;
border-radius: 15px;
text-align: center;
border-bottom: 3px solid #fff;
}

.sponsors .icon-box:hover {
transform: translateY(-5px);
border-color: #ef7f4d;
}

div[sponsor]:hover {
cursor: pointer;
}

/*--------------------------------------------------------------
# Footer
Expand Down
11 changes: 8 additions & 3 deletions docs/home/assets/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
}
});


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


const navigateTo = (url) => {
if (!window.getSelection().toString()){
if (!window.getSelection().toString()) {
window.location = url;
}
}

// Sponsor panels linking
$('div[sponsor]#jetbrains').on('click', () => navigateExternalTo('https://jb.gg/OpenSourceSupport'));
$('div[sponsor]#araxis').on('click', () => navigateExternalTo('https://www.araxis.com/buy/open-source'));

const navigateExternalTo = (url) => {
window.open(url, "_blank");
}

hljs.initHighlightingOnLoad()

Expand Down
7 changes: 7 additions & 0 deletions docs/home/assets/icofont.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading