A framework for building json:api 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.
These are some steps you can take to help you understand what this project is and how you can use it:
- What is json:api and why should I use it?
- The json:api specification
- Demo [Video]
- Our documentation
- Check out the examples in the next section
See the examples directory for up-to-date sample applications. There is also a Todo List App that includes a JADNC API and an EmberJs client.
See the documentation for detailed usage.
public class Article : Identifiable
{
[Attr("name")]
public string Name { get; set; }
}
public class ArticlesController : JsonApiController<Article>
{
public ArticlesController(
IJsonApiContext jsonApiContext,
IResourceService<Article> resourceService)
: base(jsonApiContext, resourceService) { }
}
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services) {
services.AddJsonApi<AppDbContext>();
// ...
}
public void Configure(IApplicationBuilder app) {
app.UseJsonApi()
// ...
}
}