Commit 8b90661
committed
Update IDataClient and ModelSerializationService to support json in storage
When creating a new data element
1. Check appmetadata.DataTypes[type].AllowedContentTypes and see if `application/xml` or `application/json` appears first
2. Use fallback `application/xml`
When getting or updating a data element
1. Look at dataElement.ContentType and use xml serialization unless it says `application/json`
* [Obsolete] methods that does not work when storage format is dependent on DataElement.ContentType
* Obsolete methods only work if DataType.AllowedContentTypes does not contain "application/json"
* [Obsolete] methods in IDataClient that accepts org and app arguments and replace with similar methods without, as those are not required and is a hassle to provide.1 parent 148d815 commit 8b90661
File tree
35 files changed
+660
-492
lines changed- src
- Altinn.App.Api/Controllers
- Altinn.App.Core
- EFormidling/Implementation
- Features
- Action
- Signing/Services
- Telemetry
- Helpers/Serialization
- Implementation
- Infrastructure/Clients/Storage
- Internal
- Data
- Process/ProcessTasks/Common
- Models
- test
- Altinn.App.Api.Tests
- Controllers
- Helpers/Patch
- Mocks
- Altinn.App.Core.Tests
- Eformidling/Implementation
- Features
- Action
- Signing
- Validators/LegacyValidationServiceTests
- Infrastructure/Clients/Storage
- Internal
- Data
- Process
- LayoutExpressions/FullTests
- CleanDataAccessor
- Altinn.App.Tests.Common/Fixtures
35 files changed
+660
-492
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
| 908 | + | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
| 950 | + | |
958 | 951 | | |
959 | 952 | | |
960 | 953 | | |
| |||
985 | 978 | | |
986 | 979 | | |
987 | 980 | | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
| 981 | + | |
997 | 982 | | |
998 | 983 | | |
999 | 984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
| |||
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
91 | 88 | | |
92 | 89 | | |
93 | 90 | | |
| |||
109 | 106 | | |
110 | 107 | | |
111 | 108 | | |
112 | | - | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
| |||
960 | 956 | | |
961 | 957 | | |
962 | 958 | | |
963 | | - | |
964 | | - | |
965 | 959 | | |
966 | 960 | | |
967 | 961 | | |
| |||
987 | 981 | | |
988 | 982 | | |
989 | 983 | | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
| 984 | + | |
1012 | 985 | | |
1013 | 986 | | |
1014 | 987 | | |
| |||
1026 | 999 | | |
1027 | 1000 | | |
1028 | 1001 | | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
| 1002 | + | |
1038 | 1003 | | |
1039 | 1004 | | |
1040 | 1005 | | |
| |||
1067 | 1032 | | |
1068 | 1033 | | |
1069 | 1034 | | |
1070 | | - | |
1071 | | - | |
1072 | 1035 | | |
1073 | 1036 | | |
1074 | 1037 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | 253 | | |
256 | 254 | | |
257 | 255 | | |
| |||
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 78 | + | |
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
| |||
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
100 | | - | |
101 | 96 | | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
105 | 100 | | |
106 | | - | |
107 | | - | |
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
| |||
Lines changed: 13 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 48 | | |
57 | 49 | | |
58 | 50 | | |
| |||
106 | 98 | | |
107 | 99 | | |
108 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
Lines changed: 89 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | | - | |
45 | | - | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
49 | 79 | | |
50 | 80 | | |
51 | 81 | | |
52 | 82 | | |
53 | 83 | | |
54 | 84 | | |
55 | 85 | | |
| 86 | + | |
56 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
57 | 111 | | |
58 | 112 | | |
59 | 113 | | |
| |||
63 | 117 | | |
64 | 118 | | |
65 | 119 | | |
66 | | - | |
67 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
68 | 129 | | |
69 | 130 | | |
70 | 131 | | |
| |||
125 | 186 | | |
126 | 187 | | |
127 | 188 | | |
128 | | - | |
| 189 | + | |
129 | 190 | | |
130 | 191 | | |
131 | 192 | | |
| |||
145 | 206 | | |
146 | 207 | | |
147 | 208 | | |
148 | | - | |
| 209 | + | |
149 | 210 | | |
150 | 211 | | |
151 | 212 | | |
| |||
315 | 376 | | |
316 | 377 | | |
317 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
318 | 401 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
0 commit comments