revize endpointu: cteni NullableProperty, filtr v UTC, attachments

Kontrola vsech 180 operaci proti falesnemu iDoklad API a round trip
331 modelu SDK v obou smerech.

- SdkNullablePropertyConverter doplnuje cteni NullableProperty<T>.
  Konvertor SDK umi jen zapis, takze PATCH s takovou polozkou koncil
  prazdnou 500 uz pri cteni tela. Tykalo se 29 modelu. Zapis zustava
  na konvertoru SDK, odchozi payload se nemeni.
- Datum uvnitr NullableProperty se normalizuje na UTC stejne jako
  zbytek serializace.
- ListModifiers parsuje datum ve filtru s AdjustToUniversal a
  AssumeUniversal. Filtr se zonou se drive posouval o offset.
- POST /attachments kontroluje FileName a FileBytes, SDK na ne sahalo
  bez kontroly na null a vracelo neosetrenou 500.
- ExceptionHandlingMiddleware ma posledni zachyt, zadny request uz
  nekonci prazdnou 500.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
JiriUhlir
2026-08-25 11:13:21 +02:00
co-authored by Claude Opus 5
parent 73f01d0228
commit 225161e4ca
7 changed files with 194 additions and 11 deletions
+4 -1
View File
@@ -228,7 +228,10 @@ public static class ListModifiers
}
if (type == typeof(DateTime))
{
return DateTime.Parse(raw, CultureInfo.InvariantCulture, DateTimeStyles.None);
// iDoklad works in UTC, so a value carrying an offset is converted and a value
// without one is taken as already being UTC. Parsing without these flags turned
// "2024-01-01T00:00:00Z" into local time and shifted the filter by the offset.
return DateTime.Parse(raw, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal);
}
if (type == typeof(bool))
{