Skip to content
Snippets Groups Projects
Verified Commit 7293c2a3 authored by Martin Weise's avatar Martin Weise
Browse files

Updated docs

parent 5c5e55d9
No related branches found
No related tags found
3 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0
Showing
with 421 additions and 552 deletions
...@@ -12,7 +12,7 @@ info: ...@@ -12,7 +12,7 @@ info:
name: Apache 2.0 name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0 url: https://www.apache.org/licenses/LICENSE-2.0
title: Database Repository Analyse Service API title: Database Repository Analyse Service API
version: dbrepo-latest version: $TAG
openapi: 3.0.0 openapi: 3.0.0
paths: paths:
/api/analyse/determinedt: /api/analyse/determinedt:
...@@ -48,8 +48,6 @@ paths: ...@@ -48,8 +48,6 @@ paths:
'405': '405':
description: Invalid input description: Invalid input
summary: Determine datatypes summary: Determine datatypes
tags:
- analyse-endpoint
/api/analyse/determinepk: /api/analyse/determinepk:
post: post:
consumes: consumes:
...@@ -78,88 +76,6 @@ paths: ...@@ -78,88 +76,6 @@ paths:
'405': '405':
description: Invalid input description: Invalid input
summary: Determine primary keys summary: Determine primary keys
tags:
- analyse-endpoint
/api/analyse/determinestat:
post:
operationId: determinestat
requestBody:
content:
application/json:
schema:
properties:
database_id:
example: 1
type: integer
table_id:
example: 1
type: integer
required:
- database_id
- table_id
type: object
responses:
'200':
content:
application/json:
schema:
properties:
message:
example: Analysed statistical properties
type: string
status:
example: '200'
type: integer
required:
- message
- status
type: object
description: Determined statistics
'400':
description: Invalid input
ontent:
application/json:
schema:
properties:
message:
example: Analysed statistical properties
type: string
status:
example: '200'
type: integer
required:
- message
- status
type: object
summary: Determine statistics
tags:
- analyse-endpoint
/api/analyse/determinestats:
post:
operationId: determinestats
requestBody:
content:
application/json:
schema:
properties:
filepath:
example: file.csv
type: string
separator:
example: ','
type: string
required:
- filepath
- separator
type: object
responses:
'200':
description: Determined statistics
'400':
description: Invalid input
summary: Determine statistics
tags:
- analyse-endpoint
/health: /health:
get: get:
consumes: consumes:
...@@ -182,10 +98,8 @@ paths: ...@@ -182,10 +98,8 @@ paths:
'200': '200':
description: OK description: OK
summary: Check if application is running summary: Check if application is running
tags:
- health-endpoint
servers: servers:
- description: Generated server url - description: Generated server url
url: http://localhost:5000 url: http://localhost:5000
- description: Sandbox - description: Sandbox
url: https://test.dbrepo.tuwien.ac.at url: https://dbrepo2.tuwien.ac.at
...@@ -8,7 +8,7 @@ info: ...@@ -8,7 +8,7 @@ info:
license: license:
name: Apache 2.0 name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0 url: https://www.apache.org/licenses/LICENSE-2.0
version: dbrepo-latest version: $TAG
externalDocs: externalDocs:
description: Sourcecode Documentation description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
......
This diff is collapsed.
...@@ -12,7 +12,7 @@ info: ...@@ -12,7 +12,7 @@ info:
name: Apache 2.0 name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0 url: https://www.apache.org/licenses/LICENSE-2.0
title: Database Repository Search Service API title: Database Repository Search Service API
version: dbrepo-latest version: $TAG
openapi: 3.0.0 openapi: 3.0.0
paths: {} paths: {}
servers: servers:
......
...@@ -21,7 +21,7 @@ info: ...@@ -21,7 +21,7 @@ info:
name: Apache 2.0 name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0 url: https://www.apache.org/licenses/LICENSE-2.0
title: Database Repository Data Database sidecar API title: Database Repository Data Database sidecar API
version: dbrepo-latest version: $TAG
openapi: 3.0.0 openapi: 3.0.0
paths: paths:
/health: /health:
......
...@@ -8,7 +8,7 @@ info: ...@@ -8,7 +8,7 @@ info:
license: license:
name: Apache 2.0 name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0 url: https://www.apache.org/licenses/LICENSE-2.0
version: 1.4.9 version: $TAG
externalDocs: externalDocs:
description: Sourcecode Documentation description: Sourcecode Documentation
url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
......
#!/bin/bash
declare -A services
services[1080]=upload
services[4000]=search
services[5000]=analyse
services[9093]=data
services[9099]=metadata
services[3305]=sidecar
function version () {
sed -i "s/dbrepo-latest/${TAG}/g" "./.docs/.swagger/api-$1.yaml"
}
for key in "${!services[@]}"; do
echo "Version ${services[$key]} API"
version "${services[$key]}"
done
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
{% block announce %} {% block announce %}
<label for="version">Version</label> <label for="version">Version</label>
<select style="margin-left:8px;" id="version" name="version" onchange="switchVersion(this.options[this.selectedIndex].value)"> <select style="margin-left:8px;" id="version" name="version" onchange="switchVersion(this.options[this.selectedIndex].value)">
<option value="1.4.0">1.4.0</option>
<option value="1.3.9">1.3.9</option>
<option value="latest">latest</option> <option value="latest">latest</option>
<option value="1.4">1.4</option>
<option value="1.3">1.3</option>
</select> </select>
<script> <script>
function getVersion() { function getVersion() {
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
if (segments.length >= 4) { if (segments.length >= 4) {
return segments[3] return segments[3]
} else { } else {
return '1.4' return '$TAG'
} }
} }
function switchVersion(value) { function switchVersion(value) {
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Redirect Notice</title> <title>Redirect Notice</title>
<meta http-equiv="Refresh" content="0; url='https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4/'" /> <meta http-equiv="Refresh" content="0; url='https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/'" />
</head> </head>
<body> <body>
<h1>Redirect Notice</h1> <h1>Redirect Notice</h1>
<p> <p>
This page should automatically open the documentation for version 1.4. In case this page does not load the site is This page should automatically open the documentation for version <code>latest</code>. In case this page does not load the site is
available at: available at:
</p> </p>
<p> <p>
<a href="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4/">https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4/</a> <a href="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/">https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/</a>
</p> </p>
</body> </body>
</html> </html>
...@@ -157,8 +157,6 @@ scan-analyse-service: ...@@ -157,8 +157,6 @@ scan-analyse-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-analyse-service-report.json docker.io/dbrepo/analyse-service:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-analyse-service-report.json docker.io/dbrepo/analyse-service:latest
...@@ -179,8 +177,6 @@ scan-authentication-service: ...@@ -179,8 +177,6 @@ scan-authentication-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-authentication-service-report.json docker.io/dbrepo/authentication-service:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-authentication-service-report.json docker.io/dbrepo/authentication-service:latest
...@@ -201,8 +197,6 @@ scan-broker-service: ...@@ -201,8 +197,6 @@ scan-broker-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-broker-service-report.json docker.io/dbrepo/broker-service:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-broker-service-report.json docker.io/dbrepo/broker-service:latest
...@@ -223,8 +217,6 @@ scan-gateway-service: ...@@ -223,8 +217,6 @@ scan-gateway-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-gateway-service-report.json docker.io/nginx:1.25.0-alpine-slim - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-gateway-service-report.json docker.io/nginx:1.25.0-alpine-slim
...@@ -245,8 +237,6 @@ scan-metadata-service: ...@@ -245,8 +237,6 @@ scan-metadata-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-metadata-service-report.json docker.io/dbrepo/metadata-service:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-metadata-service-report.json docker.io/dbrepo/metadata-service:latest
...@@ -267,8 +257,6 @@ scan-data-service: ...@@ -267,8 +257,6 @@ scan-data-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-data-service-report.json docker.io/dbrepo/data-service:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-data-service-report.json docker.io/dbrepo/data-service:latest
...@@ -289,8 +277,6 @@ scan-search-db: ...@@ -289,8 +277,6 @@ scan-search-db:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-db-report.json docker.io/dbrepo/search-db:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-db-report.json docker.io/dbrepo/search-db:latest
...@@ -311,8 +297,6 @@ scan-search-dashboard: ...@@ -311,8 +297,6 @@ scan-search-dashboard:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-dashboard-report.json docker.io/opensearchproject/opensearch-dashboards:2.10.0 - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-dashboard-report.json docker.io/opensearchproject/opensearch-dashboards:2.10.0
...@@ -333,8 +317,6 @@ scan-search-db-init: ...@@ -333,8 +317,6 @@ scan-search-db-init:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-db-init-report.json docker.io/dbrepo/search-db-init:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-search-db-init-report.json docker.io/dbrepo/search-db-init:latest
...@@ -355,8 +337,6 @@ scan-data-db: ...@@ -355,8 +337,6 @@ scan-data-db:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-data-db-report.json docker.io/bitnami/mariadb:11.2.2-debian-11-r0 - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-data-db-report.json docker.io/bitnami/mariadb:11.2.2-debian-11-r0
...@@ -377,8 +357,6 @@ scan-metadata-db: ...@@ -377,8 +357,6 @@ scan-metadata-db:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-metadata-db-report.json docker.io/dbrepo/metadata-db:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-metadata-db-report.json docker.io/dbrepo/metadata-db:latest
...@@ -399,8 +377,6 @@ scan-ui: ...@@ -399,8 +377,6 @@ scan-ui:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-ui-report.json docker.io/dbrepo/ui:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-ui-report.json docker.io/dbrepo/ui:latest
...@@ -421,8 +397,6 @@ scan-storage-service: ...@@ -421,8 +397,6 @@ scan-storage-service:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-storage-service-report.json docker.io/chrislusf/seaweedfs:3.59 - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-storage-service-report.json docker.io/chrislusf/seaweedfs:3.59
...@@ -443,8 +417,6 @@ scan-storage-service-init: ...@@ -443,8 +417,6 @@ scan-storage-service-init:
only: only:
refs: refs:
- dev - dev
- release-v1.3
- release-v1.4
allow_failure: true allow_failure: true
script: script:
- trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-storage-service-init-report.json docker.io/dbrepo/storage-service-init:latest - trivy image --insecure --exit-code 0 --format template --template "@.trivy/gitlab.tpl" -o ./.trivy/trivy-storage-service-init-report.json docker.io/dbrepo/storage-service-init:latest
...@@ -495,7 +467,7 @@ release-1.3: ...@@ -495,7 +467,7 @@ release-1.3:
script: script:
- "ifconfig eth0 mtu 1450 up" - "ifconfig eth0 mtu 1450 up"
- "apk add make" - "apk add make"
- "TAG=1.3 make release" - "TAG=1.3.9 make release"
release-1.4: release-1.4:
stage: release stage: release
...@@ -550,17 +522,17 @@ build-api-1.3: ...@@ -550,17 +522,17 @@ build-api-1.3:
- release-v1.4 - release-v1.4
script: script:
- apk add bash git maven - apk add bash git maven
- git fetch && git checkout release-v1.3 - git fetch && git checkout release-v1.3.9
- bash .docs/.swagger/generate.sh - bash .docs/.swagger/generate.sh
- mkdir -p ./swagger/1.3 - mkdir -p ./swagger/1.3.9
- cp -r ./site/* ./swagger/1.3/ - cp -r ./site/* ./swagger/1.3.9/
cache: cache:
paths: paths:
- ./swagger/1.3 - ./swagger/1.3.9
artifacts: artifacts:
when: always when: always
paths: paths:
- ./swagger/1.3 - ./swagger/1.3.9
expire_in: 1 days expire_in: 1 days
build-api-1.4: build-api-1.4:
...@@ -576,15 +548,15 @@ build-api-1.4: ...@@ -576,15 +548,15 @@ build-api-1.4:
- git fetch && git checkout release-v1.4 - git fetch && git checkout release-v1.4
- TAG=${VERSION} bash .docs/.swagger/swagger-version.sh - TAG=${VERSION} bash .docs/.swagger/swagger-version.sh
- bash .docs/.swagger/swagger-site.sh - bash .docs/.swagger/swagger-site.sh
- mkdir -p ./swagger/1.4 - mkdir -p ./swagger/${VERSION}
- cp -r ./site/* ./swagger/1.4/ - cp -r ./site/* ./swagger/${VERSION}/
cache: cache:
paths: paths:
- ./swagger/1.4 - ./swagger/${VERSION}
artifacts: artifacts:
when: always when: always
paths: paths:
- ./swagger/1.4 - ./swagger/${VERSION}
expire_in: 1 days expire_in: 1 days
docs-registry: docs-registry:
...@@ -653,8 +625,8 @@ docs-1.3: ...@@ -653,8 +625,8 @@ docs-1.3:
- git fetch && git checkout release-v1.3 - git fetch && git checkout release-v1.3
- pip install -r ./.docs/requirements.txt - pip install -r ./.docs/requirements.txt
- mkdir -p ./final - mkdir -p ./final
- mkdocs build && cp -r ./site ./final/1.3 - mkdocs build && cp -r ./site ./final/1.3.9
- cp -r ./swagger/1.3 ./final/1.3/swagger - cp -r ./swagger/1.3.9 ./final/1.3.9/swagger
cache: cache:
paths: paths:
- ./final - ./final
...@@ -682,8 +654,8 @@ docs-1.4: ...@@ -682,8 +654,8 @@ docs-1.4:
- pip install -r ./.docs/requirements.txt - pip install -r ./.docs/requirements.txt
- mkdir -p ./final - mkdir -p ./final
- find ./.docs -type f -exec sed -i -e "s/\$TAG/${VERSION}/g" {} \; - find ./.docs -type f -exec sed -i -e "s/\$TAG/${VERSION}/g" {} \;
- mkdocs build && cp -r ./site ./final/1.4 - mkdocs build && cp -r ./site ./final/${VERSION}
- cp -r ./swagger/1.4 ./final/1.4/swagger - cp -r ./swagger/${VERSION} ./final/${VERSION}/swagger
cache: cache:
paths: paths:
- ./final - ./final
......
...@@ -65,7 +65,7 @@ template = { ...@@ -65,7 +65,7 @@ template = {
"info": { "info": {
"title": "Database Repository Analyse Service API", "title": "Database Repository Analyse Service API",
"description": "Service that analyses data structures", "description": "Service that analyses data structures",
"version": "dbrepo-latest", "version": "$TAG",
"contact": { "contact": {
"name": "Prof. Andreas Rauber", "name": "Prof. Andreas Rauber",
"email": "andreas.rauber@tuwien.ac.at" "email": "andreas.rauber@tuwien.ac.at"
......
...@@ -61,7 +61,7 @@ template = { ...@@ -61,7 +61,7 @@ template = {
"info": { "info": {
"title": "Database Repository Data Database sidecar API", "title": "Database Repository Data Database sidecar API",
"description": "Sidecar that downloads the import .csv file", "description": "Sidecar that downloads the import .csv file",
"version": "dbrepo-latest", "version": "$TAG",
"contact": { "contact": {
"name": "Prof. Andreas Rauber", "name": "Prof. Andreas Rauber",
"email": "andreas.rauber@tuwien.ac.at" "email": "andreas.rauber@tuwien.ac.at"
......
...@@ -24,7 +24,7 @@ public class SwaggerConfig { ...@@ -24,7 +24,7 @@ public class SwaggerConfig {
.name("Prof. Andreas Rauber") .name("Prof. Andreas Rauber")
.email("andreas.rauber@tuwien.ac.at")) .email("andreas.rauber@tuwien.ac.at"))
.description("Service that manages the data") .description("Service that manages the data")
.version("dbrepo-latest") .version("$TAG")
.license(new License() .license(new License()
.name("Apache 2.0") .name("Apache 2.0")
.url("https://www.apache.org/licenses/LICENSE-2.0"))) .url("https://www.apache.org/licenses/LICENSE-2.0")))
......
...@@ -24,7 +24,7 @@ public class SwaggerConfig { ...@@ -24,7 +24,7 @@ public class SwaggerConfig {
.name("Prof. Andreas Rauber") .name("Prof. Andreas Rauber")
.email("andreas.rauber@tuwien.ac.at")) .email("andreas.rauber@tuwien.ac.at"))
.description("Service that manages the metadata") .description("Service that manages the metadata")
.version("dbrepo-latest") .version("$TAG")
.license(new License() .license(new License()
.name("Apache 2.0") .name("Apache 2.0")
.url("https://www.apache.org/licenses/LICENSE-2.0"))) .url("https://www.apache.org/licenses/LICENSE-2.0")))
......
...@@ -66,7 +66,7 @@ def create_app(config_class=Config): ...@@ -66,7 +66,7 @@ def create_app(config_class=Config):
"info": { "info": {
"title": "Database Repository Search Service API", "title": "Database Repository Search Service API",
"description": "Service that searches the search database", "description": "Service that searches the search database",
"version": "dbrepo-latest", "version": "$TAG",
"contact": { "contact": {
"name": "Prof. Andreas Rauber", "name": "Prof. Andreas Rauber",
"email": "andreas.rauber@tuwien.ac.at" "email": "andreas.rauber@tuwien.ac.at"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment