Commit 3e720de
authored
Make it possible to use Json as storage format (#1526)
* 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.
* Add more tests
* Obsolete org/app parameters to GetBinaryDataList aswell
* CodeQL fixes
* Rename dataTypeString to dataTypeId for new method
keep it for the old signatures in case someone had `dataTypeString: "default"` in their app
Activate the warning about not matching interface parameter names and fix the warning I got.1 parent e89a20f commit 3e720de
File tree
46 files changed
+2145
-697
lines changed- src
- Altinn.App.Analyzers
- FormDataWrapper
- Utils
- 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
- Texts
- Models
- test
- Altinn.App.Api.Tests
- Controllers
- Helpers/Patch
- Mocks
- Altinn.App.Core.Tests
- Eformidling/Implementation
- Features
- Action
- Options/Altinn2Provider
- Signing
- Validators/LegacyValidationServiceTests
- Infrastructure/Clients/Storage
- Internal
- Data
- Process
- LayoutExpressions/FullTests
- CleanDataAccessor
- Models
- Altinn.App.Tests.Common/Fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+2145
-697
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | 538 | | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
543 | 542 | | |
544 | | - | |
545 | 543 | | |
546 | 544 | | |
547 | 545 | | |
548 | 546 | | |
549 | 547 | | |
550 | | - | |
| 548 | + | |
551 | 549 | | |
552 | 550 | | |
553 | 551 | | |
| |||
898 | 896 | | |
899 | 897 | | |
900 | 898 | | |
901 | | - | |
902 | 899 | | |
903 | 900 | | |
904 | 901 | | |
905 | 902 | | |
906 | 903 | | |
907 | 904 | | |
908 | | - | |
| 905 | + | |
909 | 906 | | |
910 | 907 | | |
911 | 908 | | |
| |||
935 | 932 | | |
936 | 933 | | |
937 | 934 | | |
938 | | - | |
939 | 935 | | |
940 | 936 | | |
941 | 937 | | |
942 | 938 | | |
943 | 939 | | |
944 | | - | |
945 | 940 | | |
946 | 941 | | |
947 | 942 | | |
948 | 943 | | |
949 | 944 | | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
| 945 | + | |
958 | 946 | | |
959 | 947 | | |
960 | 948 | | |
| |||
985 | 973 | | |
986 | 974 | | |
987 | 975 | | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
| 976 | + | |
997 | 977 | | |
998 | 978 | | |
999 | 979 | | |
| |||
| 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 | | |
| |||
0 commit comments