Skip to content

Commit 54cd090

Browse files
author
Bart Koelman
authored
Another pass over documentation (#770)
Another pass over documentation
1 parent 47d25a5 commit 54cd090

File tree

11 files changed

+34
-31
lines changed

11 files changed

+34
-31
lines changed

docs/getting-started/install.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
Click [here](https://www.nuget.org/packages/JsonApiDotnetCore/) for the latest NuGet version.
44

5+
### CLI
56
```
67
dotnet add package JsonApiDotnetCore
78
```
89

10+
### Visual Studio
911
```powershell
1012
Install-Package JsonApiDotnetCore
1113
```
1214

15+
### *.csproj
1316
```xml
1417
<ItemGroup>
1518
<!-- Be sure to check NuGet for the latest version # -->

docs/index.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# JSON API .Net Core
1+
# JsonApiDotNetCore
22

3-
A [{ json:api }](https://jsonapi.org) web application framework for .Net Core.
3+
A [json:api](https://jsonapi.org) web application framework for .NET Core.
44

55
## Objectives
66

77
### 1. Eliminate Boilerplate
88

9-
The goal of this package is to facility the development of json:api applications that leverage the full range
10-
of features provided by the specification.
9+
The goal of this package is to facilitate the development of APIs that leverage the full range
10+
of features provided by the json:api specification.
1111

12-
Eliminate CRUD boilerplate and provide the following features across all your resource endpoints:
12+
Eliminate CRUD boilerplate and provide the following features across your resource endpoints, from HTTP all the way down to the database:
1313

14-
- Relationship inclusion and navigation
1514
- Filtering
1615
- Sorting
1716
- Pagination
1817
- Sparse field selection
19-
- Checkout the [example requests](request-examples) to see the kind of features you will get out of the box
18+
- Relationship inclusion and navigation
19+
20+
Checkout the [example requests](request-examples) to see the kind of features you will get out of the box.
2021

2122
### 2. Extensibility
2223

23-
This library relies heavily on an open-generic-based dependency injection model which allows for easy per-resource customization.
24+
This library relies heavily on an open-generic-based dependency injection model, which allows for easy per-resource customization.
2425

docs/usage/extensibility/custom-query-formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Custom Query Formats
22

3-
For information on the default query parameter formats, see the documentation for each query method.
3+
For information on the default query string parameter formats, see the documentation for each query method.
44

55
In order to customize the query formats, you need to implement the `IQueryParameterParser` interface and inject it.
66

docs/usage/extensibility/layer-overview.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void ConfigureServices(IServiceCollection services)
3535
services.AddResourceService<FooService>();
3636

3737
// custom repository
38-
services.AddScoped<AFooRepository>();
38+
services.AddScoped<FooRepository>();
3939
}
4040
```
4141

@@ -46,11 +46,9 @@ Prior to v3.0.0 you could do it like so:
4646
public void ConfigureServices(IServiceCollection services)
4747
{
4848
// custom service
49-
services.AddScoped<IResourceRepository<Foo>, FooService>();
49+
services.AddScoped<IResourceService<Foo>, FooService>();
5050

5151
// custom repository
52-
services.AddScoped<IResourceRepository<Foo>, FooService>();
53-
54-
// ...
52+
services.AddScoped<IResourceRepository<Foo>, FooRepository>();
5553
}
5654
```

docs/usage/extensibility/services.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ IResourceService
9191
|
9292
+-- IResourceQueryService
9393
| |
94-
¦ +-- IGetAllService
95-
¦ ¦ GET /
94+
| +-- IGetAllService
95+
| | GET /
9696
| |
97-
¦ +-- IGetByIdService
97+
| +-- IGetByIdService
9898
| | GET /{id}
9999
| |
100-
¦ +-- IGetRelationshipService
100+
| +-- IGetRelationshipService
101101
| | GET /{id}/{relationship}
102102
| |
103-
¦ +-- IGetRelationshipsService
103+
| +-- IGetRelationshipsService
104104
| GET /{id}/relationships/{relationship}
105105
|
106106
+-- IResourceCommandService

docs/usage/filtering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Filtering
22

3-
Resources can be filtered by attributes using the `filter` query parameter.
3+
Resources can be filtered by attributes using the `filter` query string parameter.
44
By default, all attributes are filterable.
55
The filtering strategy we have selected, uses the following form.
66

@@ -35,7 +35,7 @@ GET /api/articles?filter[ordinal]=gt:1,lt:100 HTTP/1.1
3535
GET /api/articles?filter[ordinal]=gt:1&filter[ordinal]=lt:100 HTTP/1.1
3636
```
3737

38-
Aside from filtering on the resource being requested (top-level), filtering on single-depth related resources that are being included can be done too.
38+
Aside from filtering on the resource being requested (top-level), filtering on single-depth related resources can be done too.
3939

4040
```http
4141
GET /api/articles?include=author&filter[title]=like:marketing&filter[author.lastName]=Smith HTTP/1.1

docs/usage/options.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Startup
1616
}
1717
```
1818

19-
## Client Generated Ids
19+
## Client Generated IDs
2020

2121
By default, the server will respond with a 403 Forbidden HTTP Status Code if a POST request is received with a client-generated ID.
2222

@@ -36,6 +36,7 @@ You can also include the total number of records in each request. Note that when
3636
options.DefaultPageSize = 25;
3737
options.MaximumPageSize = 100;
3838
options.MaximumPageNumber = 50;
39+
options.IncludeTotalRecordCount = true;
3940
```
4041

4142
## Relative Links

docs/usage/resources/resource-definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class AccountDefinition : ResourceDefinition<Account>
9292

9393
_since v3.0.0_
9494

95-
You can define additional query parameters and the query that should be used.
95+
You can define additional query string parameters and the query that should be used.
9696
If the key is present in a filter request, the supplied query will be used rather than the default behavior.
9797

9898
```c#

docs/usage/routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Routing
22

33
By default the library will configure routes for each controller.
4-
Based on the recommendations outlined in the json:api spec, routes are camel-cased.
4+
Based on the [recommendations](https://jsonapi.org/recommendations/) outlined in the json:api spec, routes are camel-cased.
55

66
```http
77
GET /api/compoundModels HTTP/1.1

docs/usage/sparse-field-selection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sparse Field Selection
22

3-
As an alternative to returning all attributes from a resource, the fields query parameter can be used to select only a subset.
3+
As an alternative to returning all attributes from a resource, the `fields` query string parameter can be used to select only a subset.
44
This can be used on the resource being requested (top-level), as well as on single-depth related resources that are being included.
55

66
Top-level example:

docs/usage/toc.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
## [Resource Definitions](resources/resource-definitions.md)
55

66
# [Resource Graph](resource-graph.md)
7-
# [Metadata](meta.md)
8-
# [Filtering](filtering.md)
97
# [Options](options.md)
10-
# [Errors](errors.md)
11-
# [Including Relationships](including-relationships.md)
12-
# [Pagination](pagination.md)
13-
# [Routing](routing.md)
8+
# [Filtering](filtering.md)
149
# [Sorting](sorting.md)
10+
# [Pagination](pagination.md)
1511
# [Sparse Field Selection](sparse-field-selection.md)
12+
# [Including Relationships](including-relationships.md)
13+
# [Routing](routing.md)
14+
# [Errors](errors.md)
15+
# [Metadata](meta.md)
1616

1717
# Extensibility
1818
## [Layer Overview](extensibility/layer-overview.md)

0 commit comments

Comments
 (0)