From fc96c675c14428e654b9c60f56b9fa32ce3a0f48 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Tue, 18 Mar 2025 09:37:48 +0100
Subject: [PATCH] Updated API

Signed-off-by: Martin Weise <martin.weise@tuwien.ac.at>
---
 .docs/.openapi/api-data.yaml     | 330 ++++++-------
 .docs/.openapi/api-metadata.yaml | 804 +++++++++++++++----------------
 2 files changed, 567 insertions(+), 567 deletions(-)

diff --git a/.docs/.openapi/api-data.yaml b/.docs/.openapi/api-data.yaml
index 1e4dca4cd3..8a21c8aff9 100644
--- a/.docs/.openapi/api-data.yaml
+++ b/.docs/.openapi/api-data.yaml
@@ -63,32 +63,32 @@ paths:
         schema:
           type: string
       responses:
-        "403":
-          description: Not allowed to retrieve view data
+        "406":
+          description: Failed to format data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find view in metadata database
+        "400":
+          description: Request pagination is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Request pagination is malformed
+        "409":
+          description: View schema could not be mapped
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "406":
-          description: Failed to format data
+        "404":
+          description: Failed to find view in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "409":
-          description: View schema could not be mapped
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -109,8 +109,8 @@ paths:
               schema:
                 type: string
             text/csv: {}
-        "503":
-          description: Failed to establish connection with the metadata service
+        "403":
+          description: Not allowed to retrieve view data
           content:
             application/json:
               schema:
@@ -162,32 +162,32 @@ paths:
         schema:
           type: string
       responses:
-        "403":
-          description: Not allowed to retrieve view data
+        "406":
+          description: Failed to format data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find view in metadata database
+        "400":
+          description: Request pagination is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Request pagination is malformed
+        "409":
+          description: View schema could not be mapped
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "406":
-          description: Failed to format data
+        "404":
+          description: Failed to find view in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "409":
-          description: View schema could not be mapped
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -208,8 +208,8 @@ paths:
               schema:
                 type: string
             text/csv: {}
-        "503":
-          description: Failed to establish connection with the metadata service
+        "403":
+          description: Not allowed to retrieve view data
           content:
             application/json:
               schema:
@@ -264,14 +264,14 @@ paths:
         schema:
           type: string
       responses:
-        "404":
-          description: Failed to find table in metadata database
+        "406":
+          description: Failed to format data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Request pagination or table data select query is malformed
+        "404":
+          description: Failed to find table in metadata database
           content:
             application/json:
               schema:
@@ -292,20 +292,20 @@ paths:
               schema:
                 type: string
             text/csv: {}
-        "406":
-          description: Failed to format data
+        "403":
+          description: Not allowed to get table data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to establish connection with the metadata service
+        "400":
+          description: Request pagination or table data select query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Not allowed to get table data
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -346,28 +346,28 @@ paths:
               $ref: "#/components/schemas/TupleUpdateDto"
         required: true
       responses:
-        "404":
-          description: Failed to find table in metadata database
+        "403":
+          description: Update table data not allowed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Request pagination or table data select query is malformed
+        "404":
+          description: Failed to find table in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Updated table data
-        "503":
-          description: Failed to establish connection with the metadata service
+        "400":
+          description: Request pagination or table data select query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Update table data not allowed
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -408,12 +408,6 @@ paths:
               $ref: "#/components/schemas/TupleDto"
         required: true
       responses:
-        "400":
-          description: Request pagination or table data select query is malformed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Create table data not allowed
           content:
@@ -427,8 +421,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "201":
-          description: Created table data
         "404":
           description: Failed to find table in metadata database or blob in storage
             service
@@ -436,6 +428,14 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "201":
+          description: Created table data
+        "400":
+          description: Request pagination or table data select query is malformed
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - basicAuth: []
       - bearerAuth: []
@@ -478,22 +478,22 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "202":
+          description: Deleted table data
         "400":
           description: Request pagination or table data select query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Delete table data not allowed
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Deleted table data
-        "503":
-          description: Failed to establish connection with the metadata service
+        "403":
+          description: Delete table data not allowed
           content:
             application/json:
               schema:
@@ -547,14 +547,14 @@ paths:
         schema:
           type: string
       responses:
-        "404":
-          description: Failed to find table in metadata database
+        "406":
+          description: Failed to format data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Request pagination or table data select query is malformed
+        "404":
+          description: Failed to find table in metadata database
           content:
             application/json:
               schema:
