Skip to content

Commit d839b66

Browse files
authored
Merge pull request #108 from ga4gh/defaults
Clarify defaults
2 parents 34d655d + c2ee3f0 commit d839b66

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/seqcols/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,25 @@ Qualifer | Level1? | Level2? | Notes
647647
passthru | as normal | same as level1 | True if the level 2 representation is the same as the level 1 representation.
648648
transient | as normal | not present | True if the level 2 representation is not present.
649649

650+
##### 4.6.1 Default values for attribute qualifiers
650651

652+
These attribute qualifiers default to false when not explicitly specified in the schema. For a given attribute, if not specified,
653+
654+
- `collated`: defaults to `false` (local qualifier)
655+
- `transient`: defaults to `false`
656+
- `passthru`: defaults to `false`
657+
- `required`: defaults to `false` (consistent with JSON Schema conventions)
658+
659+
Similarly, when the global qualifier arrays themselves are not specified in the schema, they default to empty arrays:
660+
- `required`: defaults to `[]` (consistent with JSON Schema conventions)
661+
- `ga4gh.transient`: defaults to `[]`
662+
- `ga4gh.passthru`: defaults to `[]`
663+
664+
This means that an attribute is only considered to have a qualifier set to `true` if it is explicitly:
665+
- Set to `true` for local qualifiers (e.g., `collated: true`)
666+
- Included in the appropriate array for global qualifiers (e.g., listed in `ga4gh.inherent`)
667+
668+
A non-empty `ga4gh.inherent` array MUST be provided, because an empty `inherent` array would result in an undefined level 0 digest algorithm.
651669

652670
#### 4.7 Method of specifying attribute qualifiers
653671

0 commit comments

Comments
 (0)