From ea3be857bbb7983e8e434e2017c612dedbf1a17e Mon Sep 17 00:00:00 2001 From: Michael Baudis Date: Thu, 21 Mar 2024 19:18:12 +0100 Subject: [PATCH] fixing ResultsOKResponse for cohorts --- .../cohorts/endpoints.json | 26 +++---------------- .../cohorts/endpoints.yaml | 21 +++++---------- 2 files changed, 10 insertions(+), 37 deletions(-) diff --git a/models/json/beacon-v2-default-model/cohorts/endpoints.json b/models/json/beacon-v2-default-model/cohorts/endpoints.json index 1e36b7462..417c26028 100644 --- a/models/json/beacon-v2-default-model/cohorts/endpoints.json +++ b/models/json/beacon-v2-default-model/cohorts/endpoints.json @@ -50,26 +50,6 @@ } }, "responses": { - "CollectionsResponse": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconBooleanResponse.json" - }, - { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCountResponse.json" - }, - { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCollectionsResponse.json" - } - ] - } - } - }, - "description": "Successful collection list operation." - }, "ResultsOKResponse": { "content": { "application/json": { @@ -82,7 +62,7 @@ "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCountResponse.json" }, { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconResultsetsResponse.json" + "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCollectionsResponse.json" } ] } @@ -126,7 +106,7 @@ ], "responses": { "200": { - "$ref": "#/components/responses/CollectionsResponse" + "$ref": "#/components/responses/ResultsOKResponse" }, "default": { "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json" @@ -151,7 +131,7 @@ }, "responses": { "200": { - "$ref": "#/components/responses/CollectionsResponse" + "$ref": "#/components/responses/ResultsOKResponse" }, "default": { "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", diff --git a/models/src/beacon-v2-default-model/cohorts/endpoints.yaml b/models/src/beacon-v2-default-model/cohorts/endpoints.yaml index 9fd0e999a..56fe318a5 100644 --- a/models/src/beacon-v2-default-model/cohorts/endpoints.yaml +++ b/models/src/beacon-v2-default-model/cohorts/endpoints.yaml @@ -28,7 +28,7 @@ paths: - GET Endpoints responses: '200': - $ref: '#/components/responses/CollectionsResponse' + $ref: '#/components/responses/ResultsOKResponse' default: $ref: https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json post: @@ -44,7 +44,7 @@ paths: required: true responses: '200': - $ref: '#/components/responses/CollectionsResponse' + $ref: '#/components/responses/ResultsOKResponse' default: description: An unsuccessful operation $ref: https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json @@ -166,15 +166,6 @@ components: responses: ResultsOKResponse: description: Successful operation. - content: - application/json: - schema: - oneOf: - - $ref: https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconBooleanResponse.json - - $ref: https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCountResponse.json - - $ref: https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconResultsetsResponse.json - CollectionsResponse: - description: Successful collection list operation. content: application/json: schema: @@ -185,8 +176,9 @@ components: parameters: requestedSchema: name: requestedSchema - description: Schema to be used to format the `result` field in the response. - The response will use Beacon format. + description: >- + Schema to be used to format the `result` field in the response. + The response will use the Beacon format. in: query required: false schema: @@ -216,4 +208,5 @@ components: items: type: string examples: - - - OMIABIS:0001017 + - + - OMIABIS:0001017