Commit fbfa277
feat: add validation for null values in bookingFieldsResponses (calcom#25272)
* feat: add validation for null values in bookingFieldsResponses
- Add test case to verify 400 error when bookingFieldsResponses contains null values
- Create ValidateBookingFieldsResponses decorator to reject null values in booking field responses
- Apply validator to CreateBookingInput_2024_08_13.bookingFieldsResponses property
- Ensure all booking field response values are non-null strings
* feat: transform null values to empty strings in bookingFieldsResponses
- Remove ValidateBookingFieldsResponses validator that rejected null values
- Add Transform decorator to convert null values to empty strings in bookingFieldsResponses
- Update test to verify null values are transformed to empty strings instead of returning 400 error
* remove extra spaces
* test: add rescheduleReason null value test case
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>1 parent 37c2679 commit fbfa277
2 files changed
Lines changed: 37 additions & 8 deletions
File tree
- apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e
- packages/platform/types/bookings/2024-08-13/inputs
Lines changed: 28 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
| |||
854 | 850 | | |
855 | 851 | | |
856 | 852 | | |
857 | | - | |
| 853 | + | |
858 | 854 | | |
859 | 855 | | |
860 | 856 | | |
| |||
1162 | 1158 | | |
1163 | 1159 | | |
1164 | 1160 | | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
1165 | 1186 | | |
1166 | 1187 | | |
1167 | 1188 | | |
| |||
1176 | 1197 | | |
1177 | 1198 | | |
1178 | 1199 | | |
1179 | | - | |
| 1200 | + | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
242 | 250 | | |
243 | 251 | | |
244 | 252 | | |
| |||
0 commit comments