Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

CommonGateway/NotificatieAPI

Repository files navigation

Notificatie API

Automated Testing

An implementation of a Common Gateway configuration for generating an API. OAS and testdata for VNG notifications api.

About Common Gateway configuration files

Read more..

Creating your own documentation

This Commmon Gateway configuration repository is bassed on petstore an example Open API Specification from our friends at redocly. In order to create and maintain Open Api Secifications files we recomend using stoplight, you can find the stoplight project for Pet Store here. For convience purpose a copy of the Pet strore oas is stored in this repository here.

The public code for this ropository was genereted trough the publiccode yaml editor.

Running the API locally

You need Docker desktop if you want to use this API locally on the gateway. Once you have installed docker you need to go to the root of the project with a command line.

Then you can run the image with:

docker compose up

If the php container shows "Ready to handle connections" the gateway is ready. The API runs on port :80 and the endpoints of this API fall under /api

Running the API online

To run the API on a online gateway the helm secret PUBLICCODE must be set with the url to the raw publiccode.yaml, like: https://raw.githubusercontent.com/CommonGateway/PetStoreAPI/main/publiccode.yaml

If its properly set you can run the following command in a PHP pod:

bin/console app:load-publiccodes

The console should show if the API has been loaded successfully, and then you can make API requests to yourdomain/api.

(Unit) Testing the API

On every commit github launches a action that generates a postman collection and tests the API. Its results can be viewed under Actions on the github page.