@@ -575,20 +575,20 @@ paths:
               schema:
                 type: string
             text/csv: {}
-        "406":
-          description: Failed to format data
+        "403":
+          description: Not allowed to get table data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to establish connection with the metadata service
+        "400":
+          description: Request pagination or table data select query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Not allowed to get table data
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -643,13 +643,6 @@ paths:
           type: integer
           format: int64
       responses:
-        "404":
-          description: Failed to find database in metadata database or query in query
-            store of the data database
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Not allowed to retrieve subset data
           content:
@@ -662,12 +655,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Invalid pagination
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: Retrieved subset data
           headers:
@@ -696,6 +683,19 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "400":
+          description: Invalid pagination
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
+        "404":
+          description: Failed to find database in metadata database or query in query
+            store of the data database
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -745,13 +745,6 @@ paths:
           type: integer
           format: int64
       responses:
-        "404":
-          description: Failed to find database in metadata database or query in query
-            store of the data database
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Not allowed to retrieve subset data
           content:
@@ -764,12 +757,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Invalid pagination
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: Retrieved subset data
           headers:
@@ -798,6 +785,19 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "400":
+          description: Invalid pagination
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
+        "404":
+          description: Failed to find database in metadata database or query in query
+            store of the data database
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -828,39 +828,39 @@ paths:
               $ref: "#/components/schemas/QueryPersistDto"
         required: true
       responses:
-        "403":
-          description: Not allowed to persist subset
+        "400":
+          description: Malformed select query
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database in metadata database or query in query
-            store of the data database
+        "417":
+          description: Failed to persist subset
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Persisted subset
+        "503":
+          description: Failed to communicate with database
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/QueryDto"
-        "400":
-          description: Malformed select query
+                $ref: "#/components/schemas/ApiErrorDto"
+        "403":
+          description: Not allowed to persist subset
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to communicate with database
+        "202":
+          description: Persisted subset
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "417":
-          description: Failed to persist subset
+                $ref: "#/components/schemas/QueryDto"
+        "404":
+          description: Failed to find database in metadata database or query in query
+            store of the data database
           content:
             application/json:
               schema:
@@ -939,28 +939,28 @@ paths:
               $ref: "#/components/schemas/ImportDto"
         required: true
       responses:
-        "404":
-          description: Failed to find table in metadata database
+        "400":
+          description: Dataset and/or query are malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Imported dataset successfully
-        "400":
-          description: Dataset and/or query are malformed
+        "404":
+          description: Failed to find table in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to establish connection with the metadata service
+        "403":
+          description: Import table dataset not allowed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Import table dataset not allowed
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -1000,9 +1000,8 @@ paths:
                 type: array
                 items:
                   $ref: "#/components/schemas/QueryDto"
-        "404":
-          description: Failed to find database in metadata database or query in query
-            store of the data database
+        "503":
+          description: Failed to communicate with database
           content:
             application/json:
               schema:
@@ -1013,8 +1012,9 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to communicate with database
+        "404":
+          description: Failed to find database in metadata database or query in query
+            store of the data database
           content:
             application/json:
               schema:
@@ -1063,51 +1063,51 @@ paths:
               $ref: "#/components/schemas/SubsetDto"
         required: true
       responses:
-        "403":
-          description: Not allowed to find subset
+        "400":
+          description: Malformed select query
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "501":
-          description: Failed to execute query as it contains non-supported keywords
+        "406":
+          description: Failed to format data
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database in metadata database or query in query
-            store of the data database
+        "417":
+          description: Failed to insert query into query store of data database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "417":
-          description: Failed to insert query into query store of data database
+        "403":
+          description: Not allowed to find subset
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "406":
-          description: Failed to format data
+        "503":
+          description: Failed to communicate with database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "201":
-          description: Created subset
+        "501":
+          description: Failed to execute query as it contains non-supported keywords
           content:
             application/json:
               schema:
-                type: string
-        "400":
-          description: Malformed select query
+                $ref: "#/components/schemas/ApiErrorDto"
+        "201":
+          description: Created subset
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to communicate with database
+                type: string
+        "404":
+          description: Failed to find database in metadata database or query in query
+            store of the data database
           content:
             application/json:
               schema:
@@ -1144,14 +1144,8 @@ paths:
           type: integer
           format: int64
       responses:
-        "403":
-          description: Find table history not allowed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: "Invalid pagination size request, must be > 0"
+        "404":
+          description: Failed to find table history in data database
           content:
             application/json:
               schema:
@@ -1164,14 +1158,20 @@ paths:
                 type: array
                 items:
                   $ref: "#/components/schemas/TableHistoryDto"
-        "503":
-          description: Failed to establish connection with the metadata service
+        "403":
+          description: Find table history not allowed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find table history in data database
+        "400":
+          description: "Invalid pagination size request, must be > 0"
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to establish connection with the metadata service
           content:
             application/json:
               schema:
@@ -1210,40 +1210,40 @@ paths:
           type: string
           format: date-time
       responses:
-        "200":
-          description: Found subset
+        "400":
+          description: Malformed select query
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/QueryDto"
-            text/csv: {}
+                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Not allowed to find subset
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database in metadata database or query in query
-            store of the data database
+        "406":
+          description: Failed to find acceptable representation
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Malformed select query
+        "503":
+          description: Failed to communicate with database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "406":
-          description: Failed to find acceptable representation
+        "200":
+          description: Found subset
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to communicate with database
+                $ref: "#/components/schemas/QueryDto"
+            text/csv: {}
+        "404":
+          description: Failed to find database in metadata database or query in query
+            store of the data database
           content:
             application/json:
               schema:
diff --git a/.docs/.openapi/api-metadata.yaml b/.docs/.openapi/api-metadata.yaml
index d32cc8fe8d..4c73fa8836 100644
--- a/.docs/.openapi/api-metadata.yaml
+++ b/.docs/.openapi/api-metadata.yaml
@@ -11,7 +11,7 @@ info:
   version: 1.7.3
 externalDocs:
   description: Sourcecode Documentation
-  url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/system-services-metadata/
+  url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.3/system-services-metadata/
 servers:
 - url: http://localhost
   description: Development instance
@@ -36,6 +36,12 @@ paths:
           type: string
           format: uuid
       responses:
+        "403":
+          description: Find user is not permitted
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: User was not found
           content:
@@ -48,12 +54,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/UserDto"
-        "403":
-          description: Find user is not permitted
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -77,12 +77,6 @@ paths:
               $ref: "#/components/schemas/UserUpdateDto"
         required: true
       responses:
-        "400":
-          description: Modify user query is malformed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: Failed to find database/user in metadata database
           content:
@@ -95,18 +89,24 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Modified user information
+        "400":
+          description: Modify user query is malformed
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/UserDto"
+                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Not allowed to modify user metadata
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "202":
+          description: Modified user information
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/UserDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -127,6 +127,12 @@ paths:
           type: string
           format: uuid
       responses:
+        "403":
+          description: Find user is not permitted
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: User was not found
           content:
@@ -139,12 +145,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/UserDto"
-        "403":
-          description: Find user is not permitted
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -194,26 +194,20 @@ paths:
               $ref: "#/components/schemas/CreateDatabaseDto"
         required: true
       responses:
-        "400":
-          description: Database create query is malformed or image is not supported
+        "404":
+          description: Failed to fin container/user/database in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "201":
-          description: Created a new database
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseBriefDto"
-        "423":
-          description: Database quota exceeded
+        "409":
+          description: Query store could not be created
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "409":
-          description: Query store could not be created
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
@@ -225,24 +219,30 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to fin container/user/database in metadata database
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+        "423":
+          description: Database quota exceeded
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "400":
+          description: Database create query is malformed or image is not supported
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "201":
+          description: Created a new database
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatabaseBriefDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -303,12 +303,6 @@ paths:
           type: string
           format: uuid
       responses:
-        "200":
-          description: Found database access
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseAccessDto"
         "403":
           description: No access to this database
           content:
@@ -321,6 +315,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Found database access
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatabaseAccessDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -358,6 +358,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "400":
+          description: Modify access query or database connection is malformed
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Modify access not permitted when no access is granted in the
             first place
@@ -373,12 +379,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Modify access query or database connection is malformed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: Database or user not found
           content:
@@ -415,20 +415,14 @@ paths:
               $ref: "#/components/schemas/CreateAccessDto"
         required: true
       responses:
-        "502":
-          description: Access could not be created due to connection error
+        "403":
+          description: Failed giving access
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Granting access succeeded
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseAccessDto"
-        "403":
-          description: Failed giving access
+        "404":
+          description: Database or user not found
           content:
             application/json:
               schema:
