Objectives
++ The goal of this library is to simplify the development of APIs that leverage the full range of features provided by the JSON:API specification. + You just need to focus on defining the resources and implementing your custom business logic. +
JsonApiDotNetCore
-A framework for building JSON:API compliant REST APIs using .NET Core and Entity Framework Core. Includes support for Atomic Operations.
- Read more - Getting started - Contribute on GitHub -
Eliminate boilerplate
+We strive to eliminate as much boilerplate as possible by offering out-of-the-box features such as sorting, filtering and pagination.
+Extensibility
+This library has been designed around dependency injection, making extensibility incredibly easy.
+Features
+The following features are supported, from HTTP all the way down to the database
+Filtering
+Perform compound filtering using the filter
query string parameter
Objectives
-- The goal of this library is to simplify the development of APIs that leverage the full range of features provided by the JSON:API specification. - You just need to focus on defining the resources and implementing your custom business logic. -
-Eliminate boilerplate
-We strive to eliminate as much boilerplate as possible by offering out-of-the-box features such as sorting, filtering and pagination.
-Extensibility
-This library has been designed around dependency injection, making extensibility incredibly easy.
-Sorting
+Order resources on one or multiple attributes using the sort
query string parameter
Features
-The following features are supported, from HTTP all the way down to the database
-Filtering
-Perform compound filtering using the filter
query string parameter
Sorting
-Order resources on one or multiple attributes using the sort
query string parameter
Pagination
-Leverage the benefits of paginated resources with the page
query string parameter
Sparse fieldset selection
-Get only the data that you need using the fields
query string parameter
Relationship inclusion
-Side-load related resources of nested relationships using the include
query string parameter
Security
-Configure permissions, such as view/create/change/sort/filter of attributes and relationships
-Validation
-Validate incoming requests using built-in ASP.NET Core ModelState
validation, which works seamlessly with partial updates
Customizable
-Use various extensibility points to intercept and run custom code, besides just model annotations
-Example usage
-Expose resources with attributes and relationships
+Pagination
+Leverage the benefits of paginated resources with the page
query string parameter
Resource
-+
Sparse fieldset selection
+Get only the data that you need using the fields
query string parameter
Relationship inclusion
+Side-load related resources of nested relationships using the include
query string parameter
Security
+Configure permissions, such as view/create/change/sort/filter of attributes and relationships
+Validation
+Validate incoming requests using built-in ASP.NET Core ModelState
validation, which works seamlessly with partial updates
Customizable
+Use various extensibility points to intercept and run custom code, besides just model annotations
+Example usage
+Expose resources with attributes and relationships
+Resource
+
#nullable enable
public class Article : Identifiable<long>
@@ -172,31 +172,26 @@ Resource
[HasMany]
public ICollection<Tag> Tags { get; set; } = new HashSet<Tag>();
}
-
- Request
-
-
-GET /articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields[articles]=title,summary&include=author HTTP/1.1
-
-
- Request
+GET /articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields[articles]=title,summary&include=author HTTP/1.1
Response
-
-
-{
+
Response
+
+{
"meta": {
"totalResources": 1
},
@@ -252,31 +247,54 @@ Response
]
}
-
-