Skip to content

Commit e39a870

Browse files
committed
Merge branch 'master' into merge-v5.1-into-openapi
2 parents 375a0ed + ceb27c3 commit e39a870

File tree

308 files changed

+3031
-1066
lines changed

Some content is hidden

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

308 files changed

+3031
-1066
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2021.3.4",
6+
"version": "2022.2.3",
77
"commands": [
88
"jb"
99
]

.editorconfig

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@ indent_style = space
66
indent_size = 4
77
charset = utf-8
88
trim_trailing_whitespace = true
9-
end_of_line = lf
109
insert_final_newline = true
1110

12-
[*.{csproj,json}]
11+
[*.{config,csproj,css,js,json,props,ruleset,xslt}]
1312
indent_size = 2
1413

1514
[*.{cs}]
16-
#### .NET Coding Conventions ####
15+
#### C#/.NET Coding Conventions ####
1716

18-
# Organize usings
17+
# 'using' directive preferences
1918
dotnet_sort_system_directives_first = true
19+
csharp_using_directive_placement = outside_namespace:suggestion
20+
21+
# Namespace declarations
22+
csharp_style_namespace_declarations = file_scoped:suggestion
2023

2124
# this. preferences
2225
dotnet_style_qualification_for_field = false:suggestion
@@ -30,13 +33,15 @@ dotnet_style_predefined_type_for_member_access = true:suggestion
3033

3134
# Modifier preferences
3235
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
36+
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:suggestion
3337
csharp_style_pattern_local_over_anonymous_function = false:silent
3438

3539
# Expression-level preferences
3640
dotnet_style_operator_placement_when_wrapping = end_of_line
3741
dotnet_style_prefer_auto_properties = true:suggestion
3842
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
3943
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
44+
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
4045

4146
# Parameter preferences
4247
dotnet_code_quality_unused_parameters = non_public:suggestion
@@ -54,38 +59,38 @@ csharp_style_expression_bodied_properties = true:suggestion
5459
# Code-block preferences
5560
csharp_prefer_braces = true:suggestion
5661

57-
# Expression-level preferences
58-
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
59-
60-
# 'using' directive preferences
61-
csharp_using_directive_placement = outside_namespace:suggestion
62-
63-
64-
#### C# Formatting Rules ####
65-
6662
# Indentation preferences
6763
csharp_indent_case_contents_when_block = false
6864

6965
# Wrapping preferences
7066
csharp_preserve_single_line_statements = false
7167

68+
# 'var' usage preferences
69+
csharp_style_var_for_built_in_types = false:suggestion
70+
csharp_style_var_when_type_is_apparent = true:suggestion
71+
csharp_style_var_elsewhere = false:suggestion
72+
73+
# Parentheses preferences
74+
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:suggestion
75+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
76+
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:suggestion
7277

73-
#### Naming styles ####
78+
#### Naming Style ####
7479

7580
dotnet_diagnostic.IDE1006.severity = warning
7681

7782
# Naming rules
78-
dotnet_naming_rule.private_const_fields_should_be_pascal_case.symbols = private_const_fields
79-
dotnet_naming_rule.private_const_fields_should_be_pascal_case.style = pascal_case
80-
dotnet_naming_rule.private_const_fields_should_be_pascal_case.severity = warning
83+
dotnet_naming_rule.const_fields_should_be_pascal_case.symbols = const_fields
84+
dotnet_naming_rule.const_fields_should_be_pascal_case.style = pascal_case
85+
dotnet_naming_rule.const_fields_should_be_pascal_case.severity = warning
8186

8287
dotnet_naming_rule.private_static_readonly_fields_should_be_pascal_case.symbols = private_static_readonly_fields
8388
dotnet_naming_rule.private_static_readonly_fields_should_be_pascal_case.style = pascal_case
8489
dotnet_naming_rule.private_static_readonly_fields_should_be_pascal_case.severity = warning
8590

