Skip to content
Snippets Groups Projects
Unverified Commit ab096af3 authored by Martin Weise's avatar Martin Weise
Browse files

Added dist

parent e1cef7ab
No related branches found
No related tags found
No related merge requests found
Pipeline #2846 failed
Showing
with 154 additions and 68 deletions
......@@ -19,6 +19,15 @@ swagger/api-metadata/
swagger/api-query/
swagger/api-table/
swagger/api-units/
swagger/analyse/*
swagger/authentication/*
swagger/container/*
swagger/database/*
swagger/identifier/*
swagger/metadata/*
swagger/query/*
swagger/table/*
swagger/units/*
## Keys
id_rsa
......
......@@ -9,12 +9,6 @@ clean:
release: release-docs release-dockerhub
release-docs:
cd ./swagger && ./generate.sh
docker compose build dbrepo-docs
docker tag dbrepo-docs:latest "dbrepo/docs:${TAG}"
docker push "dbrepo/docs:${TAG}"
release-dockerhub:
sudo pip3 install -r ./requirements.txt
python3 ./dockerhub/release.py
......@@ -24,6 +18,7 @@ verify:
build:
mkdocs build
cd ./swagger && ./generate.sh
configure:
sudo certbot certonly --standalone --preferred-challenges http -d dbrepo-docs.ossdip.at --agree-tos --keep-until-expiring
......
version: "3.8"
services:
dbrepo-docs:
image: dbrepo-docs
restart: on-failure
build: ./swagger
container_name: dbrepo-docs
hostname: dbrepo-docs
ports:
- "8080:8080"
\ No newline at end of file
......@@ -16,12 +16,12 @@ hide:
We thought the easiest way to make documentation of the endpoints available was through the interactive in-code
documentation of Swagger:
* [Analyse Service](https://dbrepo2.ec.tuwien.ac.at/docs/analyse)
* [Authentication Service](https://dbrepo2.ec.tuwien.ac.at/docs/authentication)
* [Container Service](https://dbrepo2.ec.tuwien.ac.at/docs/container)
* [Database Service](https://dbrepo2.ec.tuwien.ac.at/docs/database)
* [Identifier Service](https://dbrepo2.ec.tuwien.ac.at/docs/identifier)
* [Metadata Service](https://dbrepo2.ec.tuwien.ac.at/docs/metadata)
* [Query Service](https://dbrepo2.ec.tuwien.ac.at/docs/query)
* [Table Service](https://dbrepo2.ec.tuwien.ac.at/docs/table)
* [Units Service](https://dbrepo2.ec.tuwien.ac.at/docs/units)
\ No newline at end of file
* [Analyse Service](//swagger/analyse)
* [Authentication Service](//swagger/authentication)
* [Container Service](//swagger/container)
* [Database Service](//swagger/database)
* [Identifier Service](//swagger/identifier)
* [Metadata Service](//swagger/metadata)
* [Query Service](//swagger/query)
* [Table Service](//swagger/table)
* [Units Service](//swagger/units)
\ No newline at end of file
FROM nginx:latest AS runtime
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
ARG SWAGGER_UI_VERSION=4.15.2
RUN echo 1
# reset
RUN rm -f /usr/share/nginx/html/*
WORKDIR /app
ADD "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${SWAGGER_UI_VERSION}.tar.gz" /app/tmp.tar.gz
RUN tar xzfv /app/tmp.tar.gz --strip-components 1 && rm -f /app/tmp.tar.gz
COPY ./swagger-initializer.js ./swagger-initializer.js
COPY ./docker-build.sh ./docker-build.sh
RUN chmod +x ./docker-build.sh
COPY ./nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html/
COPY ./index.html ./index.html
COPY ./api-analyse.yaml ./docs/analyse/api.yaml
COPY ./api-authentication.yaml ./docs/authentication/api.yaml
COPY ./api-container.yaml ./docs/container/api.yaml
COPY ./api-database.yaml ./docs/database/api.yaml
COPY ./api-identifier.yaml ./docs/identifier/api.yaml
COPY ./api-metadata.yaml ./docs/metadata/api.yaml
COPY ./api-query.yaml ./docs/query/api.yaml
COPY ./api-table.yaml ./docs/table/api.yaml
COPY ./api-units.yaml ./docs/units/api.yaml
EXPOSE 8080
# generate
RUN bash /app/docker-build.sh
\ No newline at end of file
swagger/dist/favicon-16x16.png

665 B

swagger/dist/favicon-32x32.png

628 B

html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #fafafa;
}
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
</head>
<body>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
</body>
</html>
<!doctype html>
<html lang="en-US">
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}
arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value);
}
) : {};
isValid = qp.state === sentState;
if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
if (document.readyState !== 'loading') {
run();
} else {
document.addEventListener('DOMContentLoaded', function () {
run();
});
}
</script>
</body>
</html>
......@@ -3,7 +3,7 @@ window.onload = function() {
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: "api.yaml",
url: "./api.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
......
This diff is collapsed.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment