Skip to content

Conformance tooling for the Health New Zealand Te Whatu Ora API Standards

License

Notifications You must be signed in to change notification settings

tewhatuora/api-standards-conformance

Repository files navigation


Health New Zealand Te Whatu Ora Logo

Health New Zealand | Te Whatu Ora API Conformance Tool

This project is a conformance tool framework designed to assess an API against the Te Whatu Ora API Standards which are officially published at https://apistandards.digital.health.nz.

Getting Started

Running the tool as a Docker container

Pull the latest image:

docker pull ghcr.io/tewhatuora/api-standards-conformance:latest

Run a conformance test (note you must have a valid config.json in the current working directory):

docker run -it -v $(pwd)/config.json:/usr/src/app/config.json -v $(pwd)/reports:/usr/src/app/reports ghcr.io/tewhatuora/api-standards-conformance

To merge custom features with the base implementation, mount to /opt/features

docker run -v$(pwd)/override:/opt/features -v $(pwd)/config.json:/usr/src/app/config.json -v $(pwd)/reports:/usr/src/app/reports ghcr.io/tewhatuora/api-standards-conformance

To execute specific specific tags

docker run -v$(pwd)/override:/opt/features -v $(pwd)/config.json:/usr/src/app/config.json -v $(pwd)/reports:/usr/src/app/reports ghcr.io/tewhatuora/api-standards-conformance --tags @fhir

To skip specific specific tags

docker run -v$(pwd)/override:/opt/features -v $(pwd)/config.json:/usr/src/app/config.json -v $(pwd)/reports:/usr/src/app/reports ghcr.io/tewhatuora/api-standards-conformance --tags '"not @not-implemented"'

Development

This tool is distributed as a Docker container, or you can build it yourself.

Install dependencies:

yarn

Run the tool without Docker:

yarn test yarn report

Build the container locally:

yarn build

Run the container locally (test):

yarn test:docker

Run the container locally (report):

yarn test:report

Configuration

Configuration for the tool is via a config.json file. When running in Docker, this file on the host should be mounted to /usr/src/app/config.json (see below). When running locally, the config.json must be present at the root of the project.

This configuration must be carefully reviewed prior to running the conformance tool.

Example report:

Example report

License

This work is licensed under CC BY-NC-ND 4.0. Refer to the LICENSE file for information.

CC BY 4.0

About

Conformance tooling for the Health New Zealand Te Whatu Ora API Standards

Resources

License

Stars

Watchers

Forks

Packages