jsonapi-serializers 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0218413bec5edb7e7793360856d93a507c4ff6a3
4
- data.tar.gz: 6a363b7e853a348168aa9bb8d6f6018254d88ee6
3
+ metadata.gz: 8ed468d4f475c6f5cc477c9089298f2d25150d3b
4
+ data.tar.gz: 01666903a3ab5543c0ec31507945a58082d9f98e
5
5
  SHA512:
6
- metadata.gz: af9bb1074fe08168f70b1c5ecb1907aa34683fea230609e3334d974a4c45e9add97fb8492271cb3b488eb11ae2a5ca71528456f1437289a5302905de767c6bcf
7
- data.tar.gz: 8eebd11b6ae280466788c87836156dcfe15b078b4eb27a24b3f3568cc90d0e8d460226045edaf5958bcee9f025ee01274fd926a6bad1650de609d21d9bf3ae62
6
+ metadata.gz: 2286b179a75007f1e48922c3067bdf74316753d1390cec68b6605480e258cbceb3a1da616777977975c741da9873e77a10616f0a585105280a415e973e06d72e
7
+ data.tar.gz: 82109f3851e69a7a05697a4c5876182bfab4740dc44d21a30604ea637e895044b2d64fba8dbb57e816712738a91f89872f49b10ba35649d2a4090f4b5997b821
data/README.md CHANGED
@@ -280,7 +280,7 @@ Returns:
280
280
  "relationships": {
281
281
  "author": {
282
282
  "links": {
283
- "self": "/posts/1/links/author",
283
+ "self": "/posts/1/relationships/author",
284
284
  "related": "/posts/1/author"
285
285
  },
286
286
  "data": {
@@ -290,7 +290,7 @@ Returns:
290
290
  },
291
291
  "comments": {
292
292
  "links": {
293
- "self": "/posts/1/links/comments",
293
+ "self": "/posts/1/relationships/comments",
294
294
  "related": "/posts/1/comments"
295
295
  },
296
296
  "data": [
@@ -326,7 +326,7 @@ Returns:
326
326
  "relationships": {
327
327
  "user": {
328
328
  "links": {
329
- "self": "/comments/1/links/user",
329
+ "self": "/comments/1/relationships/user",
330
330
  "related": "/comments/1/user"
331
331
  },
332
332
  "data": {
@@ -336,7 +336,7 @@ Returns:
336
336
  },
337
337
  "post": {
338
338
  "links": {
339
- "self": "/comments/1/links/post",
339
+ "self": "/comments/1/relationships/post",
340
340
  "related": "/comments/1/post"
341
341
  }
342
342
  }
@@ -434,6 +434,7 @@ end
434
434
 
435
435
  ## Release notes
436
436
 
437
+ * v0.2.1: Compliance fix for self links.
437
438
  * v0.2.0: Initial release with support for the final v1 JSON API spec.
438
439
 
439
440
  ## Contributing
@@ -69,7 +69,7 @@ module JSONAPI
69
69
  end
70
70
 
71
71
  def relationship_self_link(attribute_name)
72
- "#{self_link}/links/#{format_name(attribute_name)}"
72
+ "#{self_link}/relationships/#{format_name(attribute_name)}"
73
73
  end
74
74
 
75
75
  def relationship_related_link(attribute_name)
@@ -1,5 +1,5 @@
1
1
  module JSONAPI
2
2
  module Serializer
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -43,13 +43,13 @@ describe JSONAPI::Serializer do
43
43
  'relationships' => {
44
44
  'user' => {
45
45
  'links' => {
46
- 'self' => '/long-comments/1/links/user',
46
+ 'self' => '/long-comments/1/relationships/user',
47
47
  'related' => '/long-comments/1/user',
48
48
  },
49
49
  },
50
50
  'post' => {
51
51
  'links' => {
52
- 'self' => '/long-comments/1/links/post',
52
+ 'self' => '/long-comments/1/relationships/post',
53
53
  'related' => '/long-comments/1/post',
54
54
  },
55
55
  },
@@ -96,13 +96,13 @@ describe JSONAPI::Serializer do
96
96
  # Both to-one and to-many links are present, but neither include linkage:
97
97
  'author' => {
98
98
  'links' => {
99
- 'self' => '/posts/1/links/author',
99
+ 'self' => '/posts/1/relationships/author',
100
100
  'related' => '/posts/1/author',
101
101
  },
102
102
  },
103
103
  'long-comments' => {
104
104
  'links' => {
105
- 'self' => '/posts/1/links/long-comments',
105
+ 'self' => '/posts/1/relationships/long-comments',
106
106
  'related' => '/posts/1/long-comments',
107
107
  },
108
108
  },
@@ -131,7 +131,7 @@ describe JSONAPI::Serializer do
131
131
  'relationships' => {
132
132
  'author' => {
133
133
  'links' => {
134
- 'self' => '/posts/1/links/author',
134
+ 'self' => '/posts/1/relationships/author',
135
135
  'related' => '/posts/1/author',
136
136
  },
137
137
  # Spec: Resource linkage MUST be represented as one of the following:
@@ -141,7 +141,7 @@ describe JSONAPI::Serializer do
141
141
  },
142
142
  'long-comments' => {
143
143
  'links' => {
144
- 'self' => '/posts/1/links/long-comments',
144
+ 'self' => '/posts/1/relationships/long-comments',
145
145
  'related' => '/posts/1/long-comments',
146
146
  },
147
147
  'data' => [],
@@ -169,7 +169,7 @@ describe JSONAPI::Serializer do
169
169
  'relationships' => {
170
170
  'author' => {
171
171
  'links' => {
172
- 'self' => '/posts/1/links/author',
172
+ 'self' => '/posts/1/relationships/author',
173
173
  'related' => '/posts/1/author',
174
174
  },
175
175
  # Spec: Resource linkage MUST be represented as one of the following:
@@ -182,7 +182,7 @@ describe JSONAPI::Serializer do
182
182
  },
183
183
  'long-comments' => {
184
184
  'links' => {
185
- 'self' => '/posts/1/links/long-comments',
185
+ 'self' => '/posts/1/relationships/long-comments',
186
186
  'related' => '/posts/1/long-comments',
187
187
  },
188
188
  'data' => [],
@@ -210,14 +210,14 @@ describe JSONAPI::Serializer do
210
210
  'relationships' => {
211
211
  'author' => {
212
212
  'links' => {
213
- 'self' => '/posts/1/links/author',
213
+ 'self' => '/posts/1/relationships/author',
214
214
  'related' => '/posts/1/author',
215
215
  },
216
216
  'data' => nil,
217
217
  },
218
218
  'long-comments' => {
219
219
  'links' => {
220
- 'self' => '/posts/1/links/long-comments',
220
+ 'self' => '/posts/1/relationships/long-comments',
221
221
  'related' => '/posts/1/long-comments',
222
222
  },
223
223
  # Spec: Resource linkage MUST be represented as one of the following:
@@ -249,14 +249,14 @@ describe JSONAPI::Serializer do
249
249
  'relationships' => {
250
250
  'author' => {
251
251
  'links' => {
252
- 'self' => '/posts/1/links/author',
252
+ 'self' => '/posts/1/relationships/author',
253
253
  'related' => '/posts/1/author',
254
254
  },
255
255
  'data' => nil,
256
256
  },
257
257
  'long-comments' => {
258
258
  'links' => {
259
- 'self' => '/posts/1/links/long-comments',
259
+ 'self' => '/posts/1/relationships/long-comments',
260
260
  'related' => '/posts/1/long-comments',
261
261
  },
262
262
  # Spec: Resource linkage MUST be represented as one of the following:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-serializers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fotinakis