The eligibility-signposting-api is based on an OpenAPI specification maintained at /specification/eligibility-signposting-api.yaml. We use Redocly CLI to inject environment-specific elements into the base specification, allowing us to publish to different environments without manual editing or maintaining duplicate specifications.
Each directory contains environment specific configuration for the specification. If the configuration doesn't exist for your chosen environment, then add it.
Contains environment-specific security configurations for each endpoint.
Contains APIM extensions to the OpenAPI specification with deployment requirements:
- access: Environment-specific access patterns
- rate-limit: API rate limiting configurations
- target: API backend details for proxy configuration
To build a specification for a specific environment:
- Set the target environment using the
APIM_ENVparameter - Run
make construct-specfrom the repository root, which:- Updates templates with environment-specific values
- Uses Redocly to compile the complete specification to
build/specification/
- For the
sandboxenvironment, runmake publishto convert the specification to JSON and save it tosandbox/specification/for immediate use
See the Proxygen CLI user guide
We deploy our specifications using the Proxygen CLI. In order to do this, the following steps need to be performed:
- Construct the specification for the environment of your choice, following the instructions above.
- Run
make retrieve-proxygen-keyfrom the root directory to retrieve the private key needed to authenticate with Proxygen. - Run
make setup-proxygen-credentialsfrom the root directory to set up credentials needed to interact with our API proxy. - Run
proxygen instance deploy <environment> eligibility-signposting-api ./build/specification/eligibility-signposting-api.yamlto deploy the specification to a chosen environment.