Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoBackendAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Backend
DojoBackendAPI
Commits
2eeffdcc
Commit
2eeffdcc
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Plain Diff
Merge branch 'v3.1.2' into main
parents
3fcb802a
c9ce3f7a
Branches
Branches containing commit
Tags
3.1.2
Tags containing commit
No related merge requests found
Pipeline
#27179
passed
1 year ago
Stage: code_quality
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ExpressAPI/assets/OpenAPI/OpenAPI.yaml
+1
-1
1 addition, 1 deletion
ExpressAPI/assets/OpenAPI/OpenAPI.yaml
ExpressAPI/package.json
+1
-1
1 addition, 1 deletion
ExpressAPI/package.json
ExpressAPI/src/express/API.ts
+8
-5
8 additions, 5 deletions
ExpressAPI/src/express/API.ts
with
10 additions
and
7 deletions
ExpressAPI/assets/OpenAPI/OpenAPI.yaml
+
1
−
1
View file @
2eeffdcc
openapi
:
3.1.0
info
:
title
:
Dojo API
version
:
3.1.
0
version
:
3.1.
2
description
:
|
**Backend API of the Dojo project.**
...
...
This diff is collapsed.
Click to expand it.
ExpressAPI/package.json
+
1
−
1
View file @
2eeffdcc
{
"name"
:
"dojo_backend_api"
,
"description"
:
"Backend API of the Dojo project"
,
"version"
:
"3.1.
1
"
,
"version"
:
"3.1.
2
"
,
"license"
:
"AGPLv3"
,
"author"
:
"Michaël Minelli <dojo@minelli.me>"
,
"main"
:
"dist/src/app.js"
,
...
...
This diff is collapsed.
Click to expand it.
ExpressAPI/src/express/API.ts
+
8
−
5
View file @
2eeffdcc
...
...
@@ -47,8 +47,10 @@ class API implements WorkerTask {
private
initSwagger
()
{
const
options
=
{
swaggerOptions
:
{
url
:
'
/docs/OpenAPI.yaml
'
customSiteTitle
:
'
Dojo API
'
,
explorer
:
false
,
swaggerOptions
:
{
url
:
'
../OpenAPI.yaml
'
}
};
this
.
backend
.
get
(
'
/docs/OpenAPI.yaml
'
,
(
req
,
res
)
=>
res
.
sendFile
(
path
.
resolve
(
__dirname
+
'
/../../assets/OpenAPI/OpenAPI.yaml
'
)));
...
...
@@ -56,16 +58,17 @@ class API implements WorkerTask {
this
.
backend
.
get
(
'
/docs/redoc.html
'
,
(
req
,
res
)
=>
res
.
sendFile
(
path
.
resolve
(
__dirname
+
'
/../../assets/OpenAPI/redoc.html
'
)));
this
.
backend
.
get
(
'
/docs/
'
,
(
req
,
res
)
=>
{
const
prefix
=
req
.
url
.
slice
(
-
1
)
===
'
/
'
?
''
:
'
docs/
'
;
res
.
send
(
`
<!DOCTYPE html>
<html lang="en">
<body>
<ul>
<li><a href="
/docs/
OpenAPI.yaml">OpenAPI</a></li>
<li><a href="
${
prefix
}
OpenAPI.yaml">OpenAPI</a></li>
<li>GUI
<ul>
<li><a href="
/docs/
swagger">Swagger</a></li>
<li><a href="
/docs/
redoc.html">Redoc</a></li>
<li><a href="
${
prefix
}
swagger
/
">Swagger</a></li>
<li><a href="
${
prefix
}
redoc.html">Redoc</a></li>
</ul>
</li>
</ul>
...
...
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