-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add documentation endpoint #187
base: stable
Are you sure you want to change the base?
Conversation
this endpoint is to be queried by our swagger instance
Codecov Report
@@ Coverage Diff @@
## master #187 +/- ##
===========================================
- Coverage 100.00% 99.70% -0.30%
===========================================
Files 42 44 +2
Lines 1321 1340 +19
Branches 202 204 +2
===========================================
+ Hits 1321 1336 +15
- Misses 0 4 +4
Continue to review full report at Codecov.
|
// NODE_ENV is specified. | ||
exports.env = process.env.NODE_ENV || 'development'; | ||
exports.host = process.env.X_HOST || os.hostname(); | ||
exports.name = process.env.npm_package_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we take it from ../package.json
the same way as in /healthcheck?
// Endpoints not requiring authorization. | ||
GeneralRouter.get('/api-docs.json', (req, res) => { // mini-route to retrieve the docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move it to middlewares/
? either to /middlewares/generic.js
or create other file to store it
idea is that lib/server.js
contains the routing (e.g. this route is served by these middlewares), and not the middlewares themselves (they are stored in middlewares/*
this endpoint is to be queried by our swagger instance
NB: the docs themselves are NOT complete