Skip to content

Commit

Permalink
fixing ResultsOKResponse for cohorts
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Mar 21, 2024
1 parent db307ba commit ea3be85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 37 deletions.
26 changes: 3 additions & 23 deletions models/json/beacon-v2-default-model/cohorts/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
]
}
Expand Down Expand Up @@ -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"
Expand All @@ -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",
Expand Down
21 changes: 7 additions & 14 deletions models/src/beacon-v2-default-model/cohorts/endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -216,4 +208,5 @@ components:
items:
type: string
examples:
- - OMIABIS:0001017
-
- OMIABIS:0001017

0 comments on commit ea3be85

Please sign in to comment.