A Lambda function that translates from the Apibuilder service.json to a JSON document that adheres to Swagger Spec 2.0
There are some unit tests that rely on service.json from from existing APIs hosted in Apibuilder. These can be refreshed by running
> bin/refresh-specs.sh
These should be refreshed whenever the service.json format changes, or the APIs themselves change in a way that we would like to capture in testing here. The changes should be checked in, to document how the tests have changed over time. In order to run the script, you need to have jq installed locally.
For the .json files that contain the Swagger output, it is a manual process to:
- Capture the output
- Properly lint the output
- Import it into Swagger
- Verify that the resultant Swagger definition properly reflects the original service.json
Due to #4, this process isn't automated.
This is deployed using [cloud-formation/pipeline.yml], tied to master. Any merges to master should trigger a new deployment through this pipeline.