Add an OpenAPI specification to your documentation
OpenAPI is an API description format for RESTful APIs. The GDS Open Standards board recommends that government organisations use OpenAPI version 3 to describe RESTful APIs.
The template can extract endpoint information from an Open API v3 specification in a YAML file.
Amend the tech-docs.yml file
Add the following to your tech-docs.yml file:
This can be a relative path to a file in your tech docs repo folder, for example:
This can also be a URL to a file hosted elsewhere, for example:
Amend the content file
Add the following line to the content file that you want to output the API information to:
You can specify individual endpoints to be outputted rather than all API information, for example::