Skip to content

Commit

Permalink
Fix mapping for Zaak->eigenschappen to Request->body
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Aug 26, 2024
1 parent b46c9a3 commit 30f78a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Installation/Mapping/zaakToRequest.mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"status": "received",
"type": "{{ '/api/request_types/' ~ embedded.zaaktype.identificatie }}",
"customers": "{% if embedded is defined and embedded.rollen is defined %}{{ map(\"https://commongateway.nl/mapping/RolToCustomer.mapping.json\", embedded.rollen, true)|json_encode }}{% else %}[]{% endif %}",
"body": "{% if embedded is defined and embedded.eigenschappen is defined %}[{% for eigenschap in embedded.eigenschappen %}{% if loop.first == false %},{% endif %}\"{{ eigenschap.embedded.eigenschap.naam }}\":\"{{ eigenschap.waarde }}\"{% endfor %}]{% else %}[]{% endif %}",
"body": "{% if embedded is defined and embedded.eigenschappen is defined %}{% set array = {} %}{% for eigenschap in embedded.eigenschappen %}{% set array = array|merge({(eigenschap.embedded.eigenschap.naam): eigenschap.waarde}) %}{% endfor %}{{ array|json_encode }}{% else %}[]{% endif %}",
"documents": "{% if embedded is defined and embedded.zaakinformatieobjecten is defined %}[{% for zaakinformatieobject in embedded.zaakinformatieobjecten %}{% if loop.first == false %},{% endif %}{\"file\":\"zaakinformatieobject.informatieobject.inhoud\"}{% endfor %}]{% else %}[]{% endif %}"
},
"cast": {
Expand Down

0 comments on commit 30f78a4

Please sign in to comment.