@@ -439,14 +433,20 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "202":
+          description: Granting access succeeded
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatabaseAccessDto"
         "400":
           description: Granting access query or database connection is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Database or user not found
+        "502":
+          description: Access could not be created due to connection error
           content:
             application/json:
               schema:
@@ -475,34 +475,34 @@ paths:
           type: string
           format: uuid
       responses:
-        "502":
-          description: Access could not be created due to connection error
+        "404":
+          description: "User, database with access was not found"
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Revoke of access not permitted as no access was found
+        "400":
+          description: Modify access query or database connection is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Deleted access
-        "400":
-          description: Modify access query or database connection is malformed
+        "503":
+          description: Access could not be revoked in the data service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: "User, database with access was not found"
+        "403":
+          description: Revoke of access not permitted as no access was found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Access could not be revoked in the data service
+        "502":
+          description: Access could not be created due to connection error
           content:
             application/json:
               schema:
@@ -534,12 +534,6 @@ paths:
           type: string
           format: uuid
       responses:
-        "200":
-          description: Found database access
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseAccessDto"
         "403":
           description: No access to this database
           content:
@@ -552,6 +546,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Found database access
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatabaseAccessDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -570,18 +570,18 @@ paths:
           type: string
           format: uuid
       responses:
-        "200":
-          description: Find one ontology
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/OntologyDto"
         "404":
           description: Could not find ontology
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Find one ontology
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/OntologyDto"
     put:
       tags:
       - ontology-endpoint
@@ -665,18 +665,18 @@ paths:
               $ref: "#/components/schemas/BannerMessageUpdateDto"
         required: true
       responses:
-        "202":
-          description: Updated message
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/BannerMessageBriefDto"
         "404":
           description: Could not find message
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "202":
+          description: Updated message
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/BannerMessageBriefDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -694,16 +694,16 @@ paths:
           type: string
           format: uuid
       responses:
+        "202":
+          description: Deleted message
+          content:
+            application/json: {}
         "404":
           description: Could not find message
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Deleted message
-          content:
-            application/json: {}
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -722,18 +722,18 @@ paths:
           type: string
           format: uuid
       responses:
-        "404":
-          description: Image could not be found
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: Found image
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ImageDto"
+        "404":
+          description: Image could not be found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
     put:
       tags:
       - image-endpoint
@@ -755,18 +755,18 @@ paths:
               $ref: "#/components/schemas/ImageChangeDto"
         required: true
       responses:
-        "404":
-          description: Image could not be found
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Updated image successfully
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ImageDto"
+        "404":
+          description: Image could not be found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -785,14 +785,14 @@ paths:
           type: string
           format: uuid
       responses:
+        "202":
+          description: Deleted image successfully
         "404":
           description: Image could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Deleted image successfully
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -817,18 +817,6 @@ paths:
         schema:
           type: string
       responses:
-        "403":
-          description: Not allowed to view identifier
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to data service failed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: Found identifier successfully
           content:
@@ -849,15 +837,14 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "409":
-          description: Exported resource was not found
+        "503":
+          description: Failed to find in data service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: "Identifier could not be exported, the requested style is not\
-            \ known"
+        "403":
+          description: Not allowed to view identifier
           content:
             application/json:
               schema:
@@ -868,14 +855,27 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "409":
+          description: Exported resource was not found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
+        "400":
+          description: "Identifier could not be exported, the requested style is not\
+            \ known"
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: Identifier could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to find in data service
+        "502":
+          description: Connection to data service failed
           content:
             application/json:
               schema:
@@ -903,8 +903,8 @@ paths:
               $ref: "#/components/schemas/IdentifierSaveDto"
         required: true
       responses:
-        "404":
-          description: "Failed to find database, table or view"
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
@@ -927,14 +927,14 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Insufficient access rights or authorities
+        "404":
+          description: "Failed to find database, table or view"
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "403":
+          description: Insufficient access rights or authorities
           content:
             application/json:
               schema:
@@ -956,32 +956,32 @@ paths:
           type: string
           format: uuid
       responses:
-        "503":
-          description: Failed to delete in search service
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: Identifier or database could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Deleted identifier
         "502":
           description: Connection to search service failed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "202":
+          description: Deleted identifier
         "403":
           description: Deleting identifier not permitted
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to delete in search service
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1001,8 +1001,8 @@ paths:
           type: string
           format: uuid
       responses:
