Skip to content

Commit d648770

Browse files
authored
Merge branch 'schema-urgent-fixes' into fix-137
2 parents bf88b39 + 39f4242 commit d648770

File tree

73 files changed

+1272
-547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1272
-547
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,18 @@ There is a set of tools in [`/bin`](./bin/) to facilitate the conversion. ATM, a
3030

3131
### Changelog
3232

33+
## 2.1.1
34+
35+
*Released, October, 8, 2024*
36+
[Beacon-v2.1.1](https://github.com/ga4gh-beacon/beacon-v2/tree/5ea17fbd0d2ba533aa1e85f7271f9a2cc9be6794)
37+
38+
* Changed uri for uri-template in Endpoint.singleEntryUrl
39+
40+
3341
## 2.1.0
3442

3543
*Released, July, 19, 2024*
44+
[Beacon-v2.1.0](https://github.com/ga4gh-beacon/beacon-v2/tree/16862205c79294fae5473f7fa330bf5929b3b120)
3645

3746
* Relocated TypedQuantity required to proper level of the schema for complexValue
3847
* Added end and start entities for ageRange and iso8601duration for age
@@ -41,6 +50,7 @@ There is a set of tools in [`/bin`](./bin/) to facilitate the conversion. ATM, a
4150
## 2.0.1
4251

4352
*Released July, 16, 2024*
53+
[Beacon-v2.0.1](https://github.com/ga4gh-beacon/beacon-v2/tree/f6f85c445922831bd398552384593206c86287de)
4454

4555
* Replaced ENSGLOSSARY for SO ontology family in documentation examples
4656
* Moved CURIE to beaconCommonComponents
@@ -51,6 +61,7 @@ There is a set of tools in [`/bin`](./bin/) to facilitate the conversion. ATM, a
5161
## 2.0.0
5262

5363
*Released June, 21, 2022*
64+
[Beacon-v2.0.0](https://github.com/ga4gh-beacon/beacon-v2/tree/d07ef1626321f7428374a4f68d864dfa5e98370f)
5465

5566
* change notes with respect to the repository & documentation are now in [docs.genomebeacons.org](https://docs.genomebeacons.org/changes-todo/)
5667
* NOTE: on 2022-06-20 the previous development repositories have been archived:

bin/beacon_yaml2md.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,9 @@ sub add_properties_vrs {
729729
my ( $property, $data ) = @_;
730730
my %url = (
731731
'SequenceExpression' =>
732-
'https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/definitions/',
732+
'https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/',
733733
'CopyNumber' =>
734-
'https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/definitions/'
734+
'https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/'
735735
);
736736
if ( exists $url{$property} ) {
737737
$data->{properties} =

bin/deref_schemas/obj/CopyNumber.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
CopyNumber:
3-
properties: '[VRS definition for CopyNumber](https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/definitions/CopyNumber)'
3+
properties: '[VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/CopyNumber)'
44
type: allOf

bin/yamlerRunner.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
BASEDIR=$(dirname $0)
22
UNITYPATH=$BASEDIR/..
3-
4-
# initial conversion from separate schemas
5-
# DEPRECATED
6-
# BEACONMODELPATH=$BASEDIR/../../beacon-v2-Models/BEACON-V2-Model
7-
# BEACONFRAMEWORKPATH=$BASEDIR/../../beacon-framework-v2
8-
93
BEACONMODELNAME=beacon-v2-default-model
104

11-
# for UPSTREAM in $BEACONMODELPATH $BEACONFRAMEWORKPATH
12-
# do
13-
# echo "pulling $UPSTREAM"
14-
# git -C $UPSTREAM pull
15-
# done
16-
175
for KIND in src json
186
do
197
mkdir -p $UNITYPATH/models/$KIND/$BEACONMODELNAME
208
mkdir -p $UNITYPATH/framework/$KIND
219
done
2210

23-
# $BASEDIR/beaconYamler.py -i $BEACONMODELPATH -t json -x yaml -o $UNITYPATH/models/src/$BEACONMODELNAME
24-
# $BASEDIR/beaconYamler.py -i $BEACONFRAMEWORKPATH -t json -x yaml -o $UNITYPATH/framework/src
25-
2611
# recurring conversion from the source files to the exported versions
2712
$BASEDIR/beaconYamler.py -i $UNITYPATH/models/src/$BEACONMODELNAME -t yaml -x json -o $UNITYPATH/models/json/$BEACONMODELNAME
2813
$BASEDIR/beaconYamler.py -i $UNITYPATH/framework/src -t yaml -x json -o $UNITYPATH/framework/json

docs/schemas-md/obj/CopyNumber.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
|Term | Description | Type | Properties | Example | Enum|
22
| ---| ---| ---| ---| ---| --- |
3-
| CopyNumber | NA | allOf | [VRS definition for CopyNumber](https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/definitions/CopyNumber) | NA | NA|
3+
| CopyNumber | NA | allOf | [VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/CopyNumber) | NA | NA|

framework/json/common/beaconCommonComponents.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@
142142
],
143143
"type": "string"
144144
},
145-
"Info": {
146-
"description": "Placeholder to allow the Beacon to return any additional information that is necessary or could be of interest in relation to the query or the entry returned. It is recommended to encapsulate additional informations in this attribute instead of directly adding attributes at the same level than the others in order to avoid collision in the names of attributes in future versions of the specification.",
147-
"type": "object"
148-
},
149145
"Limit": {
150146
"default": 10,
151147
"description": "Size of the page. Use `0` to return all the results or the maximum allowed by the Beacon, if there is any.",

framework/json/common/info.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"description": "Placeholder to allow the Beacon to return any additional information that is necessary or could be of interest in relation to the query or the entry returned. It is recommended to encapsulate additional informations in this attribute instead of directly adding attributes at the same level than the others in order to avoid collision in the names of attributes in future versions of the specification.",
4+
"title": "Info",
5+
"type": "object"
6+
}

framework/json/configuration/beaconConfigurationSchema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"$schema": "https://json-schema.org/draft/2020-12/schema",
1414
"additionalProperties": true,
15-
"description": "Files complaint with this schema are the configuration ones. The details returned in `service-info` are mirroring the ones in this configuration file.",
15+
"description": "The Beacon configuration reports several attributes of the beacon instance related to security, maturity and available entry types. Where appropriate the details returned in `service-info` should mirror the ones in this configuration.",
1616
"properties": {
1717
"$schema": {
1818
"$ref": "../common/beaconCommonComponents.json#/$defs/$schema"
@@ -24,7 +24,7 @@
2424
"description": "Declares the level of maturity of the Beacon instance.",
2525
"properties": {
2626
"productionStatus": {
27-
"description": "`DEV`= 'Service potentially unstable, not real data', which availability and data should not be used in production setups. `TEST`= 'Service stable, not real data'. 'PROD'= 'Service stable, actual data'.",
27+
"description": "* `DEV`: Service potentially unstable, _i.e._ potentially not real data,\n inconsistent availability; data should not be used in production setups \n* `TEST`: Service is stable but data should be considered synthetic * `PROD`: Service stable with real world data ",
2828
"enum": [
2929
"DEV",
3030
"TEST",

framework/json/configuration/beaconMapSchema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"filteringTermsUrl": {
1818
"description": "Optional. Returns the list of filtering terms that could be applied to this entry type. It is added here for convenience of the Beacon clients, so they don't need to parse the OpenAPI endpoints definition to get that endpoint. Also, in very simple Beacons, that endpoint could be the one of the few implemented, together with \u00b4rootUrl` and \u00b4singleEntryUrl`, in which case the whole map of endpoints is found in the current Map.",
19-
"format": "uri",
19+
"format": "uri-template",
2020
"type": "string"
2121
},
2222
"openAPIEndpointsDefinition": {
@@ -30,7 +30,7 @@
3030
},
3131
"singleEntryUrl": {
3232
"description": "Optional, but recommended. Returns only one instance of this entry, identified by an `id`. It is added here for convenience of the Beacon clients, so they don't need to parse the OpenAPI endpoints definition to get that base endpoint. Also, in very simple Beacons, that endpoint could be the only one implemented, together with \u00b4rootUrl`, in which case the whole map of endpoints is found in the current Map.",
33-
"format": "uri",
33+
"format": "uri-template",
3434
"type": "string"
3535
}
3636
},
@@ -48,7 +48,7 @@
4848
},
4949
"url": {
5050
"description": "Endpoint URL",
51-
"format": "uri",
51+
"format": "uri-template",
5252
"type": "string"
5353
}
5454
},

framework/json/configuration/entryTypeDefinition.json

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
{
2-
"$comment": "TO DO: The tagged parts should reference to `common/ontologizedElement.json`. But that configuration fails to validate. Further investigation is required, but should not affect the resulting schema.",
32
"$schema": "https://json-schema.org/draft/2020-12/schema",
43
"additionalProperties": true,
5-
"description": "Definition of an element or entry type including the Beacon v2 required and suggested attributes. This schema purpose is to describe each type of entities included in a Beacon, hence Beacon clients could have some metadata about such entities.\n\nThe `id` attribute is the key that should be used in other parts of the Beacon Model to allow Beacon clients to identify the different parts (e.g. endpoints, filteringTerms, request parameters, etc.) that fully describe an entry type.",
4+
"description": "Definition of an element or scope of the element, to describe each type of entry type included in a beacon. The `id` attribute is the key that should be used in other parts of the data model to allow Beacon clients to identify the different parts (e.g. endpoints, filtering terms, request parameters, etc.) that are relvant for an entry type.",
65
"properties": {
76
"$schema": {
87
"$ref": "../common/beaconCommonComponents.json#/$defs/$schema"
98
},
109
"aCollectionOf": {
1110
"description": "If the entry type is a collection of other entry types, (e.g. a Dataset is a collection of Records), then this attribute must list the entry types that could be included. One collection type could be defined as included more than one entry type (e.g. a Dataset could include Individuals or Genomic Variants), in such cases the entries are alternative, meaning that a given instance of this entry type could be of only one of the types (e.g. a given Dataset contains Individuals, while another Dataset could contain Genomic Variants, but not both at once).",
12-
"includedConcepts": {
13-
"$ref": "../common/basicElement.json",
14-
"type": "array"
11+
"type": "array",
12+
"items": {
13+
"$ref": "../common/basicElement.json"
1514
}
1615
},
1716
"additionallySupportedSchemas": {
@@ -30,13 +29,17 @@
3029
"type": "string"
3130
},
3231
"filteringTerms": {
33-
"$comment": "TO DO: Double-check the proper way of referencing a path or relative path. 'format: uri' is throwing validation errors for relative file paths",
34-
"description": "Reference to the file with the list of filtering terms that could be used to filter this concept in this instance of Beacon. The referenced file could be used to populate the `filteringTerms`endpoint. Having it independently should allow for updating the list of accepted filtering terms when it is necessary.",
32+
"$comment": "TO DO: Evaluate switch this to `url` or a more specific way for allowing URLs and local file paths (is this necessary?).",
33+
"description": "Reference to the list of filtering terms that could be used to filter records of this entry type in this beacon.",
3534
"type": "string"
3635
},
3736
"id": {
38-
"$comments": "++++++ THIS IS THE START OF THE ontologized element ++++++",
39-
"description": "A (unique) identifier of the element.",
37+
"description": "A unique identifier of the element.",
38+
"examples": [
39+
"biosample",
40+
"individual",
41+
"dataset"
42+
],
4043
"type": "string"
4144
},
4245
"name": {
@@ -47,8 +50,17 @@
4750
"$ref": "../common/beaconCommonComponents.json#/$defs/NonFilteredQueriesAllowed"
4851
},
4952
"ontologyTermForThisType": {
50-
"$comments": "++++++ THIS IS THE END OF THE ontologized element ++++++",
51-
"$ref": "../common/ontologyTerm.json"
53+
"$ref": "../common/ontologyTerm.json",
54+
"examples": [
55+
{
56+
"id": "EFO:0000542",
57+
"label": "individual"
58+
},
59+
{
60+
"id": "OBI:0000747",
61+
"label": "material sample"
62+
}
63+
]
5264
},
5365
"partOfSpecification": {
5466
"description": "This is label to group together entry types that are part of the same specification.",
@@ -59,10 +71,9 @@
5971
"required": [
6072
"id",
6173
"name",
62-
"ontologyTermForThisType",
6374
"partOfSpecification",
6475
"defaultSchema"
6576
],
6677
"title": "",
6778
"type": "object"
68-
}
79+
}

framework/json/endpoints.json

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@
6363
"$ref": "#/components/responses/infoOKResponse"
6464
},
6565
"default": {
66-
"$ref": "./responses/beaconErrorResponse.json",
66+
"content": {
67+
"application/json": {
68+
"schema": {
69+
"$ref": "./responses/beaconErrorResponse.json"
70+
}
71+
}
72+
},
6773
"description": "An unsuccessful operation."
6874
}
6975
},
@@ -94,7 +100,13 @@
94100
"description": "Successful operation."
95101
},
96102
"default": {
97-
"$ref": "./responses/beaconErrorResponse.json",
103+
"content": {
104+
"application/json": {
105+
"schema": {
106+
"$ref": "./responses/beaconErrorResponse.json"
107+
}
108+
}
109+
},
98110
"description": "An unsuccessful operation."
99111
}
100112
},
@@ -121,7 +133,13 @@
121133
"description": "Successful operation."
122134
},
123135
"default": {
124-
"$ref": "./responses/beaconErrorResponse.json",
136+
"content": {
137+
"application/json": {
138+
"schema": {
139+
"$ref": "./responses/beaconErrorResponse.json"
140+
}
141+
}
142+
},
125143
"description": "An unsuccessful operation."
126144
}
127145
},
@@ -139,7 +157,13 @@
139157
"$ref": "./responses/beaconFilteringTermsResponse.json"
140158
},
141159
"default": {
142-
"$ref": "./responses/beaconErrorResponse.json",
160+
"content": {
161+
"application/json": {
162+
"schema": {
163+
"$ref": "./responses/beaconErrorResponse.json"
164+
}
165+
}
166+
},
143167
"description": "An unsuccessful operation."
144168
}
145169
},
@@ -165,7 +189,13 @@
165189
"$ref": "#/components/responses/infoOKResponse"
166190
},
167191
"default": {
168-
"$ref": "./responses/beaconErrorResponse.json",
192+
"content": {
193+
"application/json": {
194+
"schema": {
195+
"$ref": "./responses/beaconErrorResponse.json"
196+
}
197+
}
198+
},
169199
"description": "An unsuccessful operation."
170200
}
171201
},
@@ -197,7 +227,13 @@
197227
"description": "Successful operation."
198228
},
199229
"default": {
200-
"$ref": "./responses/beaconErrorResponse.json",
230+
"content": {
231+
"application/json": {
232+
"schema": {
233+
"$ref": "./responses/beaconErrorResponse.json"
234+
}
235+
}
236+
},
201237
"description": "An unsuccessful operation."
202238
}
203239
},