86-
dotnet_naming_rule.private_static_or_readonly_fields_should_start_with_underscore.symbols = private_static_or_readonly_fields
87-
dotnet_naming_rule.private_static_or_readonly_fields_should_start_with_underscore.style = camel_case_prefix_with_underscore
88-
dotnet_naming_rule.private_static_or_readonly_fields_should_start_with_underscore.severity = warning
91+
dotnet_naming_rule.private_fields_should_start_with_underscore.symbols = private_fields
92+
dotnet_naming_rule.private_fields_should_start_with_underscore.style = camel_case_prefix_with_underscore
93+
dotnet_naming_rule.private_fields_should_start_with_underscore.severity = warning
8994

9095
dotnet_naming_rule.locals_and_parameters_should_be_camel_case.symbols = locals_and_parameters
9196
dotnet_naming_rule.locals_and_parameters_should_be_camel_case.style = camel_case
@@ -96,25 +101,24 @@ dotnet_naming_rule.types_and_members_should_be_pascal_case.style = pascal_case
96101
dotnet_naming_rule.types_and_members_should_be_pascal_case.severity = warning
97102

98103
# Symbol specifications
99-
dotnet_naming_symbols.private_const_fields.applicable_kinds = field
100-
dotnet_naming_symbols.private_const_fields.applicable_accessibilities = private
101-
dotnet_naming_symbols.private_const_fields.required_modifiers = const
104+
dotnet_naming_symbols.const_fields.applicable_kinds = field
105+
dotnet_naming_symbols.const_fields.applicable_accessibilities = *
106+
dotnet_naming_symbols.const_fields.required_modifiers = const
102107

103108
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
104109
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private
105-
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = static,readonly
110+
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = static, readonly
106111

107-
dotnet_naming_symbols.private_static_or_readonly_fields.applicable_kinds = field
108-
dotnet_naming_symbols.private_static_or_readonly_fields.applicable_accessibilities = private
109-
dotnet_naming_symbols.private_static_or_readonly_fields.required_modifiers = static readonly
112+
dotnet_naming_symbols.private_fields.applicable_kinds = field
113+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
110114

111-
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = local,parameter
115+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = local, parameter
112116
dotnet_naming_symbols.locals_and_parameters.applicable_accessibilities = *
113117

114118
dotnet_naming_symbols.types_and_members.applicable_kinds = *
115119
dotnet_naming_symbols.types_and_members.applicable_accessibilities = *
116120

117-
# Naming styles
121+
# Style specifications
118122
dotnet_naming_style.pascal_case.capitalization = pascal_case
119123

120124
dotnet_naming_style.camel_case_prefix_with_underscore.required_prefix = _

.gitignore

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
4+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
55

66
# User-specific files
77
*.rsuser
@@ -90,16 +90,14 @@ StyleCopReport.xml
9090
*.tmp_proj
9191
*_wpftmp.csproj
9292
*.log
93+
*.tlog
9394
*.vspscc
9495
*.vssscc
9596
.builds
9697
*.pidb
9798
*.svclog
9899
*.scc
99100

100-
# MacOS file systems
101-
**/.DS_STORE
102-
103101
# Chutzpah Test files
104102
_Chutzpah*
105103

@@ -134,9 +132,6 @@ _ReSharper*/
134132
*.[Rr]e[Ss]harper
135133
*.DotSettings.user
136134

137-
# JetBrains Rider
138-
.idea/
139-
140135
# TeamCity is a build add-in
141136
_TeamCity*
142137

@@ -148,7 +143,9 @@ _TeamCity*
148143
!.axoCover/settings.json
149144

150145
# Coverlet is a free, cross platform Code Coverage Tool
151-
coverage*[.json, .xml, .info]
146+
coverage*.json
147+
coverage*.xml
148+
coverage*.info
152149

153150
# Visual Studio code coverage results
154151
*.coverage
@@ -297,6 +294,17 @@ node_modules/
297294
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
298295
*.vbw
299296