-        "404":
-          description: "Failed to find database, table or view"
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
@@ -1013,26 +1013,26 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Published identifier
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/IdentifierDto"
         "503":
           description: Failed to save in search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Insufficient access rights or authorities
+        "404":
+          description: "Failed to find database, table or view"
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "202":
+          description: Published identifier
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/IdentifierDto"
+        "403":
+          description: Insufficient access rights or authorities
           content:
             application/json:
               schema:
@@ -1062,14 +1062,14 @@ paths:
               $ref: "#/components/schemas/DatabaseModifyVisibilityDto"
         required: true
       responses:
-        "400":
-          description: The visibility payload is malformed
+        "202":
+          description: Visibility modified successfully
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+                $ref: "#/components/schemas/DatabaseBriefDto"
+        "400":
+          description: The visibility payload is malformed
           content:
             application/json:
               schema:
@@ -1080,12 +1080,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Visibility modified successfully
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseBriefDto"
         "502":
           description: Connection to search service failed
           content:
@@ -1098,6 +1092,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to save in search service
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1122,12 +1122,6 @@ paths:
           type: string
           format: uuid
       responses:
-        "404":
-          description: "Database, view or user could not be found"
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: Find view successfully
           content:
@@ -1140,6 +1134,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "404":
+          description: "Database, view or user could not be found"
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1170,20 +1170,20 @@ paths:
               $ref: "#/components/schemas/ViewUpdateDto"
         required: true
       responses:
-        "404":
-          description: Database or View could not be found
+        "400":
+          description: Update view query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Update not allowed
+        "404":
+          description: Database or View could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
@@ -1194,14 +1194,14 @@ paths:
             '*/*':
               schema:
                 $ref: "#/components/schemas/ViewBriefDto"
-        "502":
-          description: Connection to search service failed
+        "403":
+          description: Update not allowed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Update view query is malformed
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
@@ -1229,40 +1229,40 @@ paths:
           type: string
           format: uuid
       responses:
-        "404":
-          description: "Database, view or user could not be found"
+        "403":
+          description: Deletion not allowed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Delete view successfully
-        "423":
-          description: Delete view resulted in an invalid query statement
+        "400":
+          description: Delete view query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Delete view query is malformed
+        "423":
+          description: Delete view resulted in an invalid query statement
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Deletion not allowed
+        "404":
+          description: "Database, view or user could not be found"
           content:
             application/json:
               schema:
@@ -1353,12 +1353,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/TableBriefDto"
-        "503":
-          description: Failed to save in search service
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: Table could not be found
           content:
@@ -1377,6 +1371,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to save in search service
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1402,20 +1402,8 @@ paths:
           type: string
           format: uuid
       responses:
-        "400":
-          description: Delete table query resulted in an invalid query statement
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Delete table successfully
-        "503":
-          description: Failed to save in search service
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: Access to the database is forbidden
           content:
@@ -1434,6 +1422,18 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to save in search service
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
+        "400":
+          description: Delete table query resulted in an invalid query statement
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1460,14 +1460,8 @@ paths:
           type: string
           format: uuid
       responses:
-        "403":
-          description: Not the owner
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database/table in metadata database
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
@@ -1478,20 +1472,26 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Failed to map column statistic to known columns
+        "403":
+          description: Not the owner
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "404":
+          description: Failed to find database/table in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Updated table statistics successfully
+        "400":
+          description: Failed to map column statistic to known columns
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1537,14 +1537,15 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ColumnDto"
-        "404":
-          description: Failed to find user/table/database/ontology in metadata database
+        "400":
+          description: Update semantic concept query is malformed or update unit of
+            measurement query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+        "404":
+          description: Failed to find user/table/database/ontology in metadata database
           content:
             application/json:
               schema:
@@ -1561,9 +1562,8 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Update semantic concept query is malformed or update unit of
-            measurement query is malformed
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
@@ -1593,42 +1593,42 @@ paths:
               $ref: "#/components/schemas/DatabaseTransferDto"
         required: true
       responses:
-        "400":
-          description: Owner payload is malformed
+        "404":
+          description: Database or user could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+        "202":
+          description: Transfer of ownership was successful
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Database or user could not be found
+                $ref: "#/components/schemas/DatabaseBriefDto"
+        "403":
+          description: Transfer of ownership is not permitted
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "400":
+          description: Owner payload is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Transfer of ownership is not permitted
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "202":
-          description: Transfer of ownership was successful
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/DatabaseBriefDto"
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1649,14 +1649,8 @@ paths:
           type: string
           format: uuid
       responses:
