fix(acl): use camelCase indicatieGebruiksrecht so OpenZaak honours it (refs #103)
CI / lint (pull_request) Successful in 1m22s
CI / build (pull_request) Successful in 1m4s
CI / unit (pull_request) Successful in 1m31s
CI / frontend (pull_request) Successful in 2m43s
CI / mutation (pull_request) Successful in 5m43s
CI / verify-stack (pull_request) Successful in 8m24s
CI / lint (pull_request) Successful in 1m22s
CI / build (pull_request) Successful in 1m4s
CI / unit (pull_request) Successful in 1m31s
CI / frontend (pull_request) Successful in 2m43s
CI / mutation (pull_request) Successful in 5m43s
CI / verify-stack (pull_request) Successful in 8m24s
The ZGW Documenten API property is indicatieGebruiksrecht (camelCase); the all-lowercase key was silently dropped on write (DRF camel-case mapping), leaving the field null so the zaak still could not close. Correct the JSON name on the DTO and both assertions to match the ZGW spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -252,7 +252,7 @@ public sealed class OpenZaakGateway(HttpClient http, OpenZaakOptions options) :
|
||||
[property: JsonPropertyName("vertrouwelijkheidaanduiding")] string Vertrouwelijkheidaanduiding,
|
||||
[property: JsonPropertyName("formaat")] string Formaat,
|
||||
[property: JsonPropertyName("status")] string Status,
|
||||
[property: JsonPropertyName("indicatiegebruiksrecht")] bool Indicatiegebruiksrecht);
|
||||
[property: JsonPropertyName("indicatieGebruiksrecht")] bool IndicatieGebruiksrecht);
|
||||
|
||||
private sealed record ZaakInformatieobjectDto(
|
||||
[property: JsonPropertyName("zaak")] string Zaak,
|
||||
|
||||
@@ -120,7 +120,7 @@ public sealed class OpenZaakGatewayIntegrationTests(OpenZaakFixture stack)
|
||||
Assert.Equal(content.Length, doc.GetProperty("bestandsomvang").GetInt32());
|
||||
// indicatieGebruiksrecht is recorded as "no restrictions"; left null, OpenZaak would refuse to
|
||||
// close the zaak this document is related to (the S-10b regression that broke the e2e flow).
|
||||
Assert.False(doc.GetProperty("indicatiegebruiksrecht").GetBoolean());
|
||||
Assert.False(doc.GetProperty("indicatieGebruiksrecht").GetBoolean());
|
||||
|
||||
// ...and it is related to the zaak (a zaakinformatieobject links the two).
|
||||
var relations = await stack.GetJsonAsync(new Uri(stack.BaseUrl,
|
||||
|
||||
@@ -491,7 +491,7 @@ public class OpenZaakGatewayTests
|
||||
Assert.Contains("\"status\":\"definitief\"", create.Body);
|
||||
// indicatieGebruiksrecht must be set explicitly (false = no usage restrictions); left null,
|
||||
// OpenZaak refuses to close the zaak this document is related to ("indicatiegebruiksrecht-unset").
|
||||
Assert.Contains("\"indicatiegebruiksrecht\":false", create.Body);
|
||||
Assert.Contains("\"indicatieGebruiksrecht\":false", create.Body);
|
||||
// The file content is base64-encoded into `inhoud`, with its byte length in `bestandsomvang`.
|
||||
Assert.Contains($"\"inhoud\":\"{Convert.ToBase64String([10, 20, 30])}\"", create.Body);
|
||||
Assert.Contains("\"bestandsomvang\":3", create.Body);
|
||||
|
||||
Reference in New Issue
Block a user