From 1bdd4d6f0f79adf7b56d7fc38186170ae77244e5 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Mon, 6 Nov 2023 13:48:46 -0800 Subject: [PATCH 1/3] QNode and QEdge fixes --- TranslatorReasonerAPI.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 436f833f..37ab0b4c 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -770,6 +770,7 @@ components: referenced elsewhere in the TRAPI output by the dictionary key. additionalProperties: $ref: '#/components/schemas/Node' + nullable: false edges: type: object description: >- @@ -777,6 +778,7 @@ components: referenced elsewhere in the TRAPI output by the dictionary key. additionalProperties: $ref: '#/components/schemas/Edge' + nullable: false additionalProperties: true required: - nodes @@ -796,6 +798,7 @@ components: on bound nodes. additionalProperties: $ref: '#/components/schemas/QNode' + nullable: false edges: type: object description: >- @@ -805,6 +808,7 @@ components: QNodes. additionalProperties: $ref: '#/components/schemas/QEdge' + nullable: false additionalProperties: true required: - nodes @@ -855,7 +859,8 @@ components: to AND) items: $ref: '#/components/schemas/AttributeConstraint' - default: [] + minItems: 1 + nullable: true additionalProperties: true QEdge: type: object @@ -899,6 +904,7 @@ components: Corresponds to the map key identifier of the subject concept node anchoring the query filter pattern for the query relationship edge. + nullable: false object: type: string example: https://www.uniprot.org/uniprot/P00738 @@ -906,6 +912,7 @@ components: Corresponds to the map key identifier of the object concept node anchoring the query filter pattern for the query relationship edge. + nullable: false attribute_constraints: type: array description: >- @@ -914,7 +921,8 @@ components: to AND) items: $ref: '#/components/schemas/AttributeConstraint' - default: [] + nullable: true + minItems: 1 qualifier_constraints: type: array description: >- @@ -927,7 +935,8 @@ components: because these complex use cases are not supported at this time. items: $ref: '#/components/schemas/QualifierConstraint' - default: [] + nullable: true + minItems: 1 additionalProperties: true required: - subject From d713e2668dce32003ebec629a4939dc40e226bbc Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Fri, 15 Dec 2023 11:55:05 -0800 Subject: [PATCH 2/3] Update QNode and QEdge arrays --- TranslatorReasonerAPI.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 37ab0b4c..3015b3cb 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -859,8 +859,10 @@ components: to AND) items: $ref: '#/components/schemas/AttributeConstraint' - minItems: 1 - nullable: true + minItems: 0 + nullable: false + required: + - constraints additionalProperties: true QEdge: type: object @@ -921,8 +923,8 @@ components: to AND) items: $ref: '#/components/schemas/AttributeConstraint' - nullable: true - minItems: 1 + nullable: false + minItems: 0 qualifier_constraints: type: array description: >- @@ -935,12 +937,14 @@ components: because these complex use cases are not supported at this time. items: $ref: '#/components/schemas/QualifierConstraint' - nullable: true - minItems: 1 + nullable: false + minItems: 0 additionalProperties: true required: - subject - object + - attribute_constraints: + - qualifier_constraints: Node: type: object description: >- From 3414d876ceec888704c9de1de339fc27e3d42557 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Fri, 15 Dec 2023 11:55:56 -0800 Subject: [PATCH 3/3] Update QNode and QEdge --- TranslatorReasonerAPI.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TranslatorReasonerAPI.yaml b/TranslatorReasonerAPI.yaml index 3015b3cb..db2c03ae 100644 --- a/TranslatorReasonerAPI.yaml +++ b/TranslatorReasonerAPI.yaml @@ -943,8 +943,8 @@ components: required: - subject - object - - attribute_constraints: - - qualifier_constraints: + - attribute_constraints + - qualifier_constraints Node: type: object description: >-