framework/json/responses/beaconBooleanResponse.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"description": "Complete definition for a minimal response that provides *only* a `Boolean` exists true|false answer.",
3+
"description": "Complete definition for a minimal response that provides *only* an aggregate Boolean `\"exists\": true` or `\"exists\": false` answer to the query. \nAdditional information - which should not consist of record-level information - can be provided through `beaconHandovers`. ",
44
"properties": {
55
"beaconHandovers": {
66
"$ref": "../common/beaconCommonComponents.json#/$defs/ListOfHandovers",
77
"description": "List of handovers that apply to the whole response, not to any resultset or result in particular."
88
},
99
"info": {
10-
"$ref": "../common/beaconCommonComponents.json#/$defs/Info",
10+
"$ref": "../common/info.json",
1111
"description": "Additional details that could be of interest. Provided to clearly enclose any attribute that is not part of the Beacon specification."
1212
},
1313
"meta": {

framework/json/responses/beaconCollectionsResponse.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"additionalProperties": true,
4-
"description": "Beacon response that includes details about the collections in this Beacon.",
4+
"description": "A type of Beacon response that includes details about the **collections** in a beacon. The types of collections are defined in each beacon's configuration; if using the Beacon v2+ default model usually the types `dataset` and `cohort` are supported.",
55
"properties": {
66
"beaconHandovers": {
77
"$ref": "../common/beaconCommonComponents.json#/$defs/ListOfHandovers",
88
"description": "List of handovers that apply to the whole response, not to any resultset or result in particular."
99
},
1010
"info": {
11-
"$ref": "../common/beaconCommonComponents.json#/$defs/Info",
11+
"$ref": "../common/info.json",
1212
"description": "Additional details that could be of interest. Provided to clearly enclose any attribute that is not part of the Beacon specification."
1313
},
1414
"meta": {

framework/json/responses/beaconConfigurationResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"additionalProperties": true,
4-
"description": "Information about the Beacon. Aimed to Beacon clients like web pages or Beacon networks.",
4+
"description": "The `beaconConfigurationResponse` returns information about configuration parameters of a given beacon instance such as maturity or security attributes or supported entry types. It is directed towards Beacon clients like web pages or network aggregators.",
55
"properties": {
66
"meta": {
77
"$ref": "./sections/beaconInformationalResponseMeta.json",

0 commit comments

Comments
 (0)