wearefrank / zaakbrug

An app for Dutch municipalities that supports the transition from "zaak- en documentatieservices" (zds) to "zaakgericht werken" (zgw).
https://zaakbrug.nl
European Union Public License 1.2
5 stars 5 forks source link

Fetch ZGW API version dynamically from an OpenAPI spec provided by a configured OpenAPI spec download endpoint #419

Open MLenterman opened 3 months ago

MLenterman commented 3 months ago

For backwards compatibility and the ability to use the newest ZGW API functionality, we need to create conditional alternate execution paths based on the version of the API we are communicating with. For example the recently added "expand" mechanism that is only available from a certain version of the API's.

Currently it is possible to configure a DeploymentSpecifics property called zaakbrug.zgw.<api-name>-api.version to base these conditions on. We would like to have an additional property per API called zaakbrug.zgw.<api-name>-api.oas-endpoint to configure an endpoint where the OpenAPI spec for that API can be downloaded. Once downloaded, we can fetch the API version number from the OpenAPI spec.