contentful-management 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +37 -8
  3. data/Gemfile +0 -1
  4. data/README.md +130 -0
  5. data/Rakefile +0 -1
  6. data/contentful-management.gemspec +0 -1
  7. data/examples/blog.rb +1 -1
  8. data/lib/contentful/management.rb +0 -1
  9. data/lib/contentful/management/array.rb +0 -1
  10. data/lib/contentful/management/asset.rb +65 -26
  11. data/lib/contentful/management/client.rb +19 -9
  12. data/lib/contentful/management/content_type.rb +43 -28
  13. data/lib/contentful/management/dynamic_entry.rb +15 -15
  14. data/lib/contentful/management/entry.rb +73 -40
  15. data/lib/contentful/management/error.rb +6 -1
  16. data/lib/contentful/management/field.rb +63 -8
  17. data/lib/contentful/management/file.rb +0 -1
  18. data/lib/contentful/management/http_client.rb +0 -1
  19. data/lib/contentful/management/link.rb +0 -1
  20. data/lib/contentful/management/locale.rb +11 -3
  21. data/lib/contentful/management/location.rb +0 -1
  22. data/lib/contentful/management/request.rb +5 -7
  23. data/lib/contentful/management/resource.rb +3 -3
  24. data/lib/contentful/management/resource/array_like.rb +0 -1
  25. data/lib/contentful/management/resource/fields.rb +1 -2
  26. data/lib/contentful/management/resource/refresher.rb +3 -3
  27. data/lib/contentful/management/resource/system_properties.rb +0 -1
  28. data/lib/contentful/management/resource_builder.rb +16 -27
  29. data/lib/contentful/management/response.rb +36 -32
  30. data/lib/contentful/management/space.rb +16 -6
  31. data/lib/contentful/management/space_webhook_methods_factory.rb +0 -4
  32. data/lib/contentful/management/support.rb +0 -1
  33. data/lib/contentful/management/validation.rb +34 -0
  34. data/lib/contentful/management/version.rb +1 -2
  35. data/lib/contentful/management/webhook.rb +17 -10
  36. data/spec/fixtures/vcr_cassettes/content_type/validation/in.yml +588 -0
  37. data/spec/fixtures/vcr_cassettes/content_type/validation/in_add.yml +620 -0
  38. data/spec/fixtures/vcr_cassettes/content_type/validation/in_update.yml +668 -0
  39. data/spec/fixtures/vcr_cassettes/content_type/validation/link_content_type.yml +749 -0
  40. data/spec/fixtures/vcr_cassettes/content_type/validation/link_field.yml +770 -0
  41. data/spec/fixtures/vcr_cassettes/content_type/validation/link_mimetype_group.yml +766 -0
  42. data/spec/fixtures/vcr_cassettes/content_type/validation/multiple_add.yml +854 -0
  43. data/spec/fixtures/vcr_cassettes/content_type/validation/present.yml +808 -0
  44. data/spec/fixtures/vcr_cassettes/content_type/validation/range.yml +683 -0
  45. data/spec/fixtures/vcr_cassettes/content_type/validation/range_update.yml +697 -0
  46. data/spec/fixtures/vcr_cassettes/content_type/validation/regexp.yml +720 -0
  47. data/spec/fixtures/vcr_cassettes/content_type/validation/size.yml +791 -0
  48. data/spec/fixtures/vcr_cassettes/entry/service_unavailable.yml +52 -0
  49. data/spec/fixtures/vcr_cassettes/space/webhook/create.yml +439 -0
  50. data/spec/lib/contentful/management/asset_spec.rb +16 -16
  51. data/spec/lib/contentful/management/client_spec.rb +0 -1
  52. data/spec/lib/contentful/management/content_type_spec.rb +143 -1
  53. data/spec/lib/contentful/management/entry_spec.rb +10 -4
  54. data/spec/lib/contentful/management/locale_spec.rb +0 -1
  55. data/spec/lib/contentful/management/space_spec.rb +9 -1
  56. data/spec/lib/contentful/management/webhook_spec.rb +0 -1
  57. data/spec/spec_helper.rb +0 -1
  58. data/spec/support/vcr.rb +0 -1
  59. metadata +63 -62
@@ -0,0 +1,749 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContenfulManagementGem/0.2.1
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Content-Length:
17
+ - '0'
18
+ Host:
19
+ - api.contentful.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ "^access-Control-Expose-Headers":
26
+ - Etag
27
+ Accept-Ranges:
28
+ - bytes
29
+ Access-Control-Allow-Headers:
30
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
31
+ Access-Control-Allow-Methods:
32
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cache-Control:
38
+ - max-age=0
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Wed, 15 Oct 2014 12:25:15 GMT
43
+ Etag:
44
+ - '"35407b8a88882fe5717a4701910f6ce7"'
45
+ Server:
46
+ - nginx
47
+ Status:
48
+ - 200 OK
49
+ X-Contentful-Request-Id:
50
+ - 85f-806662946
51
+ Content-Length:
52
+ - '459'
53
+ Connection:
54
+ - keep-alive
55
+ body:
56
+ encoding: UTF-8
57
+ string: |
58
+ {
59
+ "sys":{
60
+ "type":"Space",
61
+ "id":"v2umtz8ths9v",
62
+ "version":1,
63
+ "createdBy":{
64
+ "sys":{
65
+ "type":"Link",
66
+ "linkType":"User",
67
+ "id":"1E7acJL8I5XUXAMHQt9Grs"
68
+ }
69
+ },
70
+ "createdAt":"2014-08-21T13:32:11Z",
71
+ "updatedBy":{
72
+ "sys":{
73
+ "type":"Link",
74
+ "linkType":"User",
75
+ "id":"1E7acJL8I5XUXAMHQt9Grs"
76
+ }
77
+ },
78
+ "updatedAt":"2014-08-21T13:32:12Z"
79
+ },
80
+ "name":"CMA Demo Rails App"}
81
+ http_version:
82
+ recorded_at: Wed, 15 Oct 2014 12:27:38 GMT
83
+ - request:
84
+ method: get
85
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types
86
+ body:
87
+ encoding: US-ASCII
88
+ string: ''
89
+ headers:
90
+ User-Agent:
91
+ - RubyContenfulManagementGem/0.2.1
92
+ Authorization:
93
+ - Bearer <ACCESS_TOKEN>
94
+ Content-Type:
95
+ - application/vnd.contentful.management.v1+json
96
+ Content-Length:
97
+ - '0'
98
+ Host:
99
+ - api.contentful.com
100
+ response:
101
+ status:
102
+ code: 200
103
+ message: OK
104
+ headers:
105
+ "^access-Control-Expose-Headers":
106
+ - Etag
107
+ Access-Control-Allow-Headers:
108
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
109
+ Access-Control-Allow-Methods:
110
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
111
+ Access-Control-Allow-Origin:
112
+ - "*"
113
+ Access-Control-Max-Age:
114
+ - '1728000'
115
+ Cf-Space-Id:
116
+ - v2umtz8ths9v
117
+ Content-Type:
118
+ - application/vnd.contentful.management.v1+json
119
+ Date:
120
+ - Wed, 15 Oct 2014 12:25:16 GMT
121
+ Etag:
122
+ - '"12a4e86fa049680a20c4dc8871761c97"'
123
+ Server:
124
+ - nginx
125
+ X-Powered-By:
126
+ - Express
127
+ Content-Length:
128
+ - '7730'
129
+ Connection:
130
+ - keep-alive
131
+ body:
132
+ encoding: UTF-8
133
+ string: |
134
+ {
135
+ "sys": {
136
+ "type": "Array"
137
+ },
138
+ "total": 4,
139
+ "skip": 0,
140
+ "limit": 100,
141
+ "items": [
142
+ {
143
+ "displayField": "title",
144
+ "name": "Post",
145
+ "description": "",
146
+ "fields": [
147
+ {
148
+ "id": "title",
149
+ "name": "Title",
150
+ "type": "Text",
151
+ "localized": true,
152
+ "uiid": "2sdir2f8kcg"
153
+ },
154
+ {
155
+ "id": "author",
156
+ "name": "Author",
157
+ "type": "Text",
158
+ "localized": true,
159
+ "uiid": "4x1018907pc"
160
+ },
161
+ {
162
+ "id": "body",
163
+ "name": "Body",
164
+ "type": "Text",
165
+ "localized": true,
166
+ "uiid": "4hj7cda89hc"
167
+ },
168
+ {
169
+ "id": "title_image",
170
+ "name": "Title Image",
171
+ "type": "Link",
172
+ "linkType": "Asset",
173
+ "required": true,
174
+ "localized": true,
175
+ "uiid": "4gcqrcma8lc"
176
+ },
177
+ {
178
+ "id": "second_image",
179
+ "name": "Second Image",
180
+ "type": "Link",
181
+ "linkType": "Asset",
182
+ "localized": true,
183
+ "uiid": "40440elrugw"
184
+ },
185
+ {
186
+ "id": "category",
187
+ "name": "Category",
188
+ "type": "Link",
189
+ "linkType": "Entry",
190
+ "uiid": "49vicjvqsxs",
191
+ "localized": true
192
+ }
193
+ ],
194
+ "sys": {
195
+ "id": "post_content_type",
196
+ "type": "ContentType",
197
+ "createdAt": "2014-08-21T13:32:30.401Z",
198
+ "createdBy": {
199
+ "sys": {
200
+ "type": "Link",
201
+ "linkType": "User",
202
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
203
+ }
204
+ },
205
+ "space": {
206
+ "sys": {
207
+ "type": "Link",
208
+ "linkType": "Space",
209
+ "id": "v2umtz8ths9v"
210
+ }
211
+ },
212
+ "firstPublishedAt": "2014-08-21T13:32:43.385Z",
213
+ "publishedCounter": 2,
214
+ "publishedAt": "2014-08-27T09:18:36.995Z",
215
+ "publishedBy": {
216
+ "sys": {
217
+ "type": "Link",
218
+ "linkType": "User",
219
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
220
+ }
221
+ },
222
+ "publishedVersion": 11,
223
+ "version": 12,
224
+ "updatedAt": "2014-08-27T09:18:37.003Z",
225
+ "updatedBy": {
226
+ "sys": {
227
+ "type": "Link",
228
+ "linkType": "User",
229
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
230
+ }
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "fields": [
236
+ {
237
+ "name": "testowe",
238
+ "id": "testowe",
239
+ "type": "Link",
240
+ "uiid": "3q907mcb4lc",
241
+ "linkType": "Asset",
242
+ "required": true,
243
+ "localized": true,
244
+ "validations": []
245
+ }
246
+ ],
247
+ "name": "test",
248
+ "sys": {
249
+ "id": "26eLfV14SIOeQkse44q4sw",
250
+ "type": "ContentType",
251
+ "createdAt": "2014-08-22T12:57:43.618Z",
252
+ "createdBy": {
253
+ "sys": {
254
+ "type": "Link",
255
+ "linkType": "User",
256
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
257
+ }
258
+ },
259
+ "space": {
260
+ "sys": {
261
+ "type": "Link",
262
+ "linkType": "Space",
263
+ "id": "v2umtz8ths9v"
264
+ }
265
+ },
266
+ "firstPublishedAt": "2014-08-22T12:57:53.093Z",
267
+ "publishedCounter": 2,
268
+ "version": 17,
269
+ "updatedAt": "2014-10-14T13:07:06.808Z",
270
+ "updatedBy": {
271
+ "sys": {
272
+ "type": "Link",
273
+ "linkType": "User",
274
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
275
+ }
276
+ }
277
+ }
278
+ },
279
+ {
280
+ "name": "Category",
281
+ "description": "",
282
+ "fields": [
283
+ {
284
+ "id": "name",
285
+ "name": "Name",
286
+ "type": "Text",
287
+ "localized": true,
288
+ "validations": [
289
+ {
290
+ "size": {
291
+ "min": 2,
292
+ "max": 222
293
+ }
294
+ },
295
+ {
296
+ "in": [
297
+ "dom",
298
+ "chatka"
299
+ ]
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "id": "description",
305
+ "name": "Description",
306
+ "type": "Text"
307
+ },
308
+ {
309
+ "id": "valid",
310
+ "name": "Valid",
311
+ "type": "Text",
312
+ "validations": [
313
+ {
314
+ "in": [
315
+ "foo",
316
+ "bar"
317
+ ]
318
+ },
319
+ {
320
+ "size": {
321
+ "min": 10,
322
+ "max": 15
323
+ }
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ "id": "asset_valid",
329
+ "name": "AssetValid",
330
+ "type": "Link",
331
+ "linkType": "Asset",
332
+ "validations": [
333
+ {
334
+ "linkMimetypeGroup": "pdfdocument"
335
+ }
336
+ ]
337
+ },
338
+ {
339
+ "id": "entry_valid",
340
+ "name": "EntryValid",
341
+ "type": "Link",
342
+ "linkType": "Entry",
343
+ "validations": [
344
+ {
345
+ "linkContentType": [
346
+ "post_content_type"
347
+ ]
348
+ }
349
+ ]
350
+ }
351
+ ],
352
+ "sys": {
353
+ "id": "category_content_type",
354
+ "type": "ContentType",
355
+ "createdAt": "2014-08-21T13:32:20.955Z",
356
+ "createdBy": {
357
+ "sys": {
358
+ "type": "Link",
359
+ "linkType": "User",
360
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
361
+ }
362
+ },
363
+ "space": {
364
+ "sys": {
365
+ "type": "Link",
366
+ "linkType": "Space",
367
+ "id": "v2umtz8ths9v"
368
+ }
369
+ },
370
+ "firstPublishedAt": "2014-08-21T13:32:27.109Z",
371
+ "publishedCounter": 10,
372
+ "version": 291,
373
+ "updatedAt": "2014-10-15T11:14:07.918Z",
374
+ "updatedBy": {
375
+ "sys": {
376
+ "type": "Link",
377
+ "linkType": "User",
378
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
379
+ }
380
+ }
381
+ }
382
+ },
383
+ {
384
+ "name": "Validation",
385
+ "description": "",
386
+ "fields": [
387
+ {
388
+ "id": "number",
389
+ "name": "Number",
390
+ "type": "Number",
391
+ "validations": [
392
+ {
393
+ "range": {
394
+ "min": 50,
395
+ "max": 200
396
+ }
397
+ }
398
+ ]
399
+ },
400
+ {
401
+ "id": "entries",
402
+ "name": "entries",
403
+ "type": "Array"
404
+ },
405
+ {
406
+ "id": "assets",
407
+ "name": "Assets",
408
+ "type": "Link",
409
+ "linkType": "Asset",
410
+ "validations": []
411
+ },
412
+ {
413
+ "id": "text",
414
+ "name": "Text",
415
+ "type": "Text",
416
+ "validations": [
417
+ {
418
+ "regexp": {
419
+ "pattern": "^such",
420
+ "flags": "im"
421
+ }
422
+ }
423
+ ]
424
+ }
425
+ ],
426
+ "sys": {
427
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
428
+ "type": "ContentType",
429
+ "createdAt": "2014-10-15T10:59:27.146Z",
430
+ "createdBy": {
431
+ "sys": {
432
+ "type": "Link",
433
+ "linkType": "User",
434
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
435
+ }
436
+ },
437
+ "space": {
438
+ "sys": {
439
+ "type": "Link",
440
+ "linkType": "Space",
441
+ "id": "v2umtz8ths9v"
442
+ }
443
+ },
444
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
445
+ "publishedCounter": 1,
446
+ "publishedAt": "2014-10-15T11:02:51.145Z",
447
+ "publishedBy": {
448
+ "sys": {
449
+ "type": "Link",
450
+ "linkType": "User",
451
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
452
+ }
453
+ },
454
+ "publishedVersion": 101,
455
+ "version": 139,
456
+ "updatedAt": "2014-10-15T12:24:52.872Z",
457
+ "updatedBy": {
458
+ "sys": {
459
+ "type": "Link",
460
+ "linkType": "User",
461
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
462
+ }
463
+ }
464
+ }
465
+ }
466
+ ]
467
+ }
468
+ http_version:
469
+ recorded_at: Wed, 15 Oct 2014 12:27:39 GMT
470
+ - request:
471
+ method: get
472
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types/1JrDv4JJsYuY4KGEEgAsQU
473
+ body:
474
+ encoding: US-ASCII
475
+ string: ''
476
+ headers:
477
+ User-Agent:
478
+ - RubyContenfulManagementGem/0.2.1
479
+ Authorization:
480
+ - Bearer <ACCESS_TOKEN>
481
+ Content-Type:
482
+ - application/vnd.contentful.management.v1+json
483
+ Content-Length:
484
+ - '0'
485
+ Host:
486
+ - api.contentful.com
487
+ response:
488
+ status:
489
+ code: 200
490
+ message: OK
491
+ headers:
492
+ "^access-Control-Expose-Headers":
493
+ - Etag
494
+ Access-Control-Allow-Headers:
495
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
496
+ Access-Control-Allow-Methods:
497
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
498
+ Access-Control-Allow-Origin:
499
+ - "*"
500
+ Access-Control-Max-Age:
501
+ - '1728000'
502
+ Cf-Space-Id:
503
+ - v2umtz8ths9v
504
+ Content-Type:
505
+ - application/vnd.contentful.management.v1+json
506
+ Date:
507
+ - Wed, 15 Oct 2014 12:25:16 GMT
508
+ Etag:
509
+ - '"3564401543983c0b4e6177f971e3b678"'
510
+ Server:
511
+ - nginx
512
+ X-Powered-By:
513
+ - Express
514
+ Content-Length:
515
+ - '1606'
516
+ Connection:
517
+ - keep-alive
518
+ body:
519
+ encoding: UTF-8
520
+ string: |
521
+ {
522
+ "name": "Validation",
523
+ "description": "",
524
+ "fields": [
525
+ {
526
+ "id": "number",
527
+ "name": "Number",
528
+ "type": "Number",
529
+ "validations": [
530
+ {
531
+ "range": {
532
+ "min": 50,
533
+ "max": 200
534
+ }
535
+ }
536
+ ]
537
+ },
538
+ {
539
+ "id": "entries",
540
+ "name": "entries",
541
+ "type": "Array"
542
+ },
543
+ {
544
+ "id": "assets",
545
+ "name": "Assets",
546
+ "type": "Link",
547
+ "linkType": "Asset",
548
+ "validations": []
549
+ },
550
+ {
551
+ "id": "text",
552
+ "name": "Text",
553
+ "type": "Text",
554
+ "validations": [
555
+ {
556
+ "regexp": {
557
+ "pattern": "^such",
558
+ "flags": "im"
559
+ }
560
+ }
561
+ ]
562
+ }
563
+ ],
564
+ "sys": {
565
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
566
+ "type": "ContentType",
567
+ "createdAt": "2014-10-15T10:59:27.146Z",
568
+ "createdBy": {
569
+ "sys": {
570
+ "type": "Link",
571
+ "linkType": "User",
572
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
573
+ }
574
+ },
575
+ "space": {
576
+ "sys": {
577
+ "type": "Link",
578
+ "linkType": "Space",
579
+ "id": "v2umtz8ths9v"
580
+ }
581
+ },
582
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
583
+ "publishedCounter": 1,
584
+ "publishedAt": "2014-10-15T11:02:51.145Z",
585
+ "publishedBy": {
586
+ "sys": {
587
+ "type": "Link",
588
+ "linkType": "User",
589
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
590
+ }
591
+ },
592
+ "publishedVersion": 101,
593
+ "version": 139,
594
+ "updatedAt": "2014-10-15T12:24:52.872Z",
595
+ "updatedBy": {
596
+ "sys": {
597
+ "type": "Link",
598
+ "linkType": "User",
599
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
600
+ }
601
+ }
602
+ }
603
+ }
604
+ http_version:
605
+ recorded_at: Wed, 15 Oct 2014 12:27:40 GMT
606
+ - request:
607
+ method: put
608
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types/1JrDv4JJsYuY4KGEEgAsQU
609
+ body:
610
+ encoding: UTF-8
611
+ string: '{"name":"Validation","description":"","fields":[{"id":"number","name":"Number","type":"Number","validations":[{"range":{"min":50,"max":200}}]},{"id":"entries","name":"entries","type":"Array","validations":[{"linkContentType":["post_content_type"]}]},{"id":"assets","name":"Assets","type":"Link","linkType":"Asset","validations":[]},{"id":"text","name":"Text","type":"Text","validations":[{"regexp":{"pattern":"^such","flags":"im"}}]}]}'
612
+ headers:
613
+ User-Agent:
614
+ - RubyContenfulManagementGem/0.2.1
615
+ Authorization:
616
+ - Bearer <ACCESS_TOKEN>
617
+ Content-Type:
618
+ - application/vnd.contentful.management.v1+json
619
+ X-Contentful-Version:
620
+ - '139'
621
+ Host:
622
+ - api.contentful.com
623
+ response:
624
+ status:
625
+ code: 200
626
+ message: OK
627
+ headers:
628
+ "^access-Control-Expose-Headers":
629
+ - Etag
630
+ Access-Control-Allow-Headers:
631
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
632
+ Access-Control-Allow-Methods:
633
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
634
+ Access-Control-Allow-Origin:
635
+ - "*"
636
+ Access-Control-Max-Age:
637
+ - '1728000'
638
+ Cf-Space-Id:
639
+ - v2umtz8ths9v
640
+ Content-Type:
641
+ - application/vnd.contentful.management.v1+json
642
+ Date:
643
+ - Wed, 15 Oct 2014 12:25:17 GMT
644
+ Etag:
645
+ - '"f46c8242d36870f212e604d38827effc"'
646
+ Server:
647
+ - nginx
648
+ X-Powered-By:
649
+ - Express
650
+ Content-Length:
651
+ - '1733'
652
+ Connection:
653
+ - keep-alive
654
+ body:
655
+ encoding: UTF-8
656
+ string: |
657
+ {
658
+ "name": "Validation",
659
+ "description": "",
660
+ "fields": [
661
+ {
662
+ "id": "number",
663
+ "name": "Number",
664
+ "type": "Number",
665
+ "validations": [
666
+ {
667
+ "range": {
668
+ "min": 50,
669
+ "max": 200
670
+ }
671
+ }
672
+ ]
673
+ },
674
+ {
675
+ "id": "entries",
676
+ "name": "entries",
677
+ "type": "Array",
678
+ "validations": [
679
+ {
680
+ "linkContentType": [
681
+ "post_content_type"
682
+ ]
683
+ }
684
+ ]
685
+ },
686
+ {
687
+ "id": "assets",
688
+ "name": "Assets",
689
+ "type": "Link",
690
+ "linkType": "Asset",
691
+ "validations": []
692
+ },
693
+ {
694
+ "id": "text",
695
+ "name": "Text",
696
+ "type": "Text",
697
+ "validations": [
698
+ {
699
+ "regexp": {
700
+ "pattern": "^such",
701
+ "flags": "im"
702
+ }
703
+ }
704
+ ]
705
+ }
706
+ ],
707
+ "sys": {
708
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
709
+ "type": "ContentType",
710
+ "createdAt": "2014-10-15T10:59:27.146Z",
711
+ "createdBy": {
712
+ "sys": {
713
+ "type": "Link",
714
+ "linkType": "User",
715
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
716
+ }
717
+ },
718
+ "space": {
719
+ "sys": {
720
+ "type": "Link",
721
+ "linkType": "Space",
722
+ "id": "v2umtz8ths9v"
723
+ }
724
+ },
725
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
726
+ "publishedCounter": 1,
727
+ "publishedAt": "2014-10-15T11:02:51.145Z",
728
+ "publishedBy": {
729
+ "sys": {
730
+ "type": "Link",
731
+ "linkType": "User",
732
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
733
+ }
734
+ },
735
+ "publishedVersion": 101,
736
+ "version": 140,
737
+ "updatedAt": "2014-10-15T12:25:17.489Z",
738
+ "updatedBy": {
739
+ "sys": {
740
+ "type": "Link",
741
+ "linkType": "User",
742
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
743
+ }
744
+ }
745
+ }
746
+ }
747
+ http_version:
748
+ recorded_at: Wed, 15 Oct 2014 12:27:40 GMT
749
+ recorded_with: VCR 2.9.2