diff --git a/metexplore3-api.yml b/metexplore3-api.yml index 76d8c03ea8096a0e2ed0170ae409d0a5bf397eb9..a780257690036507a806a18c231fe29739297ed9 100644 --- a/metexplore3-api.yml +++ b/metexplore3-api.yml @@ -41,21 +41,33 @@ paths: /pathways: $ref: "paths/pathways/pathways.yml" + /pathways/count: + $ref: "paths/pathways/count.yml" /reactions: $ref: "paths/reactions/reactions.yml" + /reactions/count: + $ref: "paths/reactions/count.yml" /metabolites: $ref: "paths/metabolites/metabolites.yml" + /metabolites/count: + $ref: "paths/metabolites/count.yml" /enzymes: $ref: "paths/enzymes/enzymes.yml" + /enzymes/count: + $ref: "paths/enzymes/count.yml" /proteins: $ref: "paths/proteins/proteins.yml" + /proteins/count: + $ref: "paths/proteins/count.yml" /genes: $ref: "paths/genes/genes.yml" + /genes/count: + $ref: "paths/genes/count.yml" /filter: $ref: "paths/filters/get.yml" diff --git a/paths/analyses/add.yml b/paths/analyses/add.yml index d4c06eb5d0d80c4d94f3e2f1262863c78c604af3..d7887c6e2dee9abf8fa2099a776ceb647bfc6f7c 100644 --- a/paths/analyses/add.yml +++ b/paths/analyses/add.yml @@ -8,9 +8,7 @@ requestBody: content: application/json: schema: - type: object - items: - $ref: ../../schemas/analyses/AnalysesResponse.yml + $ref: ../../schemas/analyses/Analysis.yml responses: 200: description: successful operation diff --git a/paths/analyses/update.yml b/paths/analyses/update.yml index ba826263a0c53f8fa0d4fcec487672757461da20..b889d39691d79f6902699cbfda6fe6f4e1297469 100644 --- a/paths/analyses/update.yml +++ b/paths/analyses/update.yml @@ -8,9 +8,7 @@ requestBody: content: application/json: schema: - type: object - items: - $ref: ../../schemas/analyses/AnalysesResponse.yml + $ref: ../../schemas/analyses/Analysis.yml responses: 200: description: successful operation diff --git a/paths/enzymes/count.yml b/paths/enzymes/count.yml new file mode 100644 index 0000000000000000000000000000000000000000..5c86c6a24d05fd1d210c5425b91b015bce0ad76d --- /dev/null +++ b/paths/enzymes/count.yml @@ -0,0 +1,23 @@ +get: + tags: + - Enzymes + summary: count ligns Enzyme + description: get the number of enzymes for one biosource + operationId: countEnzymes + x-eov-operation-handler: enzymes + parameters: + - name: idBioSource + in: query + description: the idBioSource for the Enzyme + required: true + schema: + type: integer + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: ../../schemas/utils/CountResponse.yml + 404: + $ref: ../../responses/notFound.yml diff --git a/paths/genes/count.yml b/paths/genes/count.yml new file mode 100644 index 0000000000000000000000000000000000000000..49c9d9bc4a8a7a41a7b55ff7b32f451e0f9b1ae8 --- /dev/null +++ b/paths/genes/count.yml @@ -0,0 +1,23 @@ +get: + tags: + - Genes + summary: count ligns Genes + description: get the number of genes for one biosource + operationId: countGenes + x-eov-operation-handler: genes + parameters: + - name: idBioSource + in: query + description: the idBioSource for the genes + required: true + schema: + type: integer + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: ../../schemas/utils/CountResponse.yml + 404: + $ref: ../../responses/notFound.yml diff --git a/paths/metabolites/count.yml b/paths/metabolites/count.yml new file mode 100644 index 0000000000000000000000000000000000000000..393b77724d178ebb1d012574110731593326144e --- /dev/null +++ b/paths/metabolites/count.yml @@ -0,0 +1,23 @@ +get: + tags: + - Metabolites + summary: count ligns Metabolites + description: get the number of metabolites for one biosource + operationId: countMetabolites + x-eov-operation-handler: metabolites + parameters: + - name: idBioSource + in: query + description: the idBioSource for the metabolites + required: true + schema: + type: integer + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: ../../schemas/utils/CountResponse.yml + 404: + $ref: ../../responses/notFound.yml diff --git a/paths/pathways/count.yml b/paths/pathways/count.yml new file mode 100644 index 0000000000000000000000000000000000000000..1fcd3e15c655d99e07a4d0b8ec7980e036062fc7 --- /dev/null +++ b/paths/pathways/count.yml @@ -0,0 +1,23 @@ +get: + tags: + - Pathways + summary: count ligns Pathways + description: get the number of pathways for one biosource + operationId: countPathways + x-eov-operation-handler: pathways + parameters: + - name: idBioSource + in: query + description: the idBioSource for the pathways + required: true + schema: + type: integer + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: ../../schemas/utils/CountResponse.yml + 404: + $ref: ../../responses/notFound.yml diff --git a/paths/proteins/count.yml b/paths/proteins/count.yml new file mode 100644 index 0000000000000000000000000000000000000000..afff9f6f96b57494e7ba9af3788185f066afccf5 --- /dev/null +++ b/paths/proteins/count.yml @@ -0,0 +1,23 @@ +get: + tags: + - Proteins + summary: count ligns Proteins + description: get the number of proteins for one biosource + operationId: countProteins + x-eov-operation-handler: proteins + parameters: + - name: idBioSource + in: query + description: the idBioSource for the proteins + required: true + schema: + type: integer + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: ../../schemas/utils/CountResponse.yml + 404: + $ref: ../../responses/notFound.yml diff --git a/paths/reactions/count.yml b/paths/reactions/count.yml new file mode 100644 index 0000000000000000000000000000000000000000..d3d15486b50b677ed79399affa6327ad2b9c6611 --- /dev/null +++ b/paths/reactions/count.yml @@ -0,0 +1,23 @@ +get: + tags: + - Reactions + summary: count ligns Reactions + description: get the number of reactions for one biosource + operationId: countReactions + x-eov-operation-handler: reactions + parameters: + - name: idBioSource + in: query + description: the idBioSource for the reactions + required: true + schema: + type: integer + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: ../../schemas/utils/CountResponse.yml + 404: + $ref: ../../responses/notFound.yml diff --git a/paths/steps/add.yml b/paths/steps/add.yml index 0237d4262a9832c171d08a0e9f682a48c432a61a..b8306531284a5680a0e94edff5369c44d2d799c4 100644 --- a/paths/steps/add.yml +++ b/paths/steps/add.yml @@ -17,4 +17,6 @@ responses: content: application/json: schema: - $ref: ../../schemas/steps/StepResponse.yml \ No newline at end of file + $ref: ../../schemas/steps/StepResponse.yml + 404: + $ref: ../../responses/notFound.yml \ No newline at end of file diff --git a/paths/steps/get.yml b/paths/steps/get.yml index ad66a0fc5b8e5e4c3ac263dc5da3ef7b8e11182e..086ff157a68871ab9f0fd00a65ef8259f937968a 100644 --- a/paths/steps/get.yml +++ b/paths/steps/get.yml @@ -24,3 +24,5 @@ responses: application/json: schema: $ref: "../../schemas/steps/StepResponse.yml" + 404: + $ref: ../../responses/notFound.yml diff --git a/schemas/utils/CountResponse.yml b/schemas/utils/CountResponse.yml new file mode 100644 index 0000000000000000000000000000000000000000..390800bfbe3b2a7cb0b2a18eb5527bd0dcc3148a --- /dev/null +++ b/schemas/utils/CountResponse.yml @@ -0,0 +1,6 @@ +allOf: + - $ref: '../utils/BaseResponse.yml' + - type: object + - properties: + count: + type: integer