From 129342a95ac230164945f191301b6a15ead480e8 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 12 Oct 2023 13:36:21 +0200
Subject: [PATCH] Added upload service

---
 .gitignore              |  1 +
 Makefile                |  2 +-
 swagger/api-upload.yaml | 30 ++++++++++++++++++++++++++++++
 swagger/upload/api.yaml | 30 ++++++++++++++++++++++++++++++
 4 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 swagger/api-upload.yaml
 create mode 100644 swagger/upload/api.yaml

diff --git a/.gitignore b/.gitignore
index 8ea79b6..931dffe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ swagger/api-semantics/
 swagger/api-data/
 swagger/api-mirror/
 swagger/api-user/
+swagger/api-upload/
 swagger/api/
 swagger/**/*.png
 swagger/**/*.css
diff --git a/Makefile b/Makefile
index c6ff5b7..070bc3b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 .PHONY: clean docs
 
 TAG ?= latest
-BASE_URL ?= /
+BASE_URL ?= ""
 
 all: build
 
diff --git a/swagger/api-upload.yaml b/swagger/api-upload.yaml
new file mode 100644
index 0000000..6f93138
--- /dev/null
+++ b/swagger/api-upload.yaml
@@ -0,0 +1,30 @@
+openapi: 3.0.1
+info:
+  title: Database Repository Upload Service API
+  description: Service that manages the uploads
+  contact:
+    name: Prof. Andreas Rauber
+    email: andreas.rauber@tuwien.ac.at
+  license:
+    name: Apache 2.0
+    url: https://www.apache.org/licenses/LICENSE-2.0
+  version: 1.3.0
+externalDocs:
+  description: Sourcecode Documentation
+  url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
+servers:
+- url: http://localhost:1080
+  description: Generated server url
+- url: https://test.dbrepo.tuwien.ac.at
+  description: Sandbox
+paths:
+  /api/upload/files:
+    post:
+      tags:
+      - upload-endpoint
+      summary: Uploads a file
+      operationId: upload
+      responses:
+        "201":
+          description: "Successfully uploaded a file"
+      security: {}
\ No newline at end of file
diff --git a/swagger/upload/api.yaml b/swagger/upload/api.yaml
new file mode 100644
index 0000000..6f93138
--- /dev/null
+++ b/swagger/upload/api.yaml
@@ -0,0 +1,30 @@
+openapi: 3.0.1
+info:
+  title: Database Repository Upload Service API
+  description: Service that manages the uploads
+  contact:
+    name: Prof. Andreas Rauber
+    email: andreas.rauber@tuwien.ac.at
+  license:
+    name: Apache 2.0
+    url: https://www.apache.org/licenses/LICENSE-2.0
+  version: 1.3.0
+externalDocs:
+  description: Sourcecode Documentation
+  url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
+servers:
+- url: http://localhost:1080
+  description: Generated server url
+- url: https://test.dbrepo.tuwien.ac.at
+  description: Sandbox
+paths:
+  /api/upload/files:
+    post:
+      tags:
+      - upload-endpoint
+      summary: Uploads a file
+      operationId: upload
+      responses:
+        "201":
+          description: "Successfully uploaded a file"
+      security: {}
\ No newline at end of file
-- 
GitLab