File tree Expand file tree Collapse file tree 1 file changed +2
-75
lines changed
Expand file tree Collapse file tree 1 file changed +2
-75
lines changed Original file line number Diff line number Diff line change 22
33JSON API Spec Conformance: ** Non Conforming**
44
5+ Go [ here] ( https://github.com/Research-Institute/json-api-dotnet-core/wiki/Request-Examples ) to see examples of HTTP requests and responses
6+
57## Usage
68
79- Configure the service:
@@ -23,81 +25,6 @@ services.AddJsonApi(config => {
2325app.UseJsonApi();
2426```
2527
26- ## Example Requests
27-
28- ### GET TodoItems
29-
30- Request:
31-
32- ```
33- curl -X GET
34- -H "Content-Type: application/vnd.api+json"
35- "http://localhost:5000/api/v1/todoItems/"
36- ```
37-
38- Response:
39-
40- ```
41- {
42- "links": {
43- "self": "http://localhost:5000/api/v1/todoItems/"
44- },
45- "data": [
46- {
47- "type": "todoItems",
48- "id": "2",
49- "attributes": {
50- "name": "Something To Do"
51- },
52- "relationships": {
53- "owner": {
54- "self": "http://localhost:5000/api/v1/todoItems/2/relationships/owner",
55- "related": "http://localhost:5000/api/v1/todoItems/2/owner"
56- }
57- },
58- "links": {
59- "self": "http://localhost:5000/api/v1/todoItems/2"
60- }
61- }
62- ]
63- }
64- ```
65-
66- ### Get People/{id}
67- Request:
68-
69- ```
70- curl -X GET
71- -H "Content-Type: application/vnd.api+json"
72- "http://localhost:5000/api/v1/people/1"
73- ```
74-
75- Response:
76-
77- ```
78- {
79- "links": {
80- "self": "http://localhost:5000/api/v1/people/1"
81- },
82- "data": {
83- "type": "people",
84- "id": "1",
85- "attributes": {
86- "name": "Captain Obvious"
87- },
88- "relationships": {
89- "todoItems": {
90- "self": "http://localhost:5000/api/v1/people/1/relationships/todoItems",
91- "related": "http://localhost:5000/api/v1/people/1/todoItems"
92- }
93- },
94- "links": {
95- "self": "http://localhost:5000/api/v1/people/1"
96- }
97- }
98- }
99- ```
100-
10128## References
10229[ JsonApi Specification] ( http://jsonapi.org/ )
10330
You can’t perform that action at this time.
0 commit comments