Skip to content

Commit bf48d7f

Browse files
committed
Merge branch 'master' into develop
2 parents 3e25381 + 676b654 commit bf48d7f

File tree

238 files changed

+12769
-20839
lines changed

Some content is hidden

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

238 files changed

+12769
-20839
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,6 @@ _Pvt_Extensions
234234

235235
# FAKE - F# Make
236236
.fake/
237+
238+
### Rider ###
239+
.idea/

JsonApiDotnetCore.sln

+20-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 15
3-
VisualStudioVersion = 15.0.27130.2010
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.28606.126
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore", "src\JsonApiDotNetCore\JsonApiDotNetCore.csproj", "{C0EC9E70-EB2E-436F-9D94-FA16FA774123}"
66
EndProject
@@ -10,7 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7A2B7ADD-ECB
1010
EndProject
1111
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}"
1212
EndProject
13-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreExampleTests", "test\JsonApiDotNetCoreExampleTests\JsonApiDotNetCoreExampleTests.csproj", "{0B959765-40D2-43B5-87EE-FE2FEF9DBED5}"
13+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonApiDotNetCoreExampleTests", "test\JsonApiDotNetCoreExampleTests\JsonApiDotNetCoreExampleTests.csproj", "{0B959765-40D2-43B5-87EE-FE2FEF9DBED5}"
1414
EndProject
1515
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C5B4D998-CECB-454D-9F32-085A897577BE}"
1616
ProjectSection(SolutionItems) = preProject
@@ -41,13 +41,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OperationsExample", "src\Ex
4141
EndProject
4242
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OperationsExampleTests", "test\OperationsExampleTests\OperationsExampleTests.csproj", "{9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}"
4343
EndProject
44-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEntitySeparationExample", "src\Examples\ResourceEntitySeparationExample\ResourceEntitySeparationExample.csproj", "{F4097194-9415-418A-AB4E-315C5D5466AF}"
44+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ResourceEntitySeparationExample", "src\Examples\ResourceEntitySeparationExample\ResourceEntitySeparationExample.csproj", "{F4097194-9415-418A-AB4E-315C5D5466AF}"
4545
EndProject
46-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEntitySeparationExampleTests", "test\ResourceEntitySeparationExampleTests\ResourceEntitySeparationExampleTests.csproj", "{6DFA30D7-1679-4333-9779-6FB678E48EF5}"
46+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ResourceEntitySeparationExampleTests", "test\ResourceEntitySeparationExampleTests\ResourceEntitySeparationExampleTests.csproj", "{6DFA30D7-1679-4333-9779-6FB678E48EF5}"
4747
EndProject
48-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted", "src\Examples\GettingStarted\GettingStarted.csproj", "{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}"
48+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GettingStarted", "src\Examples\GettingStarted\GettingStarted.csproj", "{DF9BFD82-D937-4907-B0B4-64670417115F}"
4949
EndProject
50-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscoveryTests", "test\DiscoveryTests\DiscoveryTests.csproj", "{09C0C8D8-B721-4955-8889-55CB149C3B5C}"
50+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscoveryTests", "test\DiscoveryTests\DiscoveryTests.csproj", "{09C0C8D8-B721-4955-8889-55CB149C3B5C}"
5151
EndProject
5252
Global
5353
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -191,18 +191,18 @@ Global
191191
{6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x64.Build.0 = Release|Any CPU
192192
{6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x86.ActiveCfg = Release|Any CPU
193193
{6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x86.Build.0 = Release|Any CPU
194-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
195-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Debug|Any CPU.Build.0 = Debug|Any CPU
196-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Debug|x64.ActiveCfg = Debug|Any CPU
197-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Debug|x64.Build.0 = Debug|Any CPU
198-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Debug|x86.ActiveCfg = Debug|Any CPU
199-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Debug|x86.Build.0 = Debug|Any CPU
200-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Release|Any CPU.ActiveCfg = Release|Any CPU
201-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Release|Any CPU.Build.0 = Release|Any CPU
202-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Release|x64.ActiveCfg = Release|Any CPU
203-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Release|x64.Build.0 = Release|Any CPU
204-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Release|x86.ActiveCfg = Release|Any CPU
205-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71}.Release|x86.Build.0 = Release|Any CPU
194+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
195+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|Any CPU.Build.0 = Debug|Any CPU
196+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x64.ActiveCfg = Debug|Any CPU
197+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x64.Build.0 = Debug|Any CPU
198+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x86.ActiveCfg = Debug|Any CPU
199+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x86.Build.0 = Debug|Any CPU
200+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Release|Any CPU.ActiveCfg = Release|Any CPU
201+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Release|Any CPU.Build.0 = Release|Any CPU
202+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x64.ActiveCfg = Release|Any CPU
203+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x64.Build.0 = Release|Any CPU
204+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x86.ActiveCfg = Release|Any CPU
205+
{DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x86.Build.0 = Release|Any CPU
206206
{09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
207207
{09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
208208
{09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -233,7 +233,6 @@ Global
233233
{9CD2C116-D133-4FE4-97DA-A9FEAFF045F1} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
234234
{F4097194-9415-418A-AB4E-315C5D5466AF} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
235235
{6DFA30D7-1679-4333-9779-6FB678E48EF5} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
236-
{9B2A5AD7-0BF4-472E-A1B4-8BB623FDEB71} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
237236
{09C0C8D8-B721-4955-8889-55CB149C3B5C} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
238237
EndGlobalSection
239238
GlobalSection(ExtensibilityGlobals) = postSolution

README.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ These are some steps you can take to help you understand what this project is an
1919
- [What is json:api and why should I use it?](https://nordicapis.com/the-benefits-of-using-json-api/)
2020
- [The json:api specification](http://jsonapi.org/format/)
2121
- [Demo [Video]](https://youtu.be/KAMuo6K7VcE)
22-
- [Our documentation](https://json-api-dotnet.github.io)
22+
- [Our documentation](https://json-api-dotnet.github.io/JsonApiDotNetCore/)
2323
- [Check out the example projects](https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/master/src/Examples)
24+
- [Embercasts: Full Stack Ember with ASP .NET Core](https://www.embercasts.com/course/full-stack-ember-with-dotnet/watch/whats-in-this-course-cs)
2425

2526
## Related Projects
2627

@@ -90,12 +91,7 @@ Running tests locally requires access to a postgresql database.
9091
If you have docker installed, this can be propped up via:
9192

9293
```bash
93-
docker run --rm --name jsonapi-dotnet-core-testing \
94-
-e POSTGRES_DB=JsonApiDotNetCoreExample \
95-
-e POSTGRES_USER=postgres \
96-
-e POSTGRES_PASSWORD=postgres \
97-
-p 5432:5432 \
98-
postgres
94+
docker run --rm --name jsonapi-dotnet-core-testing -e POSTGRES_DB=JsonApiDotNetCoreExample -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres
9995
```
10096

10197
And then to run the tests:
@@ -110,4 +106,4 @@ Sometimes the compiled files can be dirty / corrupt from other branches / failed
110106

111107
```bash
112108
dotnet clean
113-
```
109+
```

appveyor.yml

+36
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,42 @@ environment:
99
PGUSER: postgres
1010
PGPASSWORD: Password12!
1111
Data:DefaultConnection: "Host=localhost;Port=5432;Database=JsonApiDotNetCoreExample;User ID=postgres;Password=Password12!"
12+
ACCESS_TOKEN:
13+
secure: g1T332Uarmdgtkftchpafa8tDP/7eM4O0BD6iu1wu+zR224IyH5R8pb4sTChr4Ia
14+
15+
# REF: https://github.com/docascode/docfx-seed/blob/master/appveyor.yml
16+
before_build:
17+
- ps: |
18+
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
19+
{
20+
git checkout $env:APPVEYOR_REPO_BRANCH -q
21+
choco install docfx -y
22+
}
23+
24+
after_build:
25+
- ps: |
26+
CD ./docs
27+
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
28+
{
29+
& docfx docfx.json
30+
if ($lastexitcode -ne 0){
31+
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
32+
}
33+
34+
git config --global credential.helper store
35+
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:ACCESS_TOKEN):[email protected]`n"
36+
git config --global user.email "[email protected]"
37+
git config --global user.name "Jared Nance"
38+
git config --global core.autocrlf false
39+
git config --global core.safecrlf false
40+
git clone https://github.com/json-api-dotnet/JsonApiDotNetCore.git -b gh-pages origin_site -q
41+
Copy-Item origin_site/.git _site -recurse
42+
CD _site
43+
git add -A 2>&1
44+
git commit -m "CI Updates" -q
45+
git push origin gh-pages -q
46+
echo "Documentation updated successfully."
47+
}
1248
1349
pull_requests:
1450
do_not_increment_build_number: true

benchmarks/Serialization/JsonApiDeserializer_Benchmarks.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,21 @@ public class JsonApiDeserializer_Benchmarks {
3232
private readonly JsonApiDeSerializer _jsonApiDeSerializer;
3333

3434
public JsonApiDeserializer_Benchmarks() {
35-
var contextGraphBuilder = new ContextGraphBuilder();
36-
contextGraphBuilder.AddResource<SimpleType>(TYPE_NAME);
37-
var contextGraph = contextGraphBuilder.Build();
35+
var resourceGraphBuilder = new ResourceGraphBuilder();
36+
resourceGraphBuilder.AddResource<SimpleType>(TYPE_NAME);
37+
var resourceGraph = resourceGraphBuilder.Build();
3838

3939
var jsonApiContextMock = new Mock<IJsonApiContext>();
4040
jsonApiContextMock.SetupAllProperties();
41-
jsonApiContextMock.Setup(m => m.ContextGraph).Returns(contextGraph);
41+
jsonApiContextMock.Setup(m => m.ResourceGraph).Returns(resourceGraph);
4242
jsonApiContextMock.Setup(m => m.AttributesToUpdate).Returns(new Dictionary<AttrAttribute, object>());
4343

4444
var jsonApiOptions = new JsonApiOptions();
4545
jsonApiOptions.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
4646
jsonApiContextMock.Setup(m => m.Options).Returns(jsonApiOptions);
4747

48-
var genericProcessorFactoryMock = new Mock<IGenericProcessorFactory>();
4948

50-
_jsonApiDeSerializer = new JsonApiDeSerializer(jsonApiContextMock.Object, genericProcessorFactoryMock.Object);
49+
_jsonApiDeSerializer = new JsonApiDeSerializer(jsonApiContextMock.Object);
5150
}
5251

5352
[Benchmark]

benchmarks/Serialization/JsonApiSerializer_Benchmarks.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public class JsonApiSerializer_Benchmarks {
1919
private readonly JsonApiSerializer _jsonApiSerializer;
2020

2121
public JsonApiSerializer_Benchmarks() {
22-
var contextGraphBuilder = new ContextGraphBuilder();
23-
contextGraphBuilder.AddResource<SimpleType>(TYPE_NAME);
24-
var contextGraph = contextGraphBuilder.Build();
22+
var resourceGraphBuilder = new ResourceGraphBuilder();
23+
resourceGraphBuilder.AddResource<SimpleType>(TYPE_NAME);
24+
var resourceGraph = resourceGraphBuilder.Build();
2525

2626
var jsonApiContextMock = new Mock<IJsonApiContext>();
2727
jsonApiContextMock.SetupAllProperties();
28-
jsonApiContextMock.Setup(m => m.ContextGraph).Returns(contextGraph);
28+
jsonApiContextMock.Setup(m => m.ResourceGraph).Returns(resourceGraph);
2929
jsonApiContextMock.Setup(m => m.AttributesToUpdate).Returns(new Dictionary<AttrAttribute, object>());
3030

3131
var jsonApiOptions = new JsonApiOptions();

docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_site/
2+
*.manifest

docs/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Running
2+
3+
```
4+
./generate.sh
5+
docfx ./docfx.json --serve
6+
```

docs/api/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
###############
2+
# temp file #
3+
###############
4+
*.yml

0 commit comments

Comments
 (0)