Skip to content

Commit 0bdfc9c

Browse files
authored
Reorganize README (fix #1567)
1 parent ae5d0d1 commit 0bdfc9c

File tree

1 file changed

+56
-37
lines changed

1 file changed

+56
-37
lines changed

README.md

Lines changed: 56 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,23 @@
1-
<a href="https://www.jsonapi.net"><img src="docs/home/assets/img/logo.svg" style="height: 345px; width: 345px"/></a>
1+
<p align="center">
2+
<a href="https://www.jsonapi.net"><img src="docs/home/assets/img/logo.svg" style="height: 345px; width: 345px"/></a>
3+
</p>
24

35
# JsonApiDotNetCore
4-
A framework for building [JSON:API](http://jsonapi.org/) compliant REST APIs using .NET Core and Entity Framework Core. Includes support for [Atomic Operations](https://jsonapi.org/ext/atomic/).
6+
A framework for building [JSON:API](http://jsonapi.org/) compliant REST APIs using .NET Core and Entity Framework Core. Includes support for the [Atomic Operations](https://jsonapi.org/ext/atomic/) extension.
7+
8+
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.
59

610
[![Build](https://github.com/json-api-dotnet/JsonApiDotNetCore/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/json-api-dotnet/JsonApiDotNetCore/actions/workflows/build.yml?query=branch%3Amaster)
711
[![Coverage](https://codecov.io/gh/json-api-dotnet/JsonApiDotNetCore/branch/master/graph/badge.svg?token=pn036tWV8T)](https://codecov.io/gh/json-api-dotnet/JsonApiDotNetCore)
812
[![NuGet](https://img.shields.io/nuget/v/JsonApiDotNetCore.svg)](https://www.nuget.org/packages/JsonApiDotNetCore/)
913
[![Chat](https://badges.gitter.im/json-api-dotnet-core/Lobby.svg)](https://gitter.im/json-api-dotnet-core/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1014
[![FIRST-TIMERS](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
1115

12-
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.
13-
1416
## Getting Started
1517

16-
These are some steps you can take to help you understand what this project is and how you can use it:
17-
18-
### About
19-
- [What is JSON:API and why should I use it?](https://nordicapis.com/the-benefits-of-using-json-api/) (blog, 2017)
20-
- [Pragmatic JSON:API Design](https://www.youtube.com/watch?v=3jBJOga4e2Y) (video, 2017)
21-
- [JSON:API and JsonApiDotNetCore](https://www.youtube.com/watch?v=79Oq0HOxyeI) (video, 2021)
22-
- [JsonApiDotNetCore Release 4.0](https://dev.to/wunki/getting-started-5dkl) (blog, 2020)
23-
- [JSON:API, .Net Core, EmberJS](https://youtu.be/KAMuo6K7VcE) (video, 2017)
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) (paid course, 2017)
25-
26-
### Official documentation
27-
- [The JSON:API specification](https://jsonapi.org/format/)
28-
- [JsonApiDotNetCore website](https://www.jsonapi.net/)
29-
- [Roadmap](ROADMAP.md)
30-
31-
## Related Projects
32-
33-
- [Performance Reports](https://github.com/json-api-dotnet/PerformanceReports)
34-
- [JsonApiDotNetCore.MongoDb](https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb)
35-
- [Ember.js Todo List App](https://github.com/json-api-dotnet/TodoListExample)
36-
37-
## Examples
38-
39-
See the [examples](https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/master/src/Examples) directory for up-to-date sample applications. There is also a [Todo List App](https://github.com/json-api-dotnet/TodoListExample) that includes a JsonApiDotNetCore API and an EmberJs client.
40-
41-
## Installation and Usage
42-
43-
See [our documentation](https://www.jsonapi.net/) for detailed usage.
44-
45-
### Models
18+
First declare you models
4619

4720
```c#
48-
#nullable enable
49-
5021
[Resource]
5122
public class Article : Identifiable<int>
5223
{
@@ -55,7 +26,7 @@ public class Article : Identifiable<int>
5526
}
5627
```
5728

58-
### Middleware
29+
then add the middlewares
5930

6031
```c#
6132
// Program.cs
@@ -69,6 +40,54 @@ app.UseJsonApi();
6940
app.MapControllers();
7041
```
7142

43+
finally you can query your JSON:API
44+
45+
```
46+
$ curl -i http://localhost:18574/authors
47+
48+
HTTP/1.1 200 OK
49+
Content-Type: application/vnd.api+json
50+
ETag: "078F7A2A7D0B3C0B56952AD3E35E5908"
51+
52+
{
53+
"links": {
54+
"self": "http://localhost:18574/authors",
55+
"first": "http://localhost:18574/authors"
56+
},
57+
"data": [
58+
{
59+
"type": "authors",
60+
"id": "8977e0ab-4af8-418b-8859-a3d7a22367d7",
61+
"attributes": { "name": "William Shakespeare" },
62+
"links": { "self": "http://localhost:18574/authors/8977e0ab-4af8-418b-8859-a3d7a22367d7" }
63+
}
64+
]
65+
}
66+
```
67+
68+
See [our documentation](https://www.jsonapi.net/) for detailed usage and the [examples](https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/master/src/Examples) directory for up-to-date sample applications.
69+
70+
## Resources
71+
72+
### About
73+
- [What is JSON:API and why should I use it?](https://nordicapis.com/the-benefits-of-using-json-api/) (blog, 2017)
74+
- [Pragmatic JSON:API Design](https://www.youtube.com/watch?v=3jBJOga4e2Y) (video, 2017)
75+
- [JSON:API and JsonApiDotNetCore](https://www.youtube.com/watch?v=79Oq0HOxyeI) (video, 2021)
76+
- [JsonApiDotNetCore Release 4.0](https://dev.to/wunki/getting-started-5dkl) (blog, 2020)
77+
- [JSON:API, .Net Core, EmberJS](https://youtu.be/KAMuo6K7VcE) (video, 2017)
78+
- [Embercasts: Full Stack Ember with ASP.NET Core](https://www.embercasts.com/course/full-stack-ember-with-dotnet/watch/whats-in-this-course-cs) (paid course, 2017)
79+
80+
### Official documentation
81+
- [The JSON:API specification](https://jsonapi.org/format/)
82+
- [JsonApiDotNetCore website](https://www.jsonapi.net/)
83+
- [Roadmap](ROADMAP.md)
84+
85+
### Related Projects
86+
87+
- [Performance Reports](https://github.com/json-api-dotnet/PerformanceReports)
88+
- [JsonApiDotNetCore.MongoDb](https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb)
89+
- [Ember.js Todo List App](https://github.com/json-api-dotnet/TodoListExample)
90+
7291
## Compatibility
7392

7493
The following chart should help you pick the best version, based on your environment.

0 commit comments

Comments
 (0)