|
7 | 7 |
|
8 | 8 | let one_include = """ |
9 | 9 | [ |
10 | | -{ |
11 | | -"type": "test_entity1", |
12 | | -"id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
13 | | -"attributes": { |
14 | | -"foo": "Hello", |
15 | | -"bar": 123 |
16 | | -} |
17 | | -} |
| 10 | + { |
| 11 | + "type": "test_entity1", |
| 12 | + "id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
| 13 | + "attributes": { |
| 14 | + "foo": "Hello", |
| 15 | + "bar": 123 |
| 16 | + } |
| 17 | + } |
18 | 18 | ] |
19 | 19 | """.data(using: .utf8)! |
20 | 20 |
|
21 | 21 | let two_same_type_includes = """ |
22 | 22 | [ |
23 | | -{ |
24 | | -"type": "test_entity1", |
25 | | -"id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
26 | | -"attributes": { |
27 | | -"foo": "Hello", |
28 | | -"bar": 123 |
29 | | -} |
30 | | -}, |
31 | | -{ |
32 | | -"type": "test_entity1", |
33 | | -"id": "90F03B69-4DF1-467F-B52E-B0C9E44FC333", |
34 | | -"attributes": { |
35 | | -"foo": "World", |
36 | | -"bar": 456 |
37 | | -} |
38 | | -} |
| 23 | + { |
| 24 | + "type": "test_entity1", |
| 25 | + "id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
| 26 | + "attributes": { |
| 27 | + "foo": "Hello", |
| 28 | + "bar": 123 |
| 29 | + } |
| 30 | + }, |
| 31 | + { |
| 32 | + "type": "test_entity1", |
| 33 | + "id": "90F03B69-4DF1-467F-B52E-B0C9E44FC333", |
| 34 | + "attributes": { |
| 35 | + "foo": "World", |
| 36 | + "bar": 456 |
| 37 | + } |
| 38 | + } |
39 | 39 | ] |
40 | 40 |
|
41 | 41 | """.data(using: .utf8)! |
42 | 42 |
|
43 | 43 | let two_different_type_includes = """ |
44 | 44 | [ |
45 | | -{ |
46 | | -"type": "test_entity1", |
47 | | -"id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
48 | | -"attributes": { |
49 | | -"foo": "Hello", |
50 | | -"bar": 123 |
51 | | -} |
52 | | -}, |
53 | | -{ |
54 | | -"type": "test_entity2", |
55 | | -"id": "90F03B69-4DF1-467F-B52E-B0C9E44FC333", |
56 | | -"attributes": { |
57 | | -"foo": "World", |
58 | | -"bar": 456 |
59 | | -}, |
60 | | -"relationships": { |
61 | | -"entity1": { |
62 | | -"data": { |
63 | | -"type": "test_entity1", |
64 | | -"id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF" |
65 | | -} |
66 | | -} |
67 | | -} |
68 | | -} |
| 45 | + { |
| 46 | + "type": "test_entity1", |
| 47 | + "id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
| 48 | + "attributes": { |
| 49 | + "foo": "Hello", |
| 50 | + "bar": 123 |
| 51 | + } |
| 52 | + }, |
| 53 | + { |
| 54 | + "type": "test_entity2", |
| 55 | + "id": "90F03B69-4DF1-467F-B52E-B0C9E44FC333", |
| 56 | + "attributes": { |
| 57 | + "foo": "World", |
| 58 | + "bar": 456 |
| 59 | + }, |
| 60 | + "relationships": { |
| 61 | + "entity1": { |
| 62 | + "data": { |
| 63 | + "type": "test_entity1", |
| 64 | + "id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF" |
| 65 | + } |
| 66 | + } |
| 67 | + } |
| 68 | + } |
69 | 69 | ] |
70 | 70 |
|
71 | 71 | """.data(using: .utf8)! |
@@ -688,6 +688,38 @@ let eleven_different_type_includes = """ |
688 | 688 | """.data(using: .utf8)! |
689 | 689 |
|
690 | 690 |
|
| 691 | +let three_includes_one_missing_attributes = """ |
| 692 | +[ |
| 693 | + { |
| 694 | + "type": "test_entity1", |
| 695 | + "id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF", |
| 696 | + "attributes": { |
| 697 | + "foo": "Hello", |
| 698 | + "bar": 123 |
| 699 | + } |
| 700 | + }, |
| 701 | + { |
| 702 | + "type": "test_entity4", |
| 703 | + "id": "364B3B69-4DF1-467F-B52E-B0C9E44F666E" |
| 704 | + }, |
| 705 | + { |
| 706 | + "type": "test_entity2", |
| 707 | + "id": "90F03B69-4DF1-467F-B52E-B0C9E44FC333", |
| 708 | + "attributes": { |
| 709 | + "bar": 456 |
| 710 | + }, |
| 711 | + "relationships": { |
| 712 | + "entity1": { |
| 713 | + "data": { |
| 714 | + "type": "test_entity1", |
| 715 | + "id": "2DF03B69-4B0A-467F-B52E-B0C9E44FCECF" |
| 716 | + } |
| 717 | + } |
| 718 | + } |
| 719 | + } |
| 720 | +] |
| 721 | +""".data(using: .utf8)! |
| 722 | + |
691 | 723 | let six_includes_one_bad_type = """ |
692 | 724 | [ |
693 | 725 | { |
|
0 commit comments