Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
metaRoutes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libs
metaRoutes
Commits
b41d82e0
Commit
b41d82e0
authored
1 year ago
by
Sigmund, Dominik
Browse files
Options
Downloads
Patches
Plain Diff
Add openapi definitions and fix package.main
parent
8727ba0b
Branches
Branches containing commit
Tags
1.1.0
Tags containing commit
No related merge requests found
Pipeline
#56941
passed
1 year ago
Stage: test
Stage: publish
Changes
3
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.vscode/settings.json
+5
-0
5 additions, 0 deletions
.vscode/settings.json
index.js
+27
-0
27 additions, 0 deletions
index.js
package.json
+2
-2
2 additions, 2 deletions
package.json
with
34 additions
and
2 deletions
.vscode/settings.json
0 → 100644
+
5
−
0
View file @
b41d82e0
{
"[markdown]"
:
{
"editor.cursorSurroundingLines"
:
0
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
index.js
+
27
−
0
View file @
b41d82e0
...
...
@@ -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
This diff is collapsed.
Click to expand it.
package.json
+
2
−
2
View file @
b41d82e0
{
"name"
:
"@libs/metaroutes"
,
"version"
:
"1.
0
.0"
,
"version"
:
"1.
1
.0"
,
"description"
:
"Add default metaroutes to express app"
,
"main"
:
"index.
t
s"
,
"main"
:
"index.
j
s"
,
"scripts"
:
{
"test"
:
"jest"
,
"test:mutation"
:
"stryker run"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment