From 9bc161d3d4fba7b724d156afe1aa061f219423a7 Mon Sep 17 00:00:00 2001
From: JeanClement <jeanclement.gallardo@inrae.fr>
Date: Wed, 30 Aug 2023 10:13:48 +0200
Subject: [PATCH 1/6] add user and app auth + add delete and update method for
 step

---
 paths/steps/delete.yml       | 25 +++++++++++++++++++++++++
 paths/steps/steps.yml        |  8 +++++++-
 paths/steps/update.yml       | 25 +++++++++++++++++++++++++
 schemas/steps/StepUpdate.yml | 16 ++++++++++++++++
 4 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 paths/steps/delete.yml
 create mode 100644 paths/steps/update.yml
 create mode 100644 schemas/steps/StepUpdate.yml

diff --git a/paths/steps/delete.yml b/paths/steps/delete.yml
new file mode 100644
index 0000000..d61871f
--- /dev/null
+++ b/paths/steps/delete.yml
@@ -0,0 +1,25 @@
+tags:
+  - Pathways
+summary: del Pathway
+description: delete for Step
+operationId: delStep
+x-eov-operation-handler: steps
+security: 
+  - appAuth: []
+    userAuth: []
+parameters:
+  - name: id
+    in: query
+    description: the id for the Step
+    required: false
+    schema:
+      type: integer
+responses:
+  200:
+    description: successful operation
+    content:
+      application/json:
+        schema:
+          $ref: ../../schemas/pathways/StepResponse.yml
+  404:
+    $ref: ../../responses/notFound.yml
\ No newline at end of file
diff --git a/paths/steps/steps.yml b/paths/steps/steps.yml
index 0eb3a12..5b37533 100644
--- a/paths/steps/steps.yml
+++ b/paths/steps/steps.yml
@@ -2,4 +2,10 @@ get:
   $ref: get.yml
 
 post:
-  $ref: add.yml
\ No newline at end of file
+  $ref: add.yml
+
+delete:
+  $ref: delete.yml
+
+patch:
+  $ref: update.yml
\ No newline at end of file
diff --git a/paths/steps/update.yml b/paths/steps/update.yml
new file mode 100644
index 0000000..5c329a6
--- /dev/null
+++ b/paths/steps/update.yml
@@ -0,0 +1,25 @@
+tags:
+  - Steps
+summary: update Step
+description: update a step for a specific analysis
+operationId: updateSteps
+x-eov-operation-handler: steps
+security: 
+  - appAuth: []
+    userAuth: []
+requestBody:
+  content:
+    application/json:
+      schema:
+        type: object
+        items:
+          $ref: '../../schemas/steps/StepUpdate.yml'
+responses:
+  200:
+    description: success
+    content:
+      application/json:
+        schema:
+          $ref: ../../schemas/steps/StepResponse.yml
+  404:
+    $ref: ../../responses/notFound.yml
\ No newline at end of file
diff --git a/schemas/steps/StepUpdate.yml b/schemas/steps/StepUpdate.yml
new file mode 100644
index 0000000..72f6b51
--- /dev/null
+++ b/schemas/steps/StepUpdate.yml
@@ -0,0 +1,16 @@
+type: object
+description: "Update object for steps"
+properties:
+  id:
+    description: "id of the step in the MetExplore database"
+    type: integer
+    format: int64
+    example: 10
+  column:
+    description: "Column name to update"
+    type: string
+    example: "Name"
+  value:
+    description: "New value for the column"
+    type: string
+    example: "Glutamate"
\ No newline at end of file
-- 
GitLab


From edd2cf1a1227ef1fa7e72797c96353974633c9a4 Mon Sep 17 00:00:00 2001
From: JeanClement <jeanclement.gallardo@inrae.fr>
Date: Wed, 30 Aug 2023 10:16:29 +0200
Subject: [PATCH 2/6] fix path for stepresponse

---
 paths/steps/delete.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paths/steps/delete.yml b/paths/steps/delete.yml
index d61871f..43efdf3 100644
--- a/paths/steps/delete.yml
+++ b/paths/steps/delete.yml
@@ -20,6 +20,6 @@ responses:
     content:
       application/json:
         schema:
-          $ref: ../../schemas/pathways/StepResponse.yml
+          $ref: ../../schemas/steps/StepResponse.yml
   404:
     $ref: ../../responses/notFound.yml
\ No newline at end of file
-- 
GitLab


From 32ca0334f89434c9fa30577d91cadf1121dbdfd0 Mon Sep 17 00:00:00 2001
From: Ludovic Cottret <ludovic.cottret@inra.fr>
Date: Wed, 30 Aug 2023 11:35:31 +0200
Subject: [PATCH 3/6] Apply 1 suggestion(s) to 1 file(s)

---
 paths/steps/delete.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paths/steps/delete.yml b/paths/steps/delete.yml
index 43efdf3..226f88a 100644
--- a/paths/steps/delete.yml
+++ b/paths/steps/delete.yml
@@ -1,5 +1,5 @@
 tags:
-  - Pathways
+  - Steps
 summary: del Pathway
 description: delete for Step
 operationId: delStep
-- 
GitLab


From 1e978a81b7fe3a12ace0c298103126217e04cc70 Mon Sep 17 00:00:00 2001
From: Ludovic Cottret <ludovic.cottret@inra.fr>
Date: Wed, 30 Aug 2023 11:35:56 +0200
Subject: [PATCH 4/6] Apply 1 suggestion(s) to 1 file(s)

---
 paths/steps/delete.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paths/steps/delete.yml b/paths/steps/delete.yml
index 226f88a..ca76096 100644
--- a/paths/steps/delete.yml
+++ b/paths/steps/delete.yml
@@ -1,6 +1,6 @@
 tags:
   - Steps
-summary: del Pathway
+summary: Remove a step
 description: delete for Step
 operationId: delStep
 x-eov-operation-handler: steps
-- 
GitLab


From 33d38c53ad6cb0ff9fd7a8f8205a4a5fbf80b930 Mon Sep 17 00:00:00 2001
From: Ludovic Cottret <ludovic.cottret@inra.fr>
Date: Wed, 30 Aug 2023 11:36:06 +0200
Subject: [PATCH 5/6] Apply 1 suggestion(s) to 1 file(s)

---
 paths/steps/delete.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paths/steps/delete.yml b/paths/steps/delete.yml
index ca76096..2afdd58 100644
--- a/paths/steps/delete.yml
+++ b/paths/steps/delete.yml
@@ -1,7 +1,7 @@
 tags:
   - Steps
 summary: Remove a step
-description: delete for Step
+description: delete a Step in an analysis
 operationId: delStep
 x-eov-operation-handler: steps
 security: 
-- 
GitLab


From 7f4296ad3747f11c24964c9686c73eab89d2ff1b Mon Sep 17 00:00:00 2001
From: JeanClement <jeanclement.gallardo@inrae.fr>
Date: Wed, 30 Aug 2023 15:09:23 +0200
Subject: [PATCH 6/6] fix auth for steps

---
 paths/steps/add.yml | 3 +++
 paths/steps/get.yml | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/paths/steps/add.yml b/paths/steps/add.yml
index b830653..5eb04e2 100644
--- a/paths/steps/add.yml
+++ b/paths/steps/add.yml
@@ -4,6 +4,9 @@ summary: add step
 description: add a step for a specific analysis
 operationId: addSteps
 x-eov-operation-handler: steps
+security: 
+  - appAuth: []
+    userAuth: []
 requestBody:
   content:
     application/json:
diff --git a/paths/steps/get.yml b/paths/steps/get.yml
index 086ff15..23fe17e 100644
--- a/paths/steps/get.yml
+++ b/paths/steps/get.yml
@@ -4,6 +4,9 @@ summary: Get specific step of an analysis
 operationId: getSteps
 x-eov-operation-handler: steps
 description: Get a specific step of an analysis
+security: 
+  - appAuth: []
+    userAuth: []
 parameters:
   - name: id
     in: query
-- 
GitLab