diff --git a/entity-api-spec.yaml b/entity-api-spec.yaml index c2949cb5..0cf044c7 100644 --- a/entity-api-spec.yaml +++ b/entity-api-spec.yaml @@ -300,25 +300,6 @@ components: - consortium - public description: 'One of the values: public, consortium' - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: 'List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array.' - image_files_to_add: - writeOnly: true - type: array - items: - type: string - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: uuid - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' metadata: type: object properties: @@ -503,42 +484,6 @@ components: visit: type: string description: 'The visit id for the donor/patient when the sample was obtained.' - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: 'List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array.' - image_files_to_add: - writeOnly: true - type: array - items: - type: string - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: uuid - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - metadata_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: 'List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array.' - metadata_files_to_add: - type: array - items: - type: string - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - metadata_files_to_remove: - type: array - items: - type: string - format: uuid - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' rui_exemption: type: boolean description: 'Identifies Sample Blocks that are exempt from spatial registration via RUI.' @@ -1372,9 +1317,6 @@ components: contacts: [contact objects] description: 'Description of the property' data_access_level: 'public' - image_files: [image_files objects] - image_files_to_add: [strings] - image_files_to_remove: [strings] metadata: object protocol_url: '10.35079/protocols.io.abcdefghijkl' lab_donor_id: 'AB123' @@ -1404,12 +1346,6 @@ components: data_access_level: 'public' sample_category: 'organ' organ: 'AO' - image_files: [image_files objects] - image_files_to_add: [strings] - image_files_to_remove: [strings] - metadata_files: [file object] - metadata_files_to_add: [string] - metadata_files_to_remove: [string] protocol_url: '10.35079/protocols.io.abcdefghijkl' lab_tissue_sample_id: '12-345 Aorta AA-1' submission_id: 'AB1234' @@ -1725,12 +1661,6 @@ components: data_access_level: 'public' sample_category: 'organ' organ: 'AO' - image_files: [image_files objects] - image_files_to_add: [strings] - image_files_to_remove: [strings] - metadata_files: [file object] - metadata_files_to_add: [string] - metadata_files_to_remove: [string] protocol_url: '10.35079/protocols.io.abcdefghijkl' lab_tissue_sample_id: '12-345 Aorta AA-1' submission_id: 'AB1234' @@ -1758,12 +1688,6 @@ components: data_access_level: 'public' sample_category: 'organ' organ: 'AO' - image_files: [image_files objects] - image_files_to_add: [strings] - image_files_to_remove: [strings] - metadata_files: [file object] - metadata_files_to_add: [string] - metadata_files_to_remove: [string] protocol_url: '10.35079/protocols.io.abcdefghijkl' lab_tissue_sample_id: '12-345 Aorta AA-1' submission_id: 'AB1234' @@ -1934,9 +1858,6 @@ components: contacts: [contact objects] description: 'Description of the property' data_access_level: 'public' - image_files: [image_files objects] - image_files_to_add: [strings] - image_files_to_remove: [strings] metadata: object protocol_url: '10.35079/protocols.io.abcdefghijkl' lab_donor_id: 'AB123' @@ -1961,9 +1882,6 @@ components: contacts: [contact objects] description: 'Description of the property' data_access_level: 'public' - image_files: [image_files objects] - image_files_to_add: [strings] - image_files_to_remove: [strings] metadata: object protocol_url: '10.35079/protocols.io.abcdefghijkl' lab_donor_id: 'AB123' diff --git a/src/app.py b/src/app.py index 4cd24fb4..fd1c901d 100644 --- a/src/app.py +++ b/src/app.py @@ -5049,7 +5049,7 @@ def create_entity_details(request, normalized_entity_type, user_token, json_data # Filter out the merged_dict by getting rid of the transitent properties (not to be stored) # and properties with None value # Meaning the returned target property key is different from the original key - # in the trigger method, e.g., Donor.image_files_to_add + # in the trigger method filtered_merged_dict = schema_manager.remove_transient_and_none_values(merged_dict, normalized_entity_type) # Create new entity try: @@ -5069,7 +5069,7 @@ def create_entity_details(request, normalized_entity_type, user_token, json_data # Important: use `entity_dict` instead of `filtered_merged_dict` to keep consistent with the stored - # string expression literals of Python list/dict being used with entity update, e.g., `image_files` + # string expression literals of Python list/dict being used with entity update # Important: the same property keys in entity_dict will overwrite the same key in json_data_dict # and this is what we wanted. Adding json_data_dict back is to include those `transient` properties # provided in the JSON input but not stored in neo4j, and will be needed for after_create_trigger/after_update_trigger, @@ -5204,7 +5204,7 @@ def create_multiple_samples_details(request, normalized_entity_type, user_token, # Filter out the merged_dict by getting rid of the transitent properties (not to be stored) # and properties with None value # Meaning the returned target property key is different from the original key - # in the trigger method, e.g., Donor.image_files_to_add + # in the trigger method filtered_merged_dict = schema_manager.remove_transient_and_none_values(merged_dict, normalized_entity_type) samples_dict_list = [] @@ -5332,7 +5332,7 @@ def create_multiple_component_details(request, normalized_entity_type, user_toke # Filter out the merged_dict by getting rid of the transitent properties (not to be stored) # and properties with None value # Meaning the returned target property key is different from the original key - # in the trigger method, e.g., Donor.image_files_to_add + # in the trigger method filtered_merged_dict = schema_manager.remove_transient_and_none_values(merged_dict, normalized_entity_type) dataset_dict = {**filtered_merged_dict, **new_ids_dict_list[i]} dataset_dict['dataset_link_abs_dir'] = dataset_link_abs_dir @@ -5445,7 +5445,7 @@ def update_entity_details(request, normalized_entity_type, user_token, json_data # Filter out the merged_dict by getting rid of the transitent properties (not to be stored) # and properties with None value # Meaning the returned target property key is different from the original key - # in the trigger method, e.g., Donor.image_files_to_add + # in the trigger method filtered_merged_dict = schema_manager.remove_transient_and_none_values(merged_dict, normalized_entity_type) # By now the filtered_merged_dict contains all user updates and all triggered data to be added to the entity node diff --git a/src/schema/provenance_schema.yaml b/src/schema/provenance_schema.yaml index 16aa5c00..cf454742 100644 --- a/src/schema/provenance_schema.yaml +++ b/src/schema/provenance_schema.yaml @@ -838,40 +838,6 @@ ENTITIES: indexed: true description: "One of the values: public, consortium" before_create_trigger: set_data_access_level - image_files: - # This property has no before_create_trigger method, but will be created via `image_files_to_add` and updated via `image_files_to_delete` - type: list - generated: true # Disallow direct user input from create via POST, but can be used for update via PUT - indexed: false - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - # Only file descriptions are allowed to be updated directly using this property - # Adding or deleting files must via the other two properties - before_update_trigger: update_file_descriptions - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - image_files_to_add: - type: list - transient: true - exposed: false - indexed: false - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - before_create_trigger: commit_image_files - before_update_trigger: commit_image_files - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - image_files_to_remove: - # This is only valid on update via a PUT request - type: list - transient: true - exposed: false - indexed: false - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - before_update_trigger: delete_image_files - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true metadata: type: json_string # dict indexed: true @@ -994,12 +960,6 @@ ENTITIES: indexed: true required_on_create: true description: "The protocols.io doi url pointing the protocol under wich the sample was obtained and/or prepared." - image_file_metadata: - #todo: migrate to new attribute set as above portal_metadata_upload files - type: json_string - indexed: true - description: "A list of uploaded image files and descriptions of the files." - # A user who is a member of multiple groups HAS to send in the group_uuid group_uuid: type: string immutable: true @@ -1079,74 +1039,6 @@ ENTITIES: type: string indexed: true description: "The visit id for the donor/patient when the sample was obtained." - image_files: - # This property has no before_create_trigger method, but will be created via `image_files_to_add` and updated via `image_files_to_remove` - type: list - generated: true # Disallow direct user input from create via POST, but can be used for update via PUT - indexed: false - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - # Only file descriptions are allowed to be updated directly using this property - # Adding or deleting files must via the other two properties - before_update_trigger: update_file_descriptions - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - image_files_to_add: - type: list - transient: true - exposed: false - indexed: false - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - before_create_trigger: commit_image_files - before_update_trigger: commit_image_files - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - image_files_to_remove: - # This is only valid on update via a PUT request - type: list - transient: true - exposed: false - indexed: false - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - before_update_trigger: delete_image_files - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - metadata_files: - # This property has no before_create_trigger method, but will be created via `metadata_files_to_add` and updated via `metadata_files_to_remove` - type: list - generated: true # Disallow direct user input from create via POST, but can be used for update via PUT - indexed: false - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - # Only file descriptions are allowed to be updated directly using this property - # Adding or deleting files must via the other two properties - before_update_trigger: update_file_descriptions - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - metadata_files_to_add: - type: list - transient: true - exposed: false - indexed: false - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - before_create_trigger: commit_metadata_files - before_update_trigger: commit_metadata_files - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true - metadata_files_to_remove: - # This is only valid on update via a PUT request - type: list - transient: true - exposed: false - indexed: false - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - before_update_trigger: delete_metadata_files - # The updated_peripherally tag is a temporary measure to correctly handle any attributes - # which are potentially updated by multiple triggers - updated_peripherally: true thumbnail_file: generated: true indexed: true diff --git a/src/schema/schema_manager.py b/src/schema/schema_manager.py index 490867c6..a6e871ec 100644 --- a/src/schema/schema_manager.py +++ b/src/schema/schema_manager.py @@ -843,7 +843,7 @@ def remove_none_values(merged_dict): Filter out the merged_dict by getting rid of the transitent properties (not to be stored) and properties with None value Meaning the returned target property key is different from the original key -in the trigger method, e.g., Donor.image_files_to_add +in the trigger method Parameters ---------- diff --git a/src/schema/schema_triggers.py b/src/schema/schema_triggers.py index f1387dd9..dc54d481 100644 --- a/src/schema/schema_triggers.py +++ b/src/schema/schema_triggers.py @@ -462,6 +462,10 @@ def set_submission_id(property_key, normalized_type, request_args, user_token, e """ +DEPRECATED: This function is no longer used. +The image_files and metadata_files properties have been removed from the schema. +This function is retained for record-keeping purposes only and should not be called. + TriggerTypeEnum.BEFORE_CREATE Trigger event method to commit files saved that were previously uploaded with UploadFileHelper.save_file @@ -513,6 +517,11 @@ def commit_image_files(property_key, normalized_type, request_args, user_token, """ +DEPRECATED: This function is no longer used. +The image_files and metadata_files properties have been removed from the schema. +This function is retained for record-keeping purposes only and should not be called. +Original docstrings and comments left intact. + TriggerTypeEnum.BEFORE_UPDATE Trigger event methods for removing files from an entity during update @@ -552,6 +561,11 @@ def delete_image_files(property_key, normalized_type, request_args, user_token, """ +DEPRECATED: This function is no longer used. +The image_files and metadata_files properties have been removed from the schema. +This function is retained for record-keeping purposes only and should not be called. +Original docstrings and comments left intact. + TriggerTypeEnum.BEFORE_UPDATE Trigger event method to ONLY update descriptions of existing files @@ -1854,6 +1868,11 @@ def link_donor_to_lab(property_key, normalized_type, request_args, user_token, e #################################################################################################### """ +DEPRECATED: This function is no longer used. +The image_files and metadata_files properties have been removed from the schema. +This function is retained for record-keeping purposes only and should not be called. +Original docstrings and comments left intact. + TriggerTypeEnum.BEFORE_CREATE and TriggerTypeEnum.BEFORE_UPDATE Trigger event method to commit files saved that were previously uploaded with UploadFileHelper.save_file @@ -1905,6 +1924,11 @@ def commit_metadata_files(property_key, normalized_type, request_args, user_toke """ +DEPRECATED: This function is no longer used. +The image_files and metadata_files properties have been removed from the schema. +This function is retained for record-keeping purposes only and should not be called. +Original docstrings and comments left intact. + TriggerTypeEnum.BEFORE_UPDATE Trigger event methods for removing files from an entity during update @@ -2407,6 +2431,11 @@ def set_activity_creation_action(property_key, normalized_type, request_args, us #################################################################################################### """ +DEPRECATED: This function is no longer used. +The image_files and metadata_files properties have been removed from the schema. +This function is retained for record-keeping purposes only and should not be called. +Original docstrings and comments left intact. + Trigger event method to commit files saved that were previously uploaded with UploadFileHelper.save_file The information, filename and optional description is saved in the field with name specified by `target_property_key` diff --git a/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml b/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml index 9af73a74..5b32af4a 100644 --- a/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml +++ b/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml @@ -270,26 +270,6 @@ x-ref-components: - consortium - public description: "One of the values: public, consortium" - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - image_files_to_add: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' metadata: type: object properties: @@ -466,44 +446,6 @@ x-ref-components: visit: type: string description: "The visit id for the donor/patient when the sample was obtained." - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - image_files_to_add: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - metadata_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - metadata_files_to_add: - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - metadata_files_to_remove: - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' x-ref-Dataset: x-ref-type: object x-ref-properties: diff --git a/src/schema_templating/example-yaml-templates/donor-schema.yaml b/src/schema_templating/example-yaml-templates/donor-schema.yaml index 32f5d07f..9de6225f 100644 --- a/src/schema_templating/example-yaml-templates/donor-schema.yaml +++ b/src/schema_templating/example-yaml-templates/donor-schema.yaml @@ -73,26 +73,6 @@ Donor: - consortium - public description: "One of the values: public, consortium" - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - image_files_to_add: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' metadata: type: object properties: diff --git a/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml b/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml index a777dd78..b67ac462 100644 --- a/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml +++ b/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml @@ -270,26 +270,6 @@ components: - consortium - public description: "One of the values: public, consortium" - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - image_files_to_add: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' metadata: type: object properties: @@ -444,45 +424,6 @@ components: description: "The sample location and orientation in the ancestor organ as specified in the RUI tool. Returned as a json object." visit: type: string - description: "The visit id for the donor/patient when the sample was obtained." - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - image_files_to_add: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - metadata_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - metadata_files_to_add: - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - metadata_files_to_remove: - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' Dataset: type: object properties: diff --git a/src/schema_templating/example-yaml-templates/sample-schema.yaml b/src/schema_templating/example-yaml-templates/sample-schema.yaml index 6daca5eb..8d9553ef 100644 --- a/src/schema_templating/example-yaml-templates/sample-schema.yaml +++ b/src/schema_templating/example-yaml-templates/sample-schema.yaml @@ -109,42 +109,4 @@ Sample: description: "The sample location and orientation in the ancestor organ as specified in the RUI tool. Returned as a json object." visit: type: string - description: "The visit id for the donor/patient when the sample was obtained." - image_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - image_files_to_add: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - image_files_to_remove: - writeOnly: true - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' - metadata_files: - readOnly: true - type: array - items: - $ref: '#/components/schemas/File' - description: "List of uploaded image files and descriptions of the files. Stored in db as a stringfied json array." - metadata_files_to_add: - type: array - items: - type: string - format: file_id - description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}' - metadata_files_to_remove: - type: array - items: - type: string - format: file_id - description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]' \ No newline at end of file + description: "The visit id for the donor/patient when the sample was obtained." \ No newline at end of file