File tree 3 files changed +19
-19
lines changed
3 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 1
1
curl - s -f http:// localhost:14141 / api/ people `
2
2
- H " Content-Type: application/vnd.api+json" `
3
3
- d ' {
4
- \ "data\ ": {
5
- \ "type\ ": \ "people\ ",
6
- \ "attributes\ ": {
7
- \ "name\ ": \ "Alice\ "
4
+ "data": {
5
+ "type": "people",
6
+ "attributes": {
7
+ "name": "Alice"
8
8
}
9
9
}
10
10
}'
Original file line number Diff line number Diff line change 1
1
curl - s -f http:// localhost:14141 / api/ books `
2
2
- H " Content-Type: application/vnd.api+json" `
3
3
- d ' {
4
- \ "data\ ": {
5
- \ "type\ ": \ "books\ ",
6
- \ "attributes\ ": {
7
- \ "title\ ": \ "Valperga\ ",
8
- \ "publishYear\ ": 1823
4
+ "data": {
5
+ "type": "books",
6
+ "attributes": {
7
+ "title": "Valperga",
8
+ "publishYear": 1823
9
9
},
10
- \ "relationships\ ": {
11
- \ "author\ ": {
12
- \ "data\ ": {
13
- \ "type\ ": \ "people\ ",
14
- \ "id\ ": \"1\ "
10
+ "relationships": {
11
+ "author": {
12
+ "data": {
13
+ "type": "people",
14
+ "id": "1 "
15
15
}
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ curl -s -f http://localhost:14141/api/books/1 `
2
2
- H " Content-Type: application/vnd.api+json" `
3
3
- X PATCH `
4
4
- d ' {
5
- \ "data\ ": {
6
- \ "type\ ": \ "books\ ",
7
- \ "id\ ": \"1\ ",
8
- \ "attributes\ ": {
9
- \ "publishYear\ ": 1820
5
+ "data": {
6
+ "type": "books",
7
+ "id": "1 ",
8
+ "attributes": {
9
+ "publishYear": 1820
10
10
}
11
11
}
12
12
}'
You can’t perform that action at this time.
0 commit comments