diff --git a/paths/steps/delete.yml b/paths/steps/delete.yml new file mode 100644 index 0000000000000000000000000000000000000000..2afdd58b5ffec9a4b0e35e7e82bbc7848bce6ffe --- /dev/null +++ b/paths/steps/delete.yml @@ -0,0 +1,25 @@ +tags: + - Steps +summary: Remove a step +description: delete a Step in an analysis +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/steps/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 0eb3a128870beb7d2ac9d671a46f5f86fd6ab96b..5b3753304d24360ea79c150145d0fc2851c0d500 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 0000000000000000000000000000000000000000..5c329a6d1d053a92b42459df49650b57fb347447 --- /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/paths/users/login.yml b/paths/users/login.yml index d16c4a0c03bb2b39d75e7156a4bbf9cc9c57d7bd..ca564cfebf2c1ca3195dad9dd042e9a773043faa 100644 --- a/paths/users/login.yml +++ b/paths/users/login.yml @@ -20,3 +20,5 @@ post: $ref: '../../schemas/users/UserResponse.yml' 404: $ref: ../../responses/notFound.yml + 401: + $ref: ../../responses/notAuthorized.yml diff --git a/responses/_index.yml b/responses/_index.yml deleted file mode 100644 index e3c39547287e437f75f4368cc343d3c68d60620d..0000000000000000000000000000000000000000 --- a/responses/_index.yml +++ /dev/null @@ -1,4 +0,0 @@ -UserResponse: - $ref: './users/UserResponse.yml' -BioSourcesResponse: - $ref: './biosources/BioSourcesResponse.yml' \ No newline at end of file diff --git a/responses/notAuthorized.yml b/responses/notAuthorized.yml new file mode 100644 index 0000000000000000000000000000000000000000..7c6687d7b04fccfaf78f56a39dd35923071e88b4 --- /dev/null +++ b/responses/notAuthorized.yml @@ -0,0 +1,5 @@ +description: not authorized +content: + application/json: + schema: + $ref: ../schemas/utils/BaseResponse.yml \ No newline at end of file diff --git a/schemas/steps/StepUpdate.yml b/schemas/steps/StepUpdate.yml new file mode 100644 index 0000000000000000000000000000000000000000..72f6b51a83f707f64106604987a9652799f16384 --- /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