tewhatuora / api-standards

Health New Zealand | Te Whatu Ora API Development and Security Standards
https://apistandards.digital.health.nz
Other
9 stars 1 forks source link

READY FOR REVIEW - Standards extraction #159

Closed kyle-mwnz closed 4 months ago

kyle-mwnz commented 4 months ago

This pull request adds the feature to extract the RFC2119 defined standards from the API Standards body text, into a format that can be accessed programmatically, and in a human readable format in a single place.

This is achieved through the use of a re-useable React component to define a Standard.

Documentation around the usage of this component has been added to the README.md. When the website build runs, the scripts/extractStandards.js script runs which collates all the standards into a JSON file. This is served by the website at /assets/api-standards.json. This file is used by the Checklist component, with future intended use by a conformance tool.

To preview these changes, a local website build must be run.

npm run build - Build the website locally npm run serve - Serve the build website locally

The checklist may be viewed at http://localhost:3000/draft/checklist when running locally, or via the side navigation.

Checklist page preview:

image

In place content preview:

image