You send an https request with links to your service and to the openapi specification of your service.
The service then runs a number of tests on your service and returns a test report. The test report describes which test passed or failed or was skipped.
The EDR service is dependent on a functional OpenApi specification. It is suggested the OpenApi specification is validated before testing the EDR service. Use the /openapi testpoint to validate the OpenApi specification only.
curl -X 'GET' \
'http://edrvalidator.k8s.met.no/validate/openapi?apiDefinition=https://example.com/api/openapi.yaml' \
-H 'accept: text/plain; charset=utf-8'
You service must support paths both with and without a / at the end.
So for example this validator assumes that your service support the following:
/collection?
/collection/?
These two paths are assumed to represent the same resource.
curl -X 'GET' \
'http://edrvalidator.k8s.met.no/validate/edr?iut=https://example.com&apiDefinition=https://example.com/api/openapi.yaml' \
-H 'accept: application/json'
This will return a json document. In that document there are links to the validation report in several formats. Get the link for the `html-report` and paste it into a browser to view the result.
At the moment the service is in an alpha stage, so expect breaking changes with no warning.
When the service stabilises we will handle major changes to the service by versioning the url path.
We will also update the changelog.
docker run -ti --rm --name edrvalidator --network host -p 8000:8000 registry.met.no/team-punkt/edr/edrvalidator:v0.0.10
http://edrvalidator.k8s.met.no
curl -X 'GET' \
'http://edrvalidator.k8s.met.no/validate/openapi?apiDefinition=https://example.com/api/openapi.yaml' \
-H 'accept: text/plain; charset=utf-8'
curl -X 'GET' \
'http://edrvalidator.k8s.met.no/validate/edr?iut==https://example.com&apiDefinition=https://example.com/api/openapi.yaml' \
-H 'accept: text/plain; charset=utf-8'
We use regular 4xx and 5xx http status codes, as close as possible to the HTTP specification. Some errors will have a message of what went wrong in it. Some errors will respons with json. Do not encode those json error responses, as they might change without proper versioning as described above.