-        "200":
-          description: Refreshed database views metadata
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseBriefDto"
-        "503":
-          description: Failed to save in search service
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
@@ -1667,18 +1661,24 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "404":
+          description: Failed to find database in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database in metadata database
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Refreshed database views metadata
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatabaseBriefDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1699,20 +1699,14 @@ paths:
           type: string
           format: uuid
       responses:
-        "400":
-          description: Failed to parse payload at search service
+        "502":
+          description: Connection to search service failed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "200":
-          description: Refreshed database tables metadata
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/DatabaseBriefDto"
-        "503":
-          description: Failed to save in search service
+        "404":
+          description: Failed to find database in metadata database
           content:
             application/json:
               schema:
@@ -1723,18 +1717,24 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "503":
+          description: Failed to save in search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database in metadata database
+        "400":
+          description: Failed to parse payload at search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Refreshed database tables metadata
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatabaseBriefDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1753,6 +1753,12 @@ paths:
           type: string
           format: uuid
       responses:
+        "404":
+          description: Database or user could not be found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: View of image was successful
           content:
@@ -1762,12 +1768,6 @@ paths:
                 items:
                   type: string
                   format: byte
-        "404":
-          description: Database or user could not be found
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1804,6 +1804,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "502":
+          description: Connection to search service failed
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "404":
           description: Database could not be found
           content:
@@ -1822,12 +1828,6 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/DatabaseBriefDto"
-        "502":
-          description: Connection to search service failed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -1947,12 +1947,6 @@ paths:
               $ref: "#/components/schemas/ImageCreateDto"
         required: true
       responses:
-        "409":
-          description: Image already exists
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "201":
           description: Created image
           content:
@@ -1965,6 +1959,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "409":
+          description: Image already exists
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2053,18 +2053,18 @@ paths:
               $ref: "#/components/schemas/CreateIdentifierDto"
         required: true
       responses:
-        "404":
-          description: "Failed to find database, table or view"
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "201":
           description: Drafted identifier
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/IdentifierDto"
+        "502":
+          description: Connection to search service failed
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "400":
           description: Identifier form contains invalid request data
           content:
@@ -2077,14 +2077,14 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Insufficient access rights or authorities
+        "404":
+          description: "Failed to find database, table or view"
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "502":
-          description: Connection to search service failed
+        "403":
+          description: Insufficient access rights or authorities
           content:
             application/json:
               schema:
@@ -2107,6 +2107,12 @@ paths:
           type: string
           format: uuid
       responses:
+        "404":
+          description: Database or user could not be found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "200":
           description: Find views successfully
           content:
@@ -2115,12 +2121,6 @@ paths:
                 type: array
                 items:
                   $ref: "#/components/schemas/ViewBriefDto"
-        "404":
-          description: Database or user could not be found
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2151,32 +2151,26 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "201":
-          description: Create view successfully
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ViewBriefDto"
-        "423":
-          description: Create view resulted in an invalid query statement
+        "409":
+          description: View exists with name
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "409":
-          description: View exists with name
+        "403":
+          description: Credentials missing
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
+        "201":
+          description: Create view successfully
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Credentials missing
+                $ref: "#/components/schemas/ViewBriefDto"
+        "423":
+          description: Create view resulted in an invalid query statement
           content:
             application/json:
               schema:
@@ -2193,6 +2187,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to save in search service
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2213,6 +2213,12 @@ paths:
           type: string
           format: uuid
       responses:
+        "404":
+          description: Database could not be found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "403":
           description: List tables not permitted
           content:
@@ -2227,12 +2233,6 @@ paths:
                 type: array
                 items:
                   $ref: "#/components/schemas/TableBriefDto"
-        "404":
-          description: Database could not be found
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2256,38 +2256,26 @@ paths:
               $ref: "#/components/schemas/CreateTableDto"
         required: true
       responses:
-        "400":
-          description: Create table query is malformed
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "409":
           description: Create table conflicts with existing table name
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "503":
-          description: Failed to save in search service
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "201":
           description: Created a new table
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/TableBriefDto"
-        "404":
-          description: "Database, container or user could not be found"
+        "403":
+          description: Create table not permitted
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: Create table not permitted
+        "404":
+          description: "Database, container or user could not be found"
           content:
             application/json:
               schema:
