From 444d7d25f1778e5a4adc7baa1e469a55c01cb70e Mon Sep 17 00:00:00 2001 From: Jordi Rambla Date: Tue, 8 Oct 2024 06:27:26 +0200 Subject: [PATCH 1/3] Removing unused filteringTerms.yaml & json files --- .../analyses/filteringTerms.json | 4 ---- .../biosamples/filteringTerms.json | 4 ---- .../cohorts/filteringTerms.json | 11 ----------- .../datasets/filteringTerms.json | 11 ----------- .../genomicVariations/filteringTerms.json | 13 ------------- .../individuals/filteringTerms.json | 4 ---- .../runs/filteringTerms.json | 4 ---- .../analyses/filteringTerms.yaml | 2 -- .../biosamples/filteringTerms.yaml | 2 -- .../cohorts/filteringTerms.yaml | 6 ------ .../datasets/filteringTerms.yaml | 6 ------ .../genomicVariations/filteringTerms.yaml | 6 ------ .../individuals/filteringTerms.yaml | 2 -- .../runs/filteringTerms.yaml | 2 -- 14 files changed, 77 deletions(-) delete mode 100644 models/json/beacon-v2-default-model/analyses/filteringTerms.json delete mode 100644 models/json/beacon-v2-default-model/biosamples/filteringTerms.json delete mode 100644 models/json/beacon-v2-default-model/cohorts/filteringTerms.json delete mode 100644 models/json/beacon-v2-default-model/datasets/filteringTerms.json delete mode 100644 models/json/beacon-v2-default-model/genomicVariations/filteringTerms.json delete mode 100644 models/json/beacon-v2-default-model/individuals/filteringTerms.json delete mode 100644 models/json/beacon-v2-default-model/runs/filteringTerms.json delete mode 100644 models/src/beacon-v2-default-model/analyses/filteringTerms.yaml delete mode 100644 models/src/beacon-v2-default-model/biosamples/filteringTerms.yaml delete mode 100644 models/src/beacon-v2-default-model/cohorts/filteringTerms.yaml delete mode 100644 models/src/beacon-v2-default-model/datasets/filteringTerms.yaml delete mode 100644 models/src/beacon-v2-default-model/genomicVariations/filteringTerms.yaml delete mode 100644 models/src/beacon-v2-default-model/individuals/filteringTerms.yaml delete mode 100644 models/src/beacon-v2-default-model/runs/filteringTerms.yaml diff --git a/models/json/beacon-v2-default-model/analyses/filteringTerms.json b/models/json/beacon-v2-default-model/analyses/filteringTerms.json deleted file mode 100644 index 9cd753def..000000000 --- a/models/json/beacon-v2-default-model/analyses/filteringTerms.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [] -} \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/biosamples/filteringTerms.json b/models/json/beacon-v2-default-model/biosamples/filteringTerms.json deleted file mode 100644 index 9cd753def..000000000 --- a/models/json/beacon-v2-default-model/biosamples/filteringTerms.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [] -} \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/cohorts/filteringTerms.json b/models/json/beacon-v2-default-model/cohorts/filteringTerms.json deleted file mode 100644 index d53359eb0..000000000 --- a/models/json/beacon-v2-default-model/cohorts/filteringTerms.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [ - { - "ftType": "ontologyTerm", - "id": "DUO:0000006", - "label": "health or medical or biomedical research", - "version": "2021-02-23" - } - ] -} \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/datasets/filteringTerms.json b/models/json/beacon-v2-default-model/datasets/filteringTerms.json deleted file mode 100644 index d53359eb0..000000000 --- a/models/json/beacon-v2-default-model/datasets/filteringTerms.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [ - { - "ftType": "ontologyTerm", - "id": "DUO:0000006", - "label": "health or medical or biomedical research", - "version": "2021-02-23" - } - ] -} \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/genomicVariations/filteringTerms.json b/models/json/beacon-v2-default-model/genomicVariations/filteringTerms.json deleted file mode 100644 index 3241f2272..000000000 --- a/models/json/beacon-v2-default-model/genomicVariations/filteringTerms.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [ - { - "ftType": "alphanumeric", - "id": "gene" - }, - { - "ftType": "alphanumeric", - "id": "aminoacidChanges" - } - ] -} \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/individuals/filteringTerms.json b/models/json/beacon-v2-default-model/individuals/filteringTerms.json deleted file mode 100644 index 9cd753def..000000000 --- a/models/json/beacon-v2-default-model/individuals/filteringTerms.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [] -} \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/runs/filteringTerms.json b/models/json/beacon-v2-default-model/runs/filteringTerms.json deleted file mode 100644 index 9cd753def..000000000 --- a/models/json/beacon-v2-default-model/runs/filteringTerms.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "filteringTerms": [] -} \ No newline at end of file diff --git a/models/src/beacon-v2-default-model/analyses/filteringTerms.yaml b/models/src/beacon-v2-default-model/analyses/filteringTerms.yaml deleted file mode 100644 index 0701175cf..000000000 --- a/models/src/beacon-v2-default-model/analyses/filteringTerms.yaml +++ /dev/null @@ -1,2 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: [] diff --git a/models/src/beacon-v2-default-model/biosamples/filteringTerms.yaml b/models/src/beacon-v2-default-model/biosamples/filteringTerms.yaml deleted file mode 100644 index 0701175cf..000000000 --- a/models/src/beacon-v2-default-model/biosamples/filteringTerms.yaml +++ /dev/null @@ -1,2 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: [] diff --git a/models/src/beacon-v2-default-model/cohorts/filteringTerms.yaml b/models/src/beacon-v2-default-model/cohorts/filteringTerms.yaml deleted file mode 100644 index 92b6ef659..000000000 --- a/models/src/beacon-v2-default-model/cohorts/filteringTerms.yaml +++ /dev/null @@ -1,6 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: - - ftType: ontologyTerm - id: DUO:0000006 - label: health or medical or biomedical research - version: '2021-02-23' diff --git a/models/src/beacon-v2-default-model/datasets/filteringTerms.yaml b/models/src/beacon-v2-default-model/datasets/filteringTerms.yaml deleted file mode 100644 index 92b6ef659..000000000 --- a/models/src/beacon-v2-default-model/datasets/filteringTerms.yaml +++ /dev/null @@ -1,6 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: - - ftType: ontologyTerm - id: DUO:0000006 - label: health or medical or biomedical research - version: '2021-02-23' diff --git a/models/src/beacon-v2-default-model/genomicVariations/filteringTerms.yaml b/models/src/beacon-v2-default-model/genomicVariations/filteringTerms.yaml deleted file mode 100644 index ca25a1cd9..000000000 --- a/models/src/beacon-v2-default-model/genomicVariations/filteringTerms.yaml +++ /dev/null @@ -1,6 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: - - ftType: alphanumeric - id: gene - - ftType: alphanumeric - id: aminoacidChanges diff --git a/models/src/beacon-v2-default-model/individuals/filteringTerms.yaml b/models/src/beacon-v2-default-model/individuals/filteringTerms.yaml deleted file mode 100644 index 0701175cf..000000000 --- a/models/src/beacon-v2-default-model/individuals/filteringTerms.yaml +++ /dev/null @@ -1,2 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: [] diff --git a/models/src/beacon-v2-default-model/runs/filteringTerms.yaml b/models/src/beacon-v2-default-model/runs/filteringTerms.yaml deleted file mode 100644 index 0701175cf..000000000 --- a/models/src/beacon-v2-default-model/runs/filteringTerms.yaml +++ /dev/null @@ -1,2 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -filteringTerms: [] From a17c7b049db3abe76723da01abab2714691cba77 Mon Sep 17 00:00:00 2001 From: Jordi Rambla Date: Fri, 11 Oct 2024 16:50:31 +0200 Subject: [PATCH 2/3] Removing references to filteringTerms URL both in EntryTypeDefinitions and in Map --- framework/json/configuration/beaconMapSchema.json | 7 +------ framework/json/configuration/entryTypeDefinition.json | 5 ----- framework/src/configuration/beaconMapSchema.yaml | 9 --------- framework/src/configuration/entryTypeDefinition.yaml | 8 -------- 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/framework/json/configuration/beaconMapSchema.json b/framework/json/configuration/beaconMapSchema.json index 47fec6701..f583bbccc 100644 --- a/framework/json/configuration/beaconMapSchema.json +++ b/framework/json/configuration/beaconMapSchema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": true, - "definitions": { + "$defs": { "Endpoint": { "properties": { "endpoints": { @@ -16,11 +16,6 @@ "description": "", "type": "string" }, - "filteringTermsUrl": { - "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.", - "format": "uri-template", - "type": "string" - }, "openAPIEndpointsDefinition": { "description": "Reference to the file that includes the OpenAPI definition of the endpoints implemented in this Beacon instance. The referenced file MUST BE a valid OpenAPI definition file, as it is expected that the Beacon clients (e.g. a Beacon Network) should be able to parse it to discover additional details on the supported verbs, parameters, etc.", "type": "string" diff --git a/framework/json/configuration/entryTypeDefinition.json b/framework/json/configuration/entryTypeDefinition.json index 27d425770..98d1b714b 100644 --- a/framework/json/configuration/entryTypeDefinition.json +++ b/framework/json/configuration/entryTypeDefinition.json @@ -28,11 +28,6 @@ "description": "A textual description for the element.", "type": "string" }, - "filteringTerms": { - "$comment": "TO DO: Evaluate switch this to `url` or a more specific way for allowing URLs and local file paths (is this necessary?).", - "description": "Reference to the list of filtering terms that could be used to filter records of this entry type in this beacon.", - "type": "string" - }, "id": { "description": "A unique identifier of the element.", "examples": [ diff --git a/framework/src/configuration/beaconMapSchema.yaml b/framework/src/configuration/beaconMapSchema.yaml index 83170dab6..24ea2d366 100644 --- a/framework/src/configuration/beaconMapSchema.yaml +++ b/framework/src/configuration/beaconMapSchema.yaml @@ -47,15 +47,6 @@ definitions: whole map of endpoints is found in the current Map. type: string format: uri-template - filteringTermsUrl: - 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 ´rootUrl` and ´singleEntryUrl`, in which - case the whole map of endpoints is found in the current Map. - type: string - format: uri-template endpoints: description: Optional. A list describing additional endpoints implemented by this Beacon instance for that entry type. Additional details on the endpoint diff --git a/framework/src/configuration/entryTypeDefinition.yaml b/framework/src/configuration/entryTypeDefinition.yaml index 61916df7e..1e1e04f5f 100644 --- a/framework/src/configuration/entryTypeDefinition.yaml +++ b/framework/src/configuration/entryTypeDefinition.yaml @@ -57,14 +57,6 @@ properties: includedConcepts: type: array $ref: ../common/basicElement.yaml - filteringTerms: - description: >- - Reference to the list of filtering terms that could be used to filter records - of this entry type in this beacon. - type: string - $comment: >- - TO DO: Evaluate switch this to `url` or a more specific way for allowing - URLs and local file paths (is this necessary?). nonFilteredQueriesAllowed: $ref: ../common/beaconCommonComponents.yaml#/definitions/NonFilteredQueriesAllowed required: From 414aae5a085d70b34b06883a842c03a318c6b487 Mon Sep 17 00:00:00 2001 From: Jordi Rambla Date: Fri, 11 Oct 2024 17:22:00 +0200 Subject: [PATCH 3/3] Updating "definitions" to "$defs" to comply with Json Schema 2020-12 #173 --- bin/_jsonref2json.py | 4 +- bin/adhoc/beaconCommonComponents.json | 18 +++--- bin/adhoc/ontologyTerm.json | 2 +- bin/beacon_yaml2md.pl | 4 +- .../biosamples/defaultSchema.json | 4 +- bin/deref_schemas/cohorts/defaultSchema.json | 8 +-- bin/deref_schemas/datasets/defaultSchema.json | 2 +- .../genomicVariations/defaultSchema.json | 2 +- .../individuals/defaultSchema.json | 6 +- bin/transform_json2md.sh | 2 +- .../json/common/beaconCommonComponents.json | 18 +++--- framework/json/common/ontologyTerm.json | 2 +- .../beaconConfigurationSchema.json | 8 +-- .../json/configuration/beaconMapSchema.json | 8 +-- .../configuration/entryTypeDefinition.json | 4 +- .../json/configuration/entryTypesSchema.json | 4 +- .../configuration/filteringTermsSchema.json | 4 +- framework/json/endpoints.json | 4 +- .../json/requests/beaconRequestBody.json | 14 ++--- .../json/requests/beaconRequestMeta.json | 6 +- framework/json/requests/filteringTerms.json | 10 ++-- .../json/responses/beaconBooleanResponse.json | 4 +- .../responses/beaconCollectionsResponse.json | 4 +- .../json/responses/beaconCountResponse.json | 4 +- .../responses/beaconEntryTypesResponse.json | 2 +- .../json/responses/beaconErrorResponse.json | 2 +- .../responses/beaconResultsetsResponse.json | 4 +- .../ga4gh-service-info-1-0-0-schema.json | 4 +- .../beaconBooleanResponseSection.json | 2 +- .../sections/beaconCountResponseSection.json | 4 +- .../sections/beaconFilteringTermsResults.json | 6 +- .../responses/sections/beaconInfoResults.json | 14 ++--- .../beaconInformationalResponseMeta.json | 6 +- .../beaconReceivedRequestSummary.json | 14 ++--- .../sections/beaconResponseMeta.json | 10 ++-- .../responses/sections/beaconResultsets.json | 8 +-- .../beaconSummaryResponseSection.json | 4 +- .../analyses/defaultSchema.json | 2 +- .../analyses/endpoints.json | 6 +- .../biosamples/defaultSchema.json | 2 +- .../biosamples/endpoints.json | 46 +++++++-------- .../cohorts/defaultSchema.json | 30 +++++----- .../cohorts/endpoints.json | 44 +++++++-------- .../common/commonDefinitions.json | 2 +- .../common/complexValue.json | 4 +- .../common/dataUseConditions.json | 4 +- .../common/disease.json | 2 +- .../common/exposure.json | 2 +- .../common/pedigree.json | 4 +- .../common/phenotypicFeature.json | 4 +- .../common/quantity.json | 2 +- .../common/referenceRange.json | 2 +- .../common/timeElement.json | 2 +- .../common/timeInterval.json | 4 +- .../datasets/defaultSchema.json | 6 +- .../datasets/endpoints.json | 56 +++++++++---------- .../beacon-v2-default-model/endpoints.json | 28 +++++----- .../genomicVariations/defaultSchema.json | 34 +++++------ .../genomicVariations/endpoints.json | 37 ++++++------ .../genomicVariations/requestParameters.json | 10 ++-- .../requestParametersComponents.json | 4 +- .../individuals/defaultSchema.json | 10 ++-- .../individuals/endpoints.json | 46 +++++++-------- .../runs/defaultSchema.json | 2 +- .../runs/endpoints.json | 36 ++++++------ 65 files changed, 328 insertions(+), 329 deletions(-) diff --git a/bin/_jsonref2json.py b/bin/_jsonref2json.py index a2b9df228..8b569a9ec 100755 --- a/bin/_jsonref2json.py +++ b/bin/_jsonref2json.py @@ -14,7 +14,7 @@ # "$comment": "version: ga4gh-beacon-cohort-v2.0.0", # "$schema": "https://json-schema.org/draft/2020-12/schema", # "additionalProperties": true, -# "definitions": { +# "$defs": { # "CohortCriteria": { # "description": "THIS IS NOT OK", # "properties": { @@ -30,7 +30,7 @@ # "inclusionCriteria": { # "description": "THIS IS OK", # "type": "object", -# "$ref": "#/definitions/CohortCriteria" +# "$ref": "#/$defs/CohortCriteria" # } # } # } diff --git a/bin/adhoc/beaconCommonComponents.json b/bin/adhoc/beaconCommonComponents.json index 371d5b058..4f1890224 100644 --- a/bin/adhoc/beaconCommonComponents.json +++ b/bin/adhoc/beaconCommonComponents.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": { + "$defs": { "$schema": { "$comment": "TO REVIEW: adding a `format` or `regex` attribute that validates correctly against a file path (relative).", "description": "Refers to the JSON Schema which describes the set of valid attributes for this particular document type. This attribute is mostly used in schemas that should be tested in Beacon implementations.", @@ -83,7 +83,7 @@ "description": "A handover is a typed link for attaching actionable links to results, non purely informational, requests. The goal of the handovers is to list the different actions available, e.g.:\n* a link to a request access page * linking to a file for download, e.g. a VCF file\nAnother common scenario is to provide a fast summary response (e.g. BeconCountResponse) and to provide access to different endpoints for the entities matched by the query using temporary access tokens in the handover URLs.", "properties": { "handoverType": { - "$ref": "#/definitions/HandoverType" + "$ref": "#/$defs/HandoverType" }, "note": { "description": "An optional text including considerations on the handover link provided.", @@ -148,7 +148,7 @@ "ListOfHandovers": { "description": "Set of handovers to be added in one section the response.", "items": { - "$ref": "#/definitions/Handover", + "$ref": "#/$defs/Handover", "description": "Requested schema to be used for individuals in the response." }, "type": "array" @@ -156,7 +156,7 @@ "ListOfSchemas": { "description": "Set of schemas to be used in the response to a request.", "items": { - "$ref": "#/definitions/SchemasPerEntity" + "$ref": "#/$defs/SchemasPerEntity" }, "type": "array" }, @@ -182,22 +182,22 @@ "description": "Pagination to apply or that has been applied on the results.", "properties": { "currentPage": { - "$ref": "#/definitions/PageToken", + "$ref": "#/$defs/PageToken", "description": "Token of the returned page. To be used only in the response to allow the client to check if the returned page is the one requested." }, "limit": { - "$ref": "#/definitions/Limit" + "$ref": "#/$defs/Limit" }, "nextPage": { - "$ref": "#/definitions/PageToken", + "$ref": "#/$defs/PageToken", "description": "Token of the next page. Used to navigate forward. If empty, it is assumed that no more pages are available" }, "previousPage": { - "$ref": "#/definitions/PageToken", + "$ref": "#/$defs/PageToken", "description": "Token of the previous page. Used to navigate backwards. If empty, it is assumed that the current page is the first one." }, "skip": { - "$ref": "#/definitions/Skip" + "$ref": "#/$defs/Skip" } }, "type": "object" diff --git a/bin/adhoc/ontologyTerm.json b/bin/adhoc/ontologyTerm.json index 1b94438f2..15746e939 100644 --- a/bin/adhoc/ontologyTerm.json +++ b/bin/adhoc/ontologyTerm.json @@ -3,7 +3,7 @@ "additionalProperties": true, "properties": { "id": { - "$ref": "./beaconCommonComponents.json#/definitions/CURIE" + "$ref": "./beaconCommonComponents.json#/$defs/CURIE" }, "label": { "description": "The text that describes the term. By default it could be the preferred text of the term, but is it acceptable to customize it for a clearer description and understanding of the term in an specific context.", diff --git a/bin/beacon_yaml2md.pl b/bin/beacon_yaml2md.pl index 96e59c17f..b4b825d32 100755 --- a/bin/beacon_yaml2md.pl +++ b/bin/beacon_yaml2md.pl @@ -729,9 +729,9 @@ sub add_properties_vrs { my ( $property, $data ) = @_; my %url = ( 'SequenceExpression' => -'https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/definitions/', +'https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/$defs/', 'CopyNumber' => -'https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/definitions/' +'https://raw.githubusercontent.com/ga4gh/vrs/1.2/schema/vrs.json#/$defs/' ); if ( exists $url{$property} ) { $data->{properties} = diff --git a/bin/deref_schemas/biosamples/defaultSchema.json b/bin/deref_schemas/biosamples/defaultSchema.json index 1b5ffc61b..a00ae0a8c 100644 --- a/bin/deref_schemas/biosamples/defaultSchema.json +++ b/bin/deref_schemas/biosamples/defaultSchema.json @@ -357,7 +357,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": { + "$defs": { "TypedQuantity": { "properties": { "quantity": { @@ -1479,7 +1479,7 @@ "description": "List of phenotypic abnormalities of the sample. RECOMMENDED.", "items": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": {}, + "$defs": {}, "description": "Used to describe a phenotype that characterizes the subject or biosample.", "properties": { "evidence": { diff --git a/bin/deref_schemas/cohorts/defaultSchema.json b/bin/deref_schemas/cohorts/defaultSchema.json index f9721426c..96aa2913c 100644 --- a/bin/deref_schemas/cohorts/defaultSchema.json +++ b/bin/deref_schemas/cohorts/defaultSchema.json @@ -2,7 +2,7 @@ "$comment": "version: ga4gh-beacon-cohort-v2.0.0", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": true, - "definitions": { + "$defs": { "CohortCriteria": { "description": "Criteria used for defining the cohort. It is assumed that all cohort participants will match or NOT match such criteria.", "properties": { @@ -525,7 +525,7 @@ "description": "Phenotypic condition(s) in cohort inclusion criteria", "items": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": {}, + "$defs": {}, "description": "Used to describe a phenotype that characterizes the subject or biosample.", "properties": { "evidence": { @@ -2369,7 +2369,7 @@ "description": "Phenotypic condition(s) in cohort inclusion criteria", "items": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": {}, + "$defs": {}, "description": "Used to describe a phenotype that characterizes the subject or biosample.", "properties": { "evidence": { @@ -3418,7 +3418,7 @@ "description": "Phenotypic condition(s) in cohort inclusion criteria", "items": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": {}, + "$defs": {}, "description": "Used to describe a phenotype that characterizes the subject or biosample.", "properties": { "evidence": { diff --git a/bin/deref_schemas/datasets/defaultSchema.json b/bin/deref_schemas/datasets/defaultSchema.json index 75c3ff69c..91b8ed620 100644 --- a/bin/deref_schemas/datasets/defaultSchema.json +++ b/bin/deref_schemas/datasets/defaultSchema.json @@ -16,7 +16,7 @@ "description": "Data use conditions applying to this dataset.", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": true, - "definitions": { + "$defs": { "DUODataUse": { "allOf": [ { diff --git a/bin/deref_schemas/genomicVariations/defaultSchema.json b/bin/deref_schemas/genomicVariations/defaultSchema.json index 8bb046adb..e6aad1848 100644 --- a/bin/deref_schemas/genomicVariations/defaultSchema.json +++ b/bin/deref_schemas/genomicVariations/defaultSchema.json @@ -2,7 +2,7 @@ "$comment": "version: ga4gh-beacon-variant-v2.0.0", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": true, - "definitions": { + "$defs": { "CaseLevelVariant": { "description": "", "properties": { diff --git a/bin/deref_schemas/individuals/defaultSchema.json b/bin/deref_schemas/individuals/defaultSchema.json index cbe33523a..da94f0d4a 100644 --- a/bin/deref_schemas/individuals/defaultSchema.json +++ b/bin/deref_schemas/individuals/defaultSchema.json @@ -1035,7 +1035,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": { + "$defs": { "TypedQuantity": { "properties": { "quantity": { @@ -1812,7 +1812,7 @@ "items": { "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": true, - "definitions": { + "$defs": { "pedigreeMember": { "examples": [ { @@ -2401,7 +2401,7 @@ "phenotypicFeatures": { "items": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": {}, + "$defs": {}, "description": "Used to describe a phenotype that characterizes the subject or biosample.", "properties": { "evidence": { diff --git a/bin/transform_json2md.sh b/bin/transform_json2md.sh index ce73254fc..f4c782785 100755 --- a/bin/transform_json2md.sh +++ b/bin/transform_json2md.sh @@ -43,7 +43,7 @@ Fixing errors in JSON EOT # For mysteriorous reasons ontologyTerm.json (within CURIE) only works (jsonref2json.js) with $ref: url -sed -i "s#\./beaconCommonComponents.json\#/definitions/CURIE#$adhoc_url/beaconCommonComponents.json\#/definitions/CURIE#" $fwk_dir/common/ontologyTerm.json +sed -i "s#\./beaconCommonComponents.json\#/$defs/CURIE#$adhoc_url/beaconCommonComponents.json\#/$defs/CURIE#" $fwk_dir/common/ontologyTerm.json cat< `end[1]`\n - single or double sided precise matches can be achieved by setting\n `start[1]=start[0]+1` and `end[1]=end[0]+1`", diff --git a/models/json/beacon-v2-default-model/genomicVariations/requestParametersComponents.json b/models/json/beacon-v2-default-model/genomicVariations/requestParametersComponents.json index 60ff1da6e..4fab6770c 100644 --- a/models/json/beacon-v2-default-model/genomicVariations/requestParametersComponents.json +++ b/models/json/beacon-v2-default-model/genomicVariations/requestParametersComponents.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "definitions": { + "$defs": { "AlternateBases": { "description": "Alternate bases for this variant (starting from `start`). * Accepted values: `[ACGTN]*` * The current specification supports allelic variants, **not** genotype queries\n (i.e. multiple co-occurring alleles).\n* N is a wildcard, that denotes the position of any base,\n and can be used as a standalone base of any type or within a partially known\n sequence. As example, a query of `ANNT` the Ns can take take any form of [ACGT]\n and will match `ANNT`, `ACNT`, `ACCT`, `ACGT` ... and so forth.\n* an *empty value* is used in the case of deletions with the maximally trimmed,\n deleted sequence being indicated in `ReferenceBases`\n* Categorical variant queries, e.g. such *not* being represented through\n sequence & position, make use of the `variantType` parameter.", "pattern": "^([ACGTUNRYSWKMBDHV\\-\\.]*)$", @@ -30,5 +30,5 @@ "type": "string" } }, - "description": "Component definitions used in `requestParameters`." + "description": "Component $defs used in `requestParameters`." } \ No newline at end of file diff --git a/models/json/beacon-v2-default-model/individuals/defaultSchema.json b/models/json/beacon-v2-default-model/individuals/defaultSchema.json index 69f989a65..e5b6876a6 100644 --- a/models/json/beacon-v2-default-model/individuals/defaultSchema.json +++ b/models/json/beacon-v2-default-model/individuals/defaultSchema.json @@ -12,7 +12,7 @@ "type": "array" }, "ethnicity": { - "$ref": "../common/commonDefinitions.json#/definitions/Ethnicity", + "$ref": "../common/commonDefinitions.json#/$defs/Ethnicity", "description": "Ethnic background of the individual. Value from NCIT Race (NCIT:C17049) ontology term descendants, e.g. NCIT:C126531 (Latin American). A geographic ancestral origin category that is assigned to a population group based mainly on physical characteristics that are thought to be distinct and inherent. [ NCI ] " }, "exposures": { @@ -22,7 +22,7 @@ "type": "array" }, "geographicOrigin": { - "$ref": "../common/commonDefinitions.json#/definitions/GeographicLocation", + "$ref": "../common/commonDefinitions.json#/$defs/GeographicLocation", "description": "Individual's country or region of origin (birthplace or residence place regardless of ethnic origin). Value from GAZ Geographic Location ontology (GAZ:00000448), e.g. GAZ:00002459 (United States of America)." }, "id": { @@ -31,7 +31,7 @@ "type": "string" }, "info": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/Info" + "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/$defs/Info" }, "interventionsOrProcedures": { "items": { @@ -40,7 +40,7 @@ "type": "array" }, "karyotypicSex": { - "$ref": "../common/commonDefinitions.json#/definitions/KaryotypicSex", + "$ref": "../common/commonDefinitions.json#/$defs/KaryotypicSex", "description": "The chromosomal sex of an individual represented from a selection of options." }, "measures": { @@ -62,7 +62,7 @@ "type": "array" }, "sex": { - "$ref": "../common/commonDefinitions.json#/definitions/Sex", + "$ref": "../common/commonDefinitions.json#/$defs/Sex", "description": "Sex of the individual. Value from NCIT General Qualifier (NCIT:C27993): 'unknown' (not assessed or not available) (NCIT:C17998), 'female' (NCIT:C16576), or 'male', (NCIT:C20197)." }, "treatments": { diff --git a/models/json/beacon-v2-default-model/individuals/endpoints.json b/models/json/beacon-v2-default-model/individuals/endpoints.json index 32898cb17..affa76262 100644 --- a/models/json/beacon-v2-default-model/individuals/endpoints.json +++ b/models/json/beacon-v2-default-model/individuals/endpoints.json @@ -25,13 +25,13 @@ } }, "includeResultsetResponses": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/IncludeResultsetResponses" + "$ref": "../../../../framework/json/common/beaconCommonComponents.json#/$defs/IncludeResultsetResponses" }, "limit": { "in": "query", "name": "limit", "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/Limit" + "$ref": "../../../../framework/json/common/beaconCommonComponents.json#/$defs/Limit" } }, "requestedSchema": { @@ -48,7 +48,7 @@ "in": "query", "name": "skip", "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/Skip" + "$ref": "../../../../framework/json/common/beaconCommonComponents.json#/$defs/Skip" } } }, @@ -59,13 +59,13 @@ "schema": { "oneOf": [ { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconBooleanResponse.json" + "$ref": "../../../../framework/json/responses/beaconBooleanResponse.json" }, { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCountResponse.json" + "$ref": "../../../../framework/json/responses/beaconCountResponse.json" }, { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconResultsetsResponse.json" + "$ref": "../../../../framework/json/responses/beaconResultsetsResponse.json" } ] } @@ -115,7 +115,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json" + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json" } }, "tags": [ @@ -129,7 +129,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -140,7 +140,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -166,14 +166,14 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconFilteringTermsResponse.json" + "$ref": "../../../../framework/json/responses/beaconFilteringTermsResponse.json" } } }, "description": "Successful operation" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -188,7 +188,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -199,14 +199,14 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconFilteringTermsResponse.json" + "$ref": "../../../../framework/json/responses/beaconFilteringTermsResponse.json" } } }, "description": "Successful operation" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -224,7 +224,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -244,7 +244,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -255,7 +255,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -284,7 +284,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -304,7 +304,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -315,7 +315,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -344,7 +344,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -364,7 +364,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -375,7 +375,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, diff --git a/models/json/beacon-v2-default-model/runs/defaultSchema.json b/models/json/beacon-v2-default-model/runs/defaultSchema.json index 6e49d8dfb..61d090df2 100644 --- a/models/json/beacon-v2-default-model/runs/defaultSchema.json +++ b/models/json/beacon-v2-default-model/runs/defaultSchema.json @@ -26,7 +26,7 @@ "type": "string" }, "info": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/Info" + "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/$defs/Info" }, "libraryLayout": { "description": "Ontology value for the library layout e.g \"PAIRED\", \"SINGLE\" #todo add Ontology name?", diff --git a/models/json/beacon-v2-default-model/runs/endpoints.json b/models/json/beacon-v2-default-model/runs/endpoints.json index b5084bba7..39f4f728c 100644 --- a/models/json/beacon-v2-default-model/runs/endpoints.json +++ b/models/json/beacon-v2-default-model/runs/endpoints.json @@ -33,7 +33,7 @@ } }, "includeResultsetResponses": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/IncludeResultsetResponses" + "$ref": "../../../../framework/json/common/beaconCommonComponents.json#/$defs/IncludeResultsetResponses" }, "individualId": { "in": "path", @@ -47,7 +47,7 @@ "in": "query", "name": "limit", "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/Limit" + "$ref": "../../../../framework/json/common/beaconCommonComponents.json#/$defs/Limit" } }, "requestedSchema": { @@ -64,7 +64,7 @@ "in": "query", "name": "skip", "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/common/beaconCommonComponents.json#/definitions/Skip" + "$ref": "../../../../framework/json/common/beaconCommonComponents.json#/$defs/Skip" } } }, @@ -75,13 +75,13 @@ "schema": { "oneOf": [ { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconBooleanResponse.json" + "$ref": "../../../../framework/json/responses/beaconBooleanResponse.json" }, { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconCountResponse.json" + "$ref": "../../../../framework/json/responses/beaconCountResponse.json" }, { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconResultsetsResponse.json" + "$ref": "../../../../framework/json/responses/beaconResultsetsResponse.json" } ] } @@ -131,7 +131,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json" + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json" } }, "tags": [ @@ -145,7 +145,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -156,7 +156,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -174,7 +174,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -194,7 +194,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -205,7 +205,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -234,7 +234,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -254,7 +254,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -265,7 +265,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -294,7 +294,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } }, @@ -314,7 +314,7 @@ "content": { "application/json": { "schema": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/requests/beaconRequestBody.json" + "$ref": "../../../../framework/json/requests/beaconRequestBody.json" } } }, @@ -325,7 +325,7 @@ "$ref": "#/components/responses/ResultsOKResponse" }, "default": { - "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/framework/json/responses/beaconErrorResponse.json", + "$ref": "../../../../framework/json/responses/beaconErrorResponse.json", "description": "An unsuccessful operation" } },