Skip to content

Commit

Permalink
Clarify default for 'required', add explicit example
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuchenb committed May 15, 2024
1 parent e11614d commit 4704c1f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AddContentPropertyInstruction(BaseSettings):
True,
description=(
"Indicates whether the newly added property shall be added to the"
+ " 'required' list of the corresponding object."
+ " 'required' list of the corresponding object. Defaults to 'True'."
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ add_content_properties:
content_schema:
type: "boolean"
value: false
# required is not set, so it defaults to false
- class_name: File
target_content:
object_path: ""
property_name: "content_description"
content_schema:
type: "string"
required: true
value: ""
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ resources:
size: 12321
additional_information: # <-
compression: false
content_description: "" # <-
file_b:
content:
filename: file_b.fastq
Expand All @@ -17,6 +18,7 @@ resources:
size: 12314
additional_information: # <-
compression: false
content_description: "" # <-
file_c:
content:
filename: file_c.fastq
Expand All @@ -25,6 +27,7 @@ resources:
size: 12123
additional_information: # <-
compression: false
content_description: "" # <-
Dataset:
dataset_1:
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ classes:
"required": [
"compression"
],
},
"content_description": {
"type" : "string"
}
},
"required": [
"filename",
"format",
"checksum",
"size",
"content_description",
],
"type": "object"
}
Expand Down

0 comments on commit 4704c1f

Please sign in to comment.