diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..8a049e062636bf456b8cc3aadbc5b1b2d145656b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "[markdown]": { + "editor.cursorSurroundingLines": 0 + } +} \ No newline at end of file diff --git a/index.js b/index.js index 574bdbde12f76834a5f608bd5de83b807cee5670..e33e0843ab93b1350d8d61e64dd9384e3c0bc4ac 100644 --- a/index.js +++ b/index.js @@ -47,3 +47,30 @@ function metaRoutes(app, { version, config, isServiceReady, metricsEndpoint }, r } module.exports = metaRoutes; +/** + * GET /_version + * @summary Returns the version of the service + * @tags meta + * @return {string} 200 - The version of the service + */ + /** + * GET /_config + * @summary Returns the configuration of the service with redacted secrets + * @tags meta + * @return {object} 200 - The configuration of the service + */ + /** + * GET /_health + * @summary Returns the health of the service + * @description This endpoint is used to check if the service is healthy and should always return 200 + * @tags meta + * @return {string} 200 - OK + */ + /** + * GET /_ready + * @summary Returns the readiness of the service + * @description This endpoint is used to check if the service is ready and should return 200 if the service is ready to serve requests + * @tags meta + * @return {string} 200 - OK + * @return {string} 503 - Service Unavailable + */ \ No newline at end of file diff --git a/package.json b/package.json index 08390133bf4581e19351f72903ea96fd1274f09a..372aebd4426b9e5f35338fcfd3cac034fab02a84 100755 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@libs/metaroutes", - "version": "1.0.0", + "version": "1.1.0", "description": "Add default metaroutes to express app", - "main": "index.ts", + "main": "index.js", "scripts": { "test": "jest", "test:mutation": "stryker run"