@@ -2298,6 +2286,18 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "503":
+          description: Failed to save in search service
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
+        "400":
+          description: Create table query is malformed
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2337,32 +2337,32 @@ paths:
               $ref: "#/components/schemas/CreateContainerDto"
         required: true
       responses:
-        "409":
-          description: Container name already exists
+        "201":
+          description: Created a new container
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
-        "403":
-          description: "Create container not permitted, need authority `create-container`"
+                $ref: "#/components/schemas/ContainerDto"
+        "404":
+          description: Container image or user could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Container payload malformed
+        "409":
+          description: Container name already exists
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "201":
-          description: Created a new container
+        "400":
+          description: Container payload malformed
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ContainerDto"
-        "404":
-          description: Container image or user could not be found
+                $ref: "#/components/schemas/ApiErrorDto"
+        "403":
+          description: "Create container not permitted, need authority `create-container`"
           content:
             application/json:
               schema:
@@ -2436,38 +2436,38 @@ paths:
         schema:
           type: string
       responses:
-        "200":
-          description: Found entities
+        "422":
+          description: Ontology does not have rdf or sparql endpoint
           content:
             application/json:
               schema:
-                type: array
-                items:
-                  $ref: "#/components/schemas/EntityDto"
-        "417":
-          description: Generated query or uri is malformed
+                $ref: "#/components/schemas/ApiErrorDto"
+        "404":
+          description: Could not find ontology
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Filter params are invalid
+        "417":
+          description: Generated query or uri is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Could not find ontology
+        "400":
+          description: Filter params are invalid
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "422":
-          description: Ontology does not have rdf or sparql endpoint
+        "200":
+          description: Found entities
           content:
             application/json:
               schema:
-                $ref: "#/components/schemas/ApiErrorDto"
+                type: array
+                items:
+                  $ref: "#/components/schemas/EntityDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2505,18 +2505,18 @@ paths:
           type: string
           format: uuid
       responses:
-        "200":
-          description: Get messages
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/BannerMessageDto"
         "404":
           description: Could not find message
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Get messages
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/BannerMessageDto"
   /api/license:
     get:
       tags:
@@ -2628,8 +2628,8 @@ paths:
           type: string
           format: uuid
       responses:
-        "403":
-          description: Not the table owner.
+        "422":
+          description: Ontology does not have rdf or sparql endpoint
           content:
             application/json:
               schema:
@@ -2642,26 +2642,26 @@ paths:
                 type: array
                 items:
                   $ref: "#/components/schemas/EntityDto"
-        "417":
-          description: Generated query is malformed
+        "400":
+          description: Failed to parse statistic in search service
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "404":
-          description: Failed to find database/table in metadata database
+        "417":
+          description: Generated query is malformed
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "400":
-          description: Failed to parse statistic in search service
+        "404":
+          description: Failed to find database/table in metadata database
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
-        "422":
-          description: Ontology does not have rdf or sparql endpoint
+        "403":
+          description: Not the table owner.
           content:
             application/json:
               schema:
@@ -2696,6 +2696,12 @@ paths:
           type: string
           format: uuid
       responses:
+        "422":
+          description: Ontology does not have rdf or sparql endpoint
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
         "400":
           description: Generated query is malformed
           content:
@@ -2716,12 +2722,6 @@ paths:
                 type: array
                 items:
                   $ref: "#/components/schemas/TableColumnEntityDto"
-        "422":
-          description: Ontology does not have rdf or sparql endpoint
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
@@ -2740,18 +2740,18 @@ paths:
           type: string
           format: uuid
       responses:
-        "200":
-          description: Found container
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ContainerDto"
         "404":
           description: Container image could not be found
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "200":
+          description: Found container
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ContainerDto"
     delete:
       tags:
       - container-endpoint
@@ -2766,12 +2766,6 @@ paths:
           type: string
           format: uuid
       responses:
-        "404":
-          description: Container not found
-          content:
-            application/json:
-              schema:
-                $ref: "#/components/schemas/ApiErrorDto"
         "202":
           description: Deleted container
         "403":
@@ -2780,6 +2774,12 @@ paths:
             application/json:
               schema:
                 $ref: "#/components/schemas/ApiErrorDto"
+        "404":
+          description: Container not found
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/ApiErrorDto"
       security:
       - bearerAuth: []
       - basicAuth: []
-- 
GitLab