297+
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
298+
*.vbp
299+
300+
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
301+
*.dsw
302+
*.dsp
303+
304+
# Visual Studio 6 technical files
305+
*.ncb
306+
*.aps
307+
300308
# Visual Studio LightSwitch build output
301309
**/*.HTMLClient/GeneratedArtifacts
302310
**/*.DesktopClient/GeneratedArtifacts
@@ -353,6 +361,9 @@ ASALocalRun/
353361
# Local History for Visual Studio
354362
.localhistory/
355363

364+
# Visual Studio History (VSHistory) files
365+
.vshistory/
366+
356367
# BeatPulse healthcheck temp database
357368
healthchecksdb
358369

@@ -365,5 +376,50 @@ MigrationBackup/
365376
# Fody - auto-generated XML schema
366377
FodyWeavers.xsd
367378

379+
# VS Code files for those working on multiple tools
380+
.vscode/*
381+
!.vscode/settings.json
382+
!.vscode/tasks.json
383+
!.vscode/launch.json
384+
!.vscode/extensions.json
385+
*.code-workspace
386+
387+
# Local History for Visual Studio Code
388+
.history/
389+
390+
# Windows Installer files from build outputs
391+
*.cab
392+
*.msi
393+
*.msix
394+
*.msm
395+
*.msp
396+
397+
# JetBrains Rider
398+
*.sln.iml
399+
400+
#############################################
401+
### Additions specific to this repository ###
402+
#############################################
403+
404+
# MacOS file systems
405+
**/.DS_STORE
406+
368407
# Sqlite example databases
369408
*.db
409+
410+
# JetBrains IDEs Rider/IntelliJ (based on https://intellij-support.jetbrains.com/hc/en-us/articles/206544839)
411+
**/.idea/**/*.xml
412+
**/.idea/**/*.iml
413+
**/.idea/**/*.ids
414+
**/.idea/**/*.ipr
415+
**/.idea/**/*.iws
416+
**/.idea/**/*.name
417+
**/.idea/**/*.properties
418+
**/.idea/**/*.ser
419+
**/.idea/**/shelf/
420+
**/.idea/**/dictionaries/
421+
**/.idea/**/libraries/
422+
**/.idea/**/artifacts/
423+
**/.idea/**/httpRequests/
424+
**/.idea/**/dataSources/
425+
!**/.idea/**/codeStyles/*

.idea/.idea.JsonApiDotNetCore/.idea/.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.JsonApiDotNetCore/.idea/codeStyles/Project.xml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.JsonApiDotNetCore/.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Build.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ function CheckLastExitCode {
88

99
function RunInspectCode {
1010
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
11-
# passing --build instead of --no-build as workaround for https://youtrack.jetbrains.com/issue/RSRP-487054
12-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
11+
dotnet jb inspectcode JsonApiDotNetCore.sln --no-build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
1312
CheckLastExitCode
1413

1514
[xml]$xml = Get-Content "$outputPath"
@@ -114,8 +113,11 @@ CheckLastExitCode
114113
dotnet build -c Release
115114
CheckLastExitCode
116115

117-
RunInspectCode
118-
RunCleanupCode
116+
# https://youtrack.jetbrains.com/issue/RSRP-488628/Breaking-InspectCode-fails-with-Roslyn-Worker-process-exited-unexpectedly-after-update
117+
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -ne 'Ubuntu') {
118+
RunInspectCode
119+
RunCleanupCode
120+
}
119121

120122
dotnet test -c Release --no-build --collect:"XPlat Code Coverage"
121123
CheckLastExitCode

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NSwagApiClientVersion>13.16.*</NSwagApiClientVersion>
1111
<MicrosoftApiClientVersion>6.0.*</MicrosoftApiClientVersion>
1212
<NewtonsoftJsonVersion>13.0.*</NewtonsoftJsonVersion>
13-
<JsonApiDotNetCoreVersionPrefix>5.0.4</JsonApiDotNetCoreVersionPrefix>
13+
<JsonApiDotNetCoreVersionPrefix>5.1.1</JsonApiDotNetCoreVersionPrefix>
1414
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
1515
<WarningLevel>9999</WarningLevel>
1616
<Nullable>enable</Nullable>

JsonApiDotNetCore.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1010
ProjectSection(SolutionItems) = preProject
1111
.editorconfig = .editorconfig
1212
.gitignore = .gitignore
13+
CodingGuidelines.ruleset = CodingGuidelines.ruleset
1314
CSharpGuidelinesAnalyzer.config = CSharpGuidelinesAnalyzer.config
1415
Directory.Build.props = Directory.Build.props
1516
EndProjectSection
@@ -52,6 +53,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore.Annotatio
5253
EndProject
5354
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DatabasePerTenantExample", "src\Examples\DatabasePerTenantExample\DatabasePerTenantExample.csproj", "{60334658-BE51-43B3-9C4D-F2BBF56C89CE}"
5455
EndProject
56+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnnotationTests", "test\AnnotationTests\AnnotationTests.csproj", "{24B0C12F-38CD-4245-8785-87BEFAD55B00}"
57+
EndProject
5558
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore.OpenApi", "src\JsonApiDotNetCore.OpenApi\JsonApiDotNetCore.OpenApi.csproj", "{71287D6F-6C3B-44B4-9FCA-E78FE3F02289}"
5659
EndProject
5760
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApiTests", "test\OpenApiTests\OpenApiTests.csproj", "{B693DE14-BB28-496F-AB39-B4E674ABCA80}"
@@ -276,6 +279,18 @@ Global
276279
{60334658-BE51-43B3-9C4D-F2BBF56C89CE}.Release|x64.Build.0 = Release|Any CPU
277280
{60334658-BE51-43B3-9C4D-F2BBF56C89CE}.Release|x86.ActiveCfg = Release|Any CPU
278281
{60334658-BE51-43B3-9C4D-F2BBF56C89CE}.Release|x86.Build.0 = Release|Any CPU
282+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
283+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Debug|Any CPU.Build.0 = Debug|Any CPU
284+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Debug|x64.ActiveCfg = Debug|Any CPU
285+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Debug|x64.Build.0 = Debug|Any CPU
286+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Debug|x86.ActiveCfg = Debug|Any CPU
287+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Debug|x86.Build.0 = Debug|Any CPU
288+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Release|Any CPU.ActiveCfg = Release|Any CPU
289+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Release|Any CPU.Build.0 = Release|Any CPU
290+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Release|x64.ActiveCfg = Release|Any CPU
291+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Release|x64.Build.0 = Release|Any CPU
292+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Release|x86.ActiveCfg = Release|Any CPU
293+
{24B0C12F-38CD-4245-8785-87BEFAD55B00}.Release|x86.Build.0 = Release|Any CPU
279294
{71287D6F-6C3B-44B4-9FCA-E78FE3F02289}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
280295
{71287D6F-6C3B-44B4-9FCA-E78FE3F02289}.Debug|Any CPU.Build.0 = Debug|Any CPU
281296
{71287D6F-6C3B-44B4-9FCA-E78FE3F02289}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -358,6 +373,7 @@ Global
358373
{0E0B5C51-F7E2-4F40-A4E4-DED0E9731DC9} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
359374
{83FF097C-C8C6-477B-9FAB-DF99B84978B5} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
360375
{60334658-BE51-43B3-9C4D-F2BBF56C89CE} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
376+
{24B0C12F-38CD-4245-8785-87BEFAD55B00} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
361377
{71287D6F-6C3B-44B4-9FCA-E78FE3F02289} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
362378
{B693DE14-BB28-496F-AB39-B4E674ABCA80} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
363379
{5ADAA902-5A75-4ECB-B4B4-03291D63CE9C} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}

0 commit comments

Comments
 (0)