You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Naming consistency: our framework is called JsonApiDotNetCore and the spec it implements is called JSON:API (in this casing)
* Fixed: invalid reference (was pointing to the member itself instead of the class)
[](https://gitter.im/json-api-dotnet-core/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A framework for building [json:api](http://jsonapi.org/) compliant web APIs. 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.
14
+
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.
14
15
15
16
## Getting Started
16
17
17
18
These are some steps you can take to help you understand what this project is and how you can use it:
18
19
19
-
-[What is json:api and why should I use it?](https://nordicapis.com/the-benefits-of-using-json-api/)
<h2>A framework for building <ahref="https://jsonapi.org/" target="_blank">json:api</a> compliant REST APIs using .NET Core and Entity Framework Core</h2>
24
+
<h1>JsonApiDotNetCore</h1>
25
+
<h2>A framework for building <ahref="https://jsonapi.org/" target="_blank">JSON:API</a> compliant REST APIs using .NET Core and Entity Framework Core</h2>
<ahref="https://github.com/json-api-dotnet/JsonApiDotNetCore/" target="_blank" class="btn-get-started">Contribute on GitHub</a>
@@ -43,7 +43,7 @@ <h2>A framework for building <a href="https://jsonapi.org/" target="_blank">json
43
43
<divclass="col-lg-6 pt-5 pt-lg-0">
44
44
<h3data-aos="fade-up">Objectives</h3>
45
45
<pdata-aos="fade-up" data-aos-delay="100">
46
-
The goal of this library is to simplify the development of APIs that leverage the full range of features provided by the <ahref="https://jsonapi.org/" target="_blank">json:api</a> specification.
46
+
The goal of this library is to simplify the development of APIs that leverage the full range of features provided by the <ahref="https://jsonapi.org/" target="_blank">JSON:API</a> specification.
47
47
You just need to focus on defining the resources and implementing your custom business logic.
Copy file name to clipboardExpand all lines: docs/usage/errors.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Errors returned will contain only the properties that are set on the `Error` class. Custom fields can be added through `Error.Meta`.
4
4
You can create a custom error by throwing a `JsonApiException` (which accepts an `Error` instance), or returning an `Error` instance from an `ActionResult` in a controller.
5
-
Please keep in mind that json:api requires Title to be a generic message, while Detail should contain information about the specific problem occurence.
5
+
Please keep in mind that JSON:API requires Title to be a generic message, while Detail should contain information about the specific problem occurence.
6
6
7
7
From a controller method:
8
8
```c#
@@ -22,7 +22,7 @@ throw new JsonApiException(new Error(HttpStatusCode.Conflict)
22
22
});
23
23
```
24
24
25
-
In both cases, the middleware will properly serialize it and return it as a json:api error.
25
+
In both cases, the middleware will properly serialize it and return it as a JSON:API error.
If you would like to allow unknown query string parameters (parameters not reserved by the json:api specification or registered using resource definitions), you can set `AllowUnknownQueryStringParameters = true`. When set to `false` (the default), an HTTP 400 Bad Request is returned for unknown query string parameters.
67
+
If you would like to allow unknown query string parameters (parameters not reserved by the JSON:API specification or registered using resource definitions), you can set `AllowUnknownQueryStringParameters = true`. When set to `false` (the default), an HTTP 400 Bad Request is returned for unknown query string parameters.
Copy file name to clipboardExpand all lines: docs/usage/resource-graph.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
_NOTE: prior to v4 this was called the `ContextGraph`_
4
4
5
-
The `ResourceGraph` is a map of all the json:api resources and their relationships that your API serves.
5
+
The `ResourceGraph` is a map of all the JSON:API resources and their relationships that your API serves.
6
6
7
7
It is built at app startup and available as a singleton through Dependency Injection.
8
8
@@ -21,7 +21,7 @@ is prioritized by the list above in descending order.
21
21
### Auto-discovery
22
22
23
23
Auto-discovery refers to the process of reflecting on an assembly and
24
-
detecting all of the json:api resources, resource definitions, resource services and repositories.
24
+
detecting all of the JSON:API resources, resource definitions, resource services and repositories.
25
25
26
26
The following command builds the resource graph using all `IIdentifiable` implementations and registers the services mentioned.
27
27
You can enable auto-discovery for the current assembly by adding the following to your `Startup` class.
@@ -73,7 +73,7 @@ public void ConfigureServices(IServiceCollection services)
73
73
74
74
## Resource Name
75
75
76
-
The public resource name is exposed through the `type` member in the json:api payload. This can be configured by the following approaches (in order of priority):
76
+
The public resource name is exposed through the `type` member in the JSON:API payload. This can be configured by the following approaches (in order of priority):
77
77
78
78
1. The `publicName` parameter when manually adding a resource to the graph
Copy file name to clipboardExpand all lines: docs/usage/resources/attributes.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ public class Person : Identifiable
29
29
30
30
_since v4.0_
31
31
32
-
Default json:api attribute capabilities are specified in @JsonApiDotNetCore.Configuration.JsonApiOptions#JsonApiDotNetCore_Configuration_JsonApiOptions_DefaultAttrCapabilities:
32
+
Default JSON:API attribute capabilities are specified in @JsonApiDotNetCore.Configuration.JsonApiOptions#JsonApiDotNetCore_Configuration_JsonApiOptions_DefaultAttrCapabilities:
33
33
34
34
```c#
35
35
options.DefaultAttrCapabilities=AttrCapabilities.None; // default: All
Copy file name to clipboardExpand all lines: docs/usage/resources/relationships.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ public class TodoItem : Identifiable
77
77
78
78
_since v4.0_
79
79
80
-
Your resource may expose a calculated property, whose value depends on a related entity that is not exposed as a json:api resource.
80
+
Your resource may expose a calculated property, whose value depends on a related entity that is not exposed as a JSON:API resource.
81
81
So for the calculated property to be evaluated correctly, the related entity must always be retrieved. You can achieve that using `EagerLoad`, for example:
Copy file name to clipboardExpand all lines: docs/usage/resources/resource-definitions.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ For various reasons (see examples below) you may need to change parts of the que
13
13
`JsonApiResourceDefinition<TResource>` (which is an empty implementation of `IResourceDefinition<TResource>`) provides overridable methods that pass you the result of query string parameter parsing.
14
14
The value returned by you determines what will be used to execute the query.
15
15
16
-
An intermediate format (`QueryExpression` and derived types) is used, which enables us to separate json:api implementation
16
+
An intermediate format (`QueryExpression` and derived types) is used, which enables us to separate JSON:API implementation
17
17
from Entity Framework Core `IQueryable` execution.
Copy file name to clipboardExpand all lines: docs/usage/routing.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Which results in URLs like: https://yourdomain.com/api/v1/people
14
14
15
15
## Default Routing Convention
16
16
17
-
The library will configure routes for all controllers in your project. By default, routes are camel-cased. This is based on the [recommendations](https://jsonapi.org/recommendations/) outlined in the json:api spec.
17
+
The library will configure routes for all controllers in your project. By default, routes are camel-cased. This is based on the [recommendations](https://jsonapi.org/recommendations/) outlined in the JSON:API spec.
18
18
19
19
```c#
20
20
publicclassOrderLine : Identifiable { }
@@ -35,7 +35,7 @@ GET /orderLines HTTP/1.1
35
35
36
36
The exposed name of the resource ([which can be customized](~/usage/resource-graph.md#resource-name)) is used for the route, instead of the controller name.
37
37
38
-
### Non-json:api controllers
38
+
### Non-JSON:API controllers
39
39
40
40
If a controller does not inherit from `JsonApiController<TResource>`, the [configured naming convention](~/usage/options.md#custom-serializer-settings) is applied to the name of the controller.
41
41
```c#
@@ -69,4 +69,4 @@ public void ConfigureServices(IServiceCollection services)
0 commit comments