diff --git a/src/openApi.json b/src/openApi.json new file mode 100644 index 0000000..5679f16 --- /dev/null +++ b/src/openApi.json @@ -0,0 +1,18 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Signal K Charts API", + "version": "1.0" + }, + "paths": { + "/charts": { + "get": { + "responses": { + "200": { + "description": "A list of available charts" + } + } + } + } + } +} \ No newline at end of file diff --git a/src/plugin.js b/src/plugin.js index c99c048..26a6cb3 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -5,6 +5,7 @@ const path = require('path') const fs = require('fs') const Charts = require('./charts') const {apiRoutePrefix} = require('./constants') +const openApi = require('./openApi') const MIN_ZOOM = 1 const MAX_ZOOM = 19 @@ -161,7 +162,8 @@ module.exports = function(app) { } }, start, - stop + stop, + openApiPaths: () => openApi.paths } }