From 342096bc833338e9924d27c33be4b2ae7755f425 Mon Sep 17 00:00:00 2001 From: idazucchi Date: Mon, 11 Mar 2024 17:41:03 +0000 Subject: [PATCH] disallow DUOS id for data_use_restriction=NRES --- docs/jsonBrowser/type.md | 2 +- json_schema/type/project/project.json | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index c7a88d74..b001495e 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -328,7 +328,7 @@ biostudies_accessions | A BioStudies study accession. | array | no | | BioStudi funders | Funding source(s) supporting the project. | array | yes | [See module funder](module.md#funder) | Funding source(s) | | estimated_cell_count | An estimated number of cells in this project | integer | no | | Estimated cell count | | 10000; 2100000 data_use_restriction | Data use restrictions that apply to the project. | string | yes | | Data use restriction | NRES, GRU, GRU-NCU | GRU -DUOS_id | A DUOS study accession. | array | no | | DUOS id | | DUOS-000108; DUOS-000114 +DUOS_id | A DUOS study accession. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 ## Specimen from organism _Information about the specimen that was collected from the donor organism._ diff --git a/json_schema/type/project/project.json b/json_schema/type/project/project.json index a453a9ed..831cbfc4 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -180,11 +180,8 @@ }, "DUOS_id": { "description": "A DUOS study accession.", - "type": "array", - "items": { - "type": "string", - "pattern": "^DUOS-\\d{1,6}$" - }, + "type": "string", + "pattern": "^DUOS-\\d{1,6}$", "example": "DUOS-000108; DUOS-000114", "user_friendly": "DUOS id", "guidelines": "Managed access projects are registered in DUOS to regulate access. If the project is managed access record the corresponding DUOS id here." @@ -202,5 +199,15 @@ }, "then" : { "required": ["DUOS_id"] + }, + "else" : { + "properties": { + "data_use_restriction" : { + "enum": ["NRES"] + }, + "DUOS_id" : { + "maxLength": 0 + } + } } }