Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get zaken collectie ZGW -> ZDS #11

Merged
merged 21 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Installation/Action/ZgwZaakToZdsXmlEncodeAction.action.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "ZgwZaakToZdsXmlEncodeAction.action.json",
"$id": "https://dowr.simxml.nl/action/ZgwZaakToZdsXmlEncodeAction.action.json.action.json",
"$schema": "https://docs.commongateway.nl/schemas/Action.schema.json",
"version": "0.0.1",
"listens": [
"zgwToZds.xmlEncode"
],
"conditions": {
"==": [1,1]
},
"class": "CommonGateway\\ZGWToZDSBundle\\ActionHandler\\ZgwToZDSXMLEncodeHandler"
}
18 changes: 18 additions & 0 deletions Installation/Mapping/ZdsLv01ToZgwGeoSearch.mapping.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$id": "https://zds.vng.nl/mappings/zdsLv01ToZGWGeoSearch.mapping.json",
"$schema": "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version": "0.0.1",
"title": "ZDS Lv01 to ZGW GeoSearch",
"description": "",
"mapping": {
"rol__betrokkeneIdentificatie__natuurlijkPersoon__inpBsn": "SOAP-ENV:Body.ns2:zakLv01.ns2:gelijk.ns2:heeftAlsInitiator.ns2:gerelateerde.ns2:identificatie",
"identificatie": "SOAP-ENV:Body.ns2:zakLv01.ns2:gelijk.ns2:identificatie",
"expand": "zaaktype,status,resultaat,resultaat.resultaattype,zaakinformatieobjecten,status.statustype"
},
"unset": [],
"cast": {
"rol__betrokkeneIdentificatie__natuurlijkPersoon__inpBsn": "unsetIfValue==SOAP-ENV:Body.ns2:zakLv01.ns2:gelijk.ns2:heeftAlsInitiator.ns2:gerelateerde.ns2:identificatie",
"identificatie": "unsetIfValue==SOAP-ENV:Body.ns2:zakLv01.ns2:gelijk.ns2:identificatie"
},
"passTrough": false
}
32 changes: 32 additions & 0 deletions Installation/Mapping/ZgwZaakToZdsResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "ZgwZaakToZdsResponse",
"$id": "https://zds.nl/mapping/zds.ZgwZaakToZdsResponse.mapping.json",
"$schema": "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version": "0.0.1",
"passTrough": false,
"mapping": {
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:berichtcode": "La01",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:zender.StUF:organisatie": "SIM",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:zender.StUF:applicatie": "SIMsite",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:zender.StUF:administratie": "",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:zender.StUF:gebruiker": "",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:ontvanger.StUF:organisatie": "1892",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:ontvanger.StUF:applicatie": "Liber",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:ontvanger.StUF:administratie": "",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:ontvanger.StUF:gebruiker": "",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:referentienummer": "identificatie",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:tijdstipBericht": "{{ 'now'|date('YmdHisv') }}",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:stuurgegevens.StUF:entiteittype": "ZAK",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:parameters.StUF:mutatiesoort": "T",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:parameters.StUF:indicatorOvername": "V",
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:antwoord.ZKN:object": "{{ map(\"https://zds.nl/mapping/zds.ZgwZaakToZdsResponseItem.mapping.json\", results, true)|json_encode }}",
"@xmlns:SOAP-ENV": "http://schemas.xmlsoap.org/soap/envelope/",
"@xmlns:StUF": "http://www.egem.nl/StUF/StUF0301",
"@xmlns:ZKN": "http://www.egem.nl/StUF/sector/zkn/0310",
"@xmlns:ns3": "http://www.egem.nl/StUF/sector/bg/0310",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
},
"cast": {
"SOAP-ENV:Body.ZKN:zakLa01.ZKN:antwoord.ZKN:object": ["jsonToArray"]
}
}
37 changes: 37 additions & 0 deletions Installation/Mapping/ZgwZaakToZdsResponseItem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"title": "ZgwZaakToZdsResponseItem",
"$id": "https://zds.nl/mapping/zds.ZgwZaakToZdsResponseItem.mapping.json",
"$schema": "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version": "0.0.1",
"passTrough": false,
"mapping": {
"@StUF:entiteittype": "ZAK",
"@StUF:sleutelVerzendend": "12004",
"@StUF:sleutelGegevensbeheer": "12004",
"ZKN:identificatie": "identificatie",
"ZKN:omschrijving": "omschrijving",
"ZKN:toelichting": "toelichting",
"ZKN:startdatum": "startdatum",
"ZKN:registratiedatum": "registratiedatum",
"ZKN:publicatiedatum": "publicatiedatum",
"ZKN:einddatumGepland": "einddatumGepland",
"ZKN:uiterlijkeEinddatum": "uiterlijkeEinddatumAfdoening",
"ZKN:betalingsIndicatie": "betalingsindicatie",
"ZKN:laatsteBetaaldatum": "laatsteBetaaldatum",
"ZKN:zaakniveau": "1",
"ZKN:deelzakenIndicatie": "N",
"StUF:extraElementen.StUF:extraElement": "[{% for eigenschap in eigenschappen %}{% if not loop.first %},{% endif %}{{ map('https://zds.nl/mapping/zds.ZgwEigenschapToZds.mapping.json', eigenschap)|json_encode }}{% endfor %}]",
"ZKN:isVan.@StUF:entiteittype": "ZAKZKT",
"ZKN:isVan.@StUF:verwerkingssoort": "T",
"ZKN:isVan.ZKN:gerelateerde.@StUF:entiteittype": "ZKT",
"ZKN:isVan.ZKN:gerelateerde.@StUF:sleutelOntvangend": "5700000000000000000000000000000000000001",
"ZKN:isVan.ZKN:gerelateerde.@StUF:verwerkingssoort": "T",
"ZKN:isVan.ZKN:gerelateerde.ZKN:omschrijving": "Verhuizing doorgeven",
"ZKN:isVan.ZKN:gerelateerde.ZKN:code": "VERDOOR",
"ZKN:heeftAlsInitiator": "{% if rollen.0 is defined %}{{ map(\"https://zds.nl/mapping/zds.ZgwZaakToZdsResponseItemInitiator.mapping.json\", rollen.0)|json_encode }}{% else %}\"\"{% endif %}"
},
"cast": {
"StUF:extraElementen.StUF:extraElement": "jsonToArray",
"ZKN:heeftAlsInitiator": ["jsonToArray", "unsetIfValue=="]
}
}
32 changes: 32 additions & 0 deletions Installation/Mapping/ZgwZaakToZdsResponseItemInitiator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "ZgwZaakToZdsResponseItemInitiator",
"$id": "https://zds.nl/mapping/zds.ZgwZaakToZdsResponseItemInitiator.mapping.json",
"$schema": "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version": "0.0.1",
"passTrough": false,
"mapping": {
"@StUF:entiteittype": "ZAKBTRINI",
"@StUF:verwerkingssoort": "T",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.@StUF:entiteittype": "NPS",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.@StUF:verwerkingssoort": "T",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:inp.bsn": "betrokkeneIdentificatie.inpBsn",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:authentiek.@StUF:metagegeven": "true",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:authentiek": "J",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:geslachtsnaam": "betrokkeneIdentificatie.geslachtsnaam",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:voorvoegselGeslachtsnaam.@xsi:nil": "true",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:voorvoegselGeslachtsnaam": "betrokkeneIdentificatie.voorvoegselGeslachtsnaam",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:voorletters.@xsi:nil": "true",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:voorletters": "betrokkeneIdentificatie.voorletters",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:voornamen": "betrokkeneIdentificatie.voornamen",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:geslachtsaanduiding.@xsi:nil": "true",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:geslachtsaanduiding": "betrokkeneIdentificatie.geslachtsaanduiding",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:geboortedatum": "betrokkeneIdentificatie.geboortedatum",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:wpl.woonplaatsNaam": "betrokkeneIdentificatie.verblijfsadres.wplWoonplaatsNaam",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:gor.openbareRuimteNaam": "betrokkeneIdentificatie.verblijfsadres.gorOpenbareRuimteNaam",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:gor.straatnaam.@xsi:nil": "true",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:aoa.postcode": "betrokkeneIdentificatie.verblijfsadres.aoaPostcode",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:aoa.huisnummer": "betrokkeneIdentificatie.verblijfsadres.aoaHuisnummer",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:aoa.huisletter": "betrokkeneIdentificatie.verblijfsadres.aoaHuisletter",
"ZKN:gerelateerde.ZKN:natuurlijkPersoon.BG:verblijfsadres.BG:aoa.huisnummertoevoeging": "betrokkeneIdentificatie.verblijfsadres.aoaHuisnummertoevoeging"
}
}
32 changes: 32 additions & 0 deletions Installation/Source/zgw.zrc.source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "ZGW ZRC API",
"$id": "https://zds.vng.nl/endpoints/zgw.zrc.source.json",
"$schema": "https://docs.commongateway.nl/schemas/Gateway.schema.json",
"version": "0.0.1",
"description": "ZGW ZRC source for ZDS proxies",
"location": "!ChangeMe!",
"isEnabled" : false,
"headers": {
"accept" : "application/json",
"Accept-Crs": "EPSG:4326",
"Content-Crs": "EPSG:4326"
},
"auth": "none",
"configuration": {
"verify": false
},
"endpointsConfig": {
"/zaken/_zoek": {
"out": {
"body": {
"mapping": "https://zds.vng.nl/mappings/zdsLv01ToZGWGeoSearch.mapping.json"
}
},
"in": {
"body": {
"mapping": "https://zds.nl/mapping/zds.ZgwZaakToZdsResponse.mapping.json"
}
}
}
}
}
15 changes: 15 additions & 0 deletions Installation/installation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
{
"installationService": "CommonGateway\\ZGWToZDSBundle\\Service\\InstallationService",
"endpoints": {
"sources": [
{
"name": "ZDS Request Endpoint",
"reference": "https://zds.vng.nl/endpoints/zgw.zrc.source.json",
"path": "stuf/zds/requests",
"methods": [
"POST"
],
"throws": [
"zgwToZds.xmlEncode"
]
}
]
},
"actions": {
"handlers": [
{
Expand Down
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ Basic knowledge of the [Common Gateway](https://github.com/CommonGateway)

This template is for rapid Symfony bundle development and meant as a model to base your custom plugin on. Follow the next steps to create your plugin within 45 minutes or less

1. Login on [GitHub](https://github.com)
2. Use [this template](https://github.com/CommonGateway/ZGW-to-ZDSBundle/generate)
3. Name your Bundle (CamelCase). The bundle needs to end with `Bundle` as per Symfony [naming](https://symfony.com/doc/current/bundles/best_practices.html#bundles-naming-conventions) conventions.
4. Press the green button `Create repository from template`
5. Update file names and namespace to your fitting :
1. Login on [GitHub](https://github.com)
2. Use [this template](https://github.com/CommonGateway/ZGW-to-ZDSBundle/generate)
3. Name your Bundle (CamelCase). The bundle needs to end with `Bundle` as per Symfony [naming](https://symfony.com/doc/current/bundles/best_practices.html#bundles-naming-conventions) conventions.
4. Press the green button `Create repository from template`
5. Update file names and namespace to your fitting :

* Open composer.json, and change the name to your fitting. The first word should be the namespace, and the second the bundle's name.
* Open composer.json, and change the name to your fitting. The first word should be the namespace, and the second the bundle's name.

> Note: this is kebab-case. Also read: [naming your package](https://packagist.org/about#naming-your-package)
> Note: this is kebab-case. Also read: [naming your package](https://packagist.org/about#naming-your-package)

* Check the autoload field to be set accordingly.
* Open PetStoreBundle.php and change the Bundle `name` and `namespace`. The namespace should be the same as your package name in `composer.json` but in CamelCase. So `common-gateway/pet-store-bundle` becomes `CommonGateway/ZGW-to-ZDSBundle`
* Rename the `/Service` and `/ActionHandler` accordingly (or delete if not used).
* Rename the `/DependencyInjection/PetStoreExtension.php` to your `BundleNameExtension.php`
* Rename the `/Resources/config/services.yaml` namespaces
* Check the autoload field to be set accordingly.
* Open PetStoreBundle.php and change the Bundle `name` and `namespace`. The namespace should be the same as your package name in `composer.json` but in CamelCase. So `common-gateway/pet-store-bundle` becomes `CommonGateway/ZGW-to-ZDSBundle`
* Rename the `/Service` and `/ActionHandler` accordingly (or delete if not used).
* Rename the `/DependencyInjection/PetStoreExtension.php` to your `BundleNameExtension.php`
* Rename the `/Resources/config/services.yaml` namespaces

### Adding schemas

Expand All @@ -74,16 +74,22 @@ You can add existing schemas or create your own and add them to the`/Schema` fol

The following properties are required, and without them, the Gateway won't recognize the schema as valid:

- `version` can start on '0.1.0.'
```
- `version` can start on '0.1.0.'
```

> without this property, you can't update schemes

- `$schema` (https://docs.commongateway.nl/schemas/Entity.schema.json)
- `$id` (https://example.com/schema/{Your scheme name}.schema.json)
```
- `$schema` (https://docs.commongateway.nl/schemas/Entity.schema.json)
- `$id` (https://example.com/schema/{Your scheme name}.schema.json)
```

> Unique `$id` to be relatable to other schemas.

- `type` must be 'object'
- `properties` must be schema properties
```
- `type` must be 'object'
- `properties` must be schema properties
```

Once you add schemas to the repository, you can also add objects/data for those schemas. There is an example shown in the [`/Data`](https://github.com/CommonGateway/ZGW-to-ZDSBundle/tree/main/Data) folder.
4 changes: 2 additions & 2 deletions docs/classes/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CommonGateway\ZGWToZDSBundle

* [Service\InstallationService](Service/InstallationService.md)
* [Service\ZGWToZDSService](Service/ZGWToZDSService.md)
* [Service\InstallationService](Service/InstallationService.md)
* [Service\ZGWToZDSService](Service/ZGWToZDSService.md)
Loading
Loading