Serves a single merged OpenAPI spec based on any number of OpenAPI specs defined under paths in values.yaml.
Includes a node service with three endpoints:
- GET
/api-docsto access the merged API spec /swaggerto view the merged API spec in Swagger- POST
/set-api-docsto set the merged API spec
The merge is automated via a Helm CronJob. that runs openapi-merge-cli then posts the merged doc to set-api-docs every minute.
openapi-merger can be run in a similar way to most nodejs applications. First install required dependencies using npm:
npm installAnd run the application in development mode with:
npm run devOr run tests with:
npm testopenapi-merger is configured primarily using environment variables as follows:
| variable | required | default | description |
|---|---|---|---|
| LOG_LEVEL | N | info |
Logging level. Valid values are [trace, debug, info, warn, error, fatal] |
| PORT | N | 80 |
Port on which the service will listen |
| API_DOCS_FILE_PATH | N | ./api-docs.json |
Location of the api-docs file on the filesystem |
| API_PUBLIC_URL_PREFIX | N | `` | Public prefix to prepend for accessing api-docs |