From dc8dec2c726d208471e40506bb462cfd4e42d565 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 09:26:23 -0800 Subject: [PATCH 01/16] add qualifiers object to the MetaEdge object --- TranslatorReasonerAPI.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 7f3b6965..c45da550 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -861,9 +861,9 @@ components: type: string description: >- The category of the qualifier, drawn from a hierarchy of qualifier - slots in the Biolink model (e.g. subject_aspect, subject_direction, - object_aspect, object_direction, etc). - example: subject_aspect + slots in the Biolink model (e.g. biolink:subject_aspect_qualifier, biolink:subject_direction_qualifier, + biolink:object_aspect_qualifier, biolink:object_direction_qualifier, etc). + example: biolink:subject_aspect_qualifier nullable: false qualifier_value: type: string @@ -871,7 +871,7 @@ components: The value associated with the type of the qualifier, drawn from a set of controlled values by the type as specified in the Biolink model (e.g. 'expression' or 'abundance' for the - qualifier type 'subject_aspect', etc). + qualifier type 'biolink:subject_aspect_qualifier', etc). example: expression nullable: false required: @@ -1020,8 +1020,12 @@ components: description: >- Edge attributes provided by this TRAPI web service. items: - $ref: '#/components/schemas/MetaAttribute' + $ref: '#/components/schemas/Qualifier' nullable: true + qualifiers: + type: array + description: >- + Qualifiers that are possible to be found on this edge type. required: - subject - predicate From 9d827ded3d4e13ef126a2e893ff01de7cb905bb9 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 09:32:36 -0800 Subject: [PATCH 02/16] move type of association from string to BiolinkEntity to take advantage of regex validation --- TranslatorReasonerAPI.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index c45da550..3da86d1c 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -1020,16 +1020,29 @@ components: description: >- Edge attributes provided by this TRAPI web service. items: - $ref: '#/components/schemas/Qualifier' + $ref: '#/components/schemas/MetaAttribute' nullable: true qualifiers: - type: array description: >- Qualifiers that are possible to be found on this edge type. + items: + $ref: '#/components/schemas/Qualifier' + nullable: true + type: array + association: + type: object + $ref: '#/components/schemas/BiolinkEntity' + description: >- + The Biolink association type (entity) that this edge represents. Associations are classes in Biolink + that represent a relationship between two entities. For example, the association 'gene interacts with gene' + is represented by the Biolink class 'biolink:GeneToGeneAssociation'. + example: biolink:ChemicalToGeneAssociation + nullable: false required: - subject - predicate - object + - association additionalProperties: false MetaAttribute: type: object From b29904ec6b8a807209e8ecb464f3775a1834f593 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 13:57:06 -0800 Subject: [PATCH 03/16] update test infrastructure to work with the latest reasoner-validator --- .yamllint.yml | 2 +- TranslatorReasonerAPI.yaml | 35 +++++++++++++++++++++----- examples/metaedge_with_qualifiers.json | 34 +++++++++++++++++++++++++ tests/test_valid.py | 9 ++++--- tox.ini | 1 + 5 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 examples/metaedge_with_qualifiers.json diff --git a/.yamllint.yml b/.yamllint.yml index c746e146..6c8d3da1 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -5,7 +5,7 @@ rules: empty-values: forbid-in-block-mappings: true line-length: - max: 79 + max: 100 quoted-strings: quote-type: single required: only-when-needed diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 3da86d1c..4fb6bb81 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -861,8 +861,10 @@ components: type: string description: >- The category of the qualifier, drawn from a hierarchy of qualifier - slots in the Biolink model (e.g. biolink:subject_aspect_qualifier, biolink:subject_direction_qualifier, - biolink:object_aspect_qualifier, biolink:object_direction_qualifier, etc). + slots in the Biolink model (e.g. biolink:subject_aspect_qualifier, + biolink:subject_direction_qualifier, + biolink:object_aspect_qualifier, + biolink:object_direction_qualifier, etc). example: biolink:subject_aspect_qualifier nullable: false qualifier_value: @@ -1026,16 +1028,18 @@ components: description: >- Qualifiers that are possible to be found on this edge type. items: - $ref: '#/components/schemas/Qualifier' + $ref: '#/components/schemas/MetaQualifier' nullable: true type: array association: type: object $ref: '#/components/schemas/BiolinkEntity' description: >- - The Biolink association type (entity) that this edge represents. Associations are classes in Biolink - that represent a relationship between two entities. For example, the association 'gene interacts with gene' - is represented by the Biolink class 'biolink:GeneToGeneAssociation'. + The Biolink association type (entity) that this edge represents. + Associations are classes in Biolink + that represent a relationship between two entities. + For example, the association 'gene interacts with gene' + is represented by the Biolink class, 'biolink:GeneToGeneAssociation'. example: biolink:ChemicalToGeneAssociation nullable: false required: @@ -1044,6 +1048,25 @@ components: - object - association additionalProperties: false + MetaQualifier: + type: object + properties: + qualifier_type_id: + type: string + description: >- + The CURIE of the qualifier type. Note: biolink:qualified_predicate is a valid + qualifier_type_id and should be included in the + list of qualifiers for any MetaEdge association that has + a biolink:qualified_predicate. + example: biolink:subject_aspect_qualifier + applicable_values: + type: array + description: >- + The list of values that are possible for this qualifier. + items: + type: string + example: [expression, activity, abundance, degradation] + nullable: true MetaAttribute: type: object properties: diff --git a/examples/metaedge_with_qualifiers.json b/examples/metaedge_with_qualifiers.json new file mode 100644 index 00000000..2f56facf --- /dev/null +++ b/examples/metaedge_with_qualifiers.json @@ -0,0 +1,34 @@ + [ + { + "subject": "biolink:ChemicalEntity", + "predicate": "biolink:affects", + "object": "biolink:Gene", + "knowledge_types": [ + "lookup" + ], + "association": "biolink:ChemicalToGeneAssociation", + "qualifiers": [ + { + "qualifier_type_id": "biolink:subject_aspect_qualifier", + "applicable_values": [ + "expression", + "abundance" + ] + }, + { + "qualifier_type_id": "biolink:subject_aspect_qualifier", + "applicable_values": [ + "expression", + "abundance", + "activity" + ] + }, + { + "qualifier_type_id": "biolink:qualified_predicate", + "applicable_values": [ + "biolink:causes" + ] + } + ] + } +] \ No newline at end of file diff --git a/tests/test_valid.py b/tests/test_valid.py index f8be000d..8cc283b4 100644 --- a/tests/test_valid.py +++ b/tests/test_valid.py @@ -6,7 +6,7 @@ import requests import yaml from jsonschema.exceptions import ValidationError -from reasoner_validator import validate +from reasoner_validator.trapi import TRAPISchemaValidator def test_valid(): @@ -34,11 +34,12 @@ def test_examples(): print(full_path) example = json.load(f) trapi_version_locally = spec['info']['x-trapi']['version'] + print(trapi_version_locally) + tsv = TRAPISchemaValidator(trapi_version_locally) try: - validate( + tsv.validate( instance=example, - component="Message", - trapi_version=trapi_version_locally + component="Message" ) except ValidationError: raise ValueError('TRAPI example is not valid against the trapi_version specified!') diff --git a/tox.ini b/tox.ini index 1c255f9d..6b2c50a0 100644 --- a/tox.ini +++ b/tox.ini @@ -18,3 +18,4 @@ passenv = commands = yamllint TranslatorReasonerAPI.yaml pytest + From 4639b966c079671de6be8f8061c5e5140065a21b Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 14:02:21 -0800 Subject: [PATCH 04/16] clean up spacing in description --- TranslatorReasonerAPI.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 4fb6bb81..2501489c 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -1055,9 +1055,8 @@ components: type: string description: >- The CURIE of the qualifier type. Note: biolink:qualified_predicate is a valid - qualifier_type_id and should be included in the - list of qualifiers for any MetaEdge association that has - a biolink:qualified_predicate. + qualifier_type_id and should be included in the list of qualifiers for any MetaEdge + association that has a biolink:qualified_predicate. example: biolink:subject_aspect_qualifier applicable_values: type: array From 1fabe2e5c4bcd3fc54a1cf4bc8c702c357826380 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 14:03:48 -0800 Subject: [PATCH 05/16] clean up spacing in description --- TranslatorReasonerAPI.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 2501489c..82adf04c 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -1054,9 +1054,7 @@ components: qualifier_type_id: type: string description: >- - The CURIE of the qualifier type. Note: biolink:qualified_predicate is a valid - qualifier_type_id and should be included in the list of qualifiers for any MetaEdge - association that has a biolink:qualified_predicate. + The CURIE of the qualifier type. example: biolink:subject_aspect_qualifier applicable_values: type: array From 5a652fc521a546f4fec56872d6070612cbd95a72 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 14:04:42 -0800 Subject: [PATCH 06/16] clean up spacing in description --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 6b2c50a0..7623a67d 100644 --- a/tox.ini +++ b/tox.ini @@ -17,5 +17,4 @@ passenv = TRAVIS_* commands = yamllint TranslatorReasonerAPI.yaml - pytest - + pytest \ No newline at end of file From 82da50b45e3bd750dd4b39c800af6619b11bc630 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 14:05:29 -0800 Subject: [PATCH 07/16] clean up spacing --- examples/metaedge_with_qualifiers.json | 3 ++- tox.ini | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/metaedge_with_qualifiers.json b/examples/metaedge_with_qualifiers.json index 2f56facf..eb151601 100644 --- a/examples/metaedge_with_qualifiers.json +++ b/examples/metaedge_with_qualifiers.json @@ -31,4 +31,5 @@ } ] } -] \ No newline at end of file +] + \ No newline at end of file diff --git a/tox.ini b/tox.ini index 7623a67d..1c255f9d 100644 --- a/tox.ini +++ b/tox.ini @@ -17,4 +17,4 @@ passenv = TRAVIS_* commands = yamllint TranslatorReasonerAPI.yaml - pytest \ No newline at end of file + pytest From e10288f323354c3338da4e7af9adcdb18892ed82 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 14:59:19 -0800 Subject: [PATCH 08/16] commiting to show issue of new schema, failing tests even when testing against updated schema: see reasoner-validator issue 56 --- TranslatorReasonerAPI.yaml | 2 +- .../metaedge_with_qualifiers.json | 61 +++++++++++++++++++ examples/metaedge_with_qualifiers.json | 35 ----------- tests/test_valid.py | 33 +++++++++- 4 files changed, 94 insertions(+), 37 deletions(-) create mode 100644 examples/MetaKnowledgeGraph/metaedge_with_qualifiers.json delete mode 100644 examples/metaedge_with_qualifiers.json diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 82adf04c..93c43089 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -22,7 +22,7 @@ info: url: https://github.com/NCATSTranslator/translator_extensions/blob/\ production/x-translator/ x-trapi: - version: 1.3.0 + version: 1.2.0 asyncquery: REPLACE-WITH-true-IF-/asyncquery-IS-IMPLEMENTED-ELSE-false operations: - LIST-ALL-SUPPORTED-OPERATION-IDS-HERE-OR-REMOVE-THIS-SECTION diff --git a/examples/MetaKnowledgeGraph/metaedge_with_qualifiers.json b/examples/MetaKnowledgeGraph/metaedge_with_qualifiers.json new file mode 100644 index 00000000..7dbe794a --- /dev/null +++ b/examples/MetaKnowledgeGraph/metaedge_with_qualifiers.json @@ -0,0 +1,61 @@ +{ + "nodes": { + "biolink:MolecularActivity": { + "id_prefixes": [ + "RHEA", + "REACT", + "GO", + "UMLS" + ] + }, + "biolink:SmallMolecule": { + "id_prefixes": [ + "CHEBI", + "CHEMBL.COMPOUND", + "UMLS", + "UNII", + "PUBCHEM.COMPOUND", + "DRUGBANK", + "MESH", + "KEGG.COMPOUND", + "HMDB", + "CAS", + "KEGG.DRUG" + ] + } + }, + "edges": [ + { + "subject": "biolink:ChemicalEntity", + "predicate": "biolink:affects", + "object": "biolink:Gene", + "knowledge_types": [ + "lookup" + ], + "association": "biolink:ChemicalToGeneAssociation", + "qualifiers": [ + { + "qualifier_type_id": "biolink:subject_aspect_qualifier", + "applicable_values": [ + "expression", + "abundance" + ] + }, + { + "qualifier_type_id": "biolink:subject_aspect_qualifier", + "applicable_values": [ + "expression", + "abundance", + "activity" + ] + }, + { + "qualifier_type_id": "biolink:qualified_predicate", + "applicable_values": [ + "biolink:causes" + ] + } + ] + } + ] +} diff --git a/examples/metaedge_with_qualifiers.json b/examples/metaedge_with_qualifiers.json deleted file mode 100644 index eb151601..00000000 --- a/examples/metaedge_with_qualifiers.json +++ /dev/null @@ -1,35 +0,0 @@ - [ - { - "subject": "biolink:ChemicalEntity", - "predicate": "biolink:affects", - "object": "biolink:Gene", - "knowledge_types": [ - "lookup" - ], - "association": "biolink:ChemicalToGeneAssociation", - "qualifiers": [ - { - "qualifier_type_id": "biolink:subject_aspect_qualifier", - "applicable_values": [ - "expression", - "abundance" - ] - }, - { - "qualifier_type_id": "biolink:subject_aspect_qualifier", - "applicable_values": [ - "expression", - "abundance", - "activity" - ] - }, - { - "qualifier_type_id": "biolink:qualified_predicate", - "applicable_values": [ - "biolink:causes" - ] - } - ] - } -] - \ No newline at end of file diff --git a/tests/test_valid.py b/tests/test_valid.py index 6df30521..84591448 100644 --- a/tests/test_valid.py +++ b/tests/test_valid.py @@ -22,10 +22,11 @@ def test_valid(): jsonschema.validate(spec, openapi_schema) -def test_examples(): +def test_message_examples(): dir_path = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(dir_path, '..', 'TranslatorReasonerAPI.yaml')) as f: spec = yaml.load(f, Loader=yaml.SafeLoader) + print(spec) dir_path_json = os.path.join(dir_path, '../examples/Message') for filename in os.listdir(dir_path_json): full_path = os.path.join(dir_path_json, filename) @@ -36,6 +37,7 @@ def test_examples(): example = json.load(f) trapi_version_locally = spec['info']['x-trapi']['version'] validator = TRAPISchemaValidator(trapi_version=trapi_version_locally) + print(validator.trapi_version) try: validator.validate( instance=example, @@ -45,3 +47,32 @@ def test_examples(): print(validator.to_dict(), file=stderr) raise ValueError('TRAPI example is not valid against the trapi_version specified!') + +def test_metakg_examples(): + test_directory('../examples/MetaKnowledgeGraph', 'MetaKnowledgeGraph') + test_directory('../examples/Message', 'Message') + + +def test_directory(json_path, object_to_validate): + dir_path = os.path.dirname(os.path.realpath(__file__)) + with open(os.path.join(dir_path, '..', 'TranslatorReasonerAPI.yaml')) as f: + spec = yaml.load(f, Loader=yaml.SafeLoader) + dir_path_json = os.path.join(dir_path, json_path) + for filename in os.listdir(dir_path_json): + print(filename) + full_path = os.path.join(dir_path_json, filename) + file_extension = pathlib.Path(full_path).suffix + if file_extension == '.json': + with open(full_path) as f: + example = json.load(f) + trapi_version_locally = spec['info']['x-trapi']['version'] + print(trapi_version_locally) + validator = TRAPISchemaValidator(trapi_version=trapi_version_locally) + try: + validator.validate( + instance=example, + component=object_to_validate + ) + except ValidationError: + print(validator.to_dict(), file=stderr) + raise ValueError('TRAPI example is not valid against the trapi_version specified!') \ No newline at end of file From f42e7786e9c958d17ceb04f51ce91c80ad415130 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 9 Jan 2023 15:01:54 -0800 Subject: [PATCH 09/16] comment out metakg tests, waiting on issue 56 in reasoner-validator --- TranslatorReasonerAPI.yaml | 2 +- tests/test_valid.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 93c43089..82adf04c 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -22,7 +22,7 @@ info: url: https://github.com/NCATSTranslator/translator_extensions/blob/\ production/x-translator/ x-trapi: - version: 1.2.0 + version: 1.3.0 asyncquery: REPLACE-WITH-true-IF-/asyncquery-IS-IMPLEMENTED-ELSE-false operations: - LIST-ALL-SUPPORTED-OPERATION-IDS-HERE-OR-REMOVE-THIS-SECTION diff --git a/tests/test_valid.py b/tests/test_valid.py index 84591448..0ff466f3 100644 --- a/tests/test_valid.py +++ b/tests/test_valid.py @@ -48,25 +48,23 @@ def test_message_examples(): raise ValueError('TRAPI example is not valid against the trapi_version specified!') -def test_metakg_examples(): - test_directory('../examples/MetaKnowledgeGraph', 'MetaKnowledgeGraph') - test_directory('../examples/Message', 'Message') +def metakg_examples(): # def test_metakg_examples(): + mtest_directory('../examples/MetaKnowledgeGraph', 'MetaKnowledgeGraph') + mtest_directory('../examples/Message', 'Message') -def test_directory(json_path, object_to_validate): +def mtest_directory(json_path, object_to_validate): dir_path = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(dir_path, '..', 'TranslatorReasonerAPI.yaml')) as f: spec = yaml.load(f, Loader=yaml.SafeLoader) dir_path_json = os.path.join(dir_path, json_path) for filename in os.listdir(dir_path_json): - print(filename) full_path = os.path.join(dir_path_json, filename) file_extension = pathlib.Path(full_path).suffix if file_extension == '.json': with open(full_path) as f: example = json.load(f) trapi_version_locally = spec['info']['x-trapi']['version'] - print(trapi_version_locally) validator = TRAPISchemaValidator(trapi_version=trapi_version_locally) try: validator.validate( From f1c59663cf74dc711ecdbe4bf128cee695d7c96e Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Wed, 25 Jan 2023 16:04:42 -0800 Subject: [PATCH 10/16] revert line length --- .yamllint.yml | 2 +- TranslatorReasonerAPI.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.yamllint.yml b/.yamllint.yml index 6c8d3da1..c746e146 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -5,7 +5,7 @@ rules: empty-values: forbid-in-block-mappings: true line-length: - max: 100 + max: 79 quoted-strings: quote-type: single required: only-when-needed diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 82adf04c..dad5da30 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -22,7 +22,7 @@ info: url: https://github.com/NCATSTranslator/translator_extensions/blob/\ production/x-translator/ x-trapi: - version: 1.3.0 + version: 1.3.1-rc.1 asyncquery: REPLACE-WITH-true-IF-/asyncquery-IS-IMPLEMENTED-ELSE-false operations: - LIST-ALL-SUPPORTED-OPERATION-IDS-HERE-OR-REMOVE-THIS-SECTION @@ -1039,7 +1039,8 @@ components: Associations are classes in Biolink that represent a relationship between two entities. For example, the association 'gene interacts with gene' - is represented by the Biolink class, 'biolink:GeneToGeneAssociation'. + is represented by the Biolink class, + 'biolink:GeneToGeneAssociation'. example: biolink:ChemicalToGeneAssociation nullable: false required: From 127ac4a9db54aece8930f9d40ff39f60b56c7820 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Wed, 25 Jan 2023 16:07:17 -0800 Subject: [PATCH 11/16] make association nullable, add to the description that a non-null association can help the test harness validate qualifiers. --- TranslatorReasonerAPI.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index dad5da30..e4c3cea7 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -1040,14 +1040,15 @@ components: that represent a relationship between two entities. For example, the association 'gene interacts with gene' is represented by the Biolink class, - 'biolink:GeneToGeneAssociation'. + 'biolink:GeneToGeneAssociation'. If association + is filled out, then the testing harness can + help validate that the qualifiers are being used + correctly. example: biolink:ChemicalToGeneAssociation - nullable: false required: - subject - predicate - object - - association additionalProperties: false MetaQualifier: type: object From 9e60bc0dfc212f63a58f8c862d203c5d8b2cbc21 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Wed, 25 Jan 2023 16:07:55 -0800 Subject: [PATCH 12/16] update the version in the spec to 1.4.0-rc1 --- TranslatorReasonerAPI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index e4c3cea7..5d69be2a 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -22,7 +22,7 @@ info: url: https://github.com/NCATSTranslator/translator_extensions/blob/\ production/x-translator/ x-trapi: - version: 1.3.1-rc.1 + version: 1.4.0-rc.1 asyncquery: REPLACE-WITH-true-IF-/asyncquery-IS-IMPLEMENTED-ELSE-false operations: - LIST-ALL-SUPPORTED-OPERATION-IDS-HERE-OR-REMOVE-THIS-SECTION From fd30a1aa30a4f885a76fbd4a705f0bf8d971843a Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Wed, 25 Jan 2023 16:17:20 -0800 Subject: [PATCH 13/16] update the version in the spec to 1.4.0-dev --- TranslatorReasonerAPI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 5d69be2a..71ebd86e 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -22,7 +22,7 @@ info: url: https://github.com/NCATSTranslator/translator_extensions/blob/\ production/x-translator/ x-trapi: - version: 1.4.0-rc.1 + version: 1.4.0-dev asyncquery: REPLACE-WITH-true-IF-/asyncquery-IS-IMPLEMENTED-ELSE-false operations: - LIST-ALL-SUPPORTED-OPERATION-IDS-HERE-OR-REMOVE-THIS-SECTION From d76e67f0e9c7bb4cf4aba8c8f7ad078227801ac8 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Fri, 27 Jan 2023 11:38:40 -0800 Subject: [PATCH 14/16] add CURIE constraint to qualifier_type --- TranslatorReasonerAPI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 71ebd86e..cd10edb3 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -858,7 +858,7 @@ components: type: object properties: qualifier_type_id: - type: string + $ref: #/components/schemas/CURIE description: >- The category of the qualifier, drawn from a hierarchy of qualifier slots in the Biolink model (e.g. biolink:subject_aspect_qualifier, From c578b08d02875652a1ffa05eb3572cbbf4d3770a Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Fri, 27 Jan 2023 13:00:25 -0800 Subject: [PATCH 15/16] add CURIE constraint to qualifier_type_id in MetaQualifier --- TranslatorReasonerAPI.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index cd10edb3..7c8929b8 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -858,7 +858,7 @@ components: type: object properties: qualifier_type_id: - $ref: #/components/schemas/CURIE + $ref: '#/components/schemas/CURIE' description: >- The category of the qualifier, drawn from a hierarchy of qualifier slots in the Biolink model (e.g. biolink:subject_aspect_qualifier, @@ -1054,7 +1054,7 @@ components: type: object properties: qualifier_type_id: - type: string + $ref: '#/components/schemas/CURIE' description: >- The CURIE of the qualifier type. example: biolink:subject_aspect_qualifier From 5038ac7e9659ec59a492eae4abb00e3f94749bfa Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Thu, 23 Feb 2023 14:46:01 -0800 Subject: [PATCH 16/16] add qualifier_type_id required to MetaQualifier --- TranslatorReasonerAPI.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 7c8929b8..66f6fb32 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -1058,6 +1058,7 @@ components: description: >- The CURIE of the qualifier type. example: biolink:subject_aspect_qualifier + nullable: false applicable_values: type: array description: >- @@ -1065,7 +1066,8 @@ components: items: type: string example: [expression, activity, abundance, degradation] - nullable: true + required: + - qualifier_type_id MetaAttribute: type: object properties: