A Lambda function that translates from the Apidoc 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 Apidoc. These can be refreshed by running
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.