Skip to content

Commit 06819e3

Browse files
committed
validation
1 parent b24ce32 commit 06819e3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/Section 5 -- Validation.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -583,20 +583,20 @@ fragment conflictingDifferingResponses on Pet {
583583

584584
**Formal Specification**
585585

586-
* For each {field} in the document
587-
* Let {fieldDef} be the definition of {field}
588-
* Let {fieldType} be the type of {fieldDef}
589-
* Let {requiredStatus} be the required status of {field}
590-
* Let {designatorDepth} be the number of square bracket pairs in {requiredStatus}
591-
* Let {typeDepth} be the number of list dimensions in {fieldType}
592-
* If {typeDepth} equals {designatorDepth} return true
593-
* Otherwise return false
586+
- For each {field} in the document
587+
- Let {fieldDef} be the definition of {field}
588+
- Let {fieldType} be the type of {fieldDef}
589+
- Let {requiredStatus} be the required status of {field}
590+
- Let {designatorDepth} be the number of square bracket pairs in {requiredStatus}
591+
- Let {typeDepth} be the number of list dimensions in {fieldType}
592+
- If {typeDepth} equals {designatorDepth} or {designatorDepth} equals 0 return true
593+
- Otherwise return false
594594

595595
**Explanatory Text**
596596

597597
List fields can be marked with nullability designators that look like `[?]!` to indicate the
598598
nullability of the list's elements and the nullability of the list itself. For multi-dimensional
599-
lists, the designator would look something like `[[[!]?]]!`. The number of dimensions of the
599+
lists, the designator would look something like `[[[!]?]]!`. If the designator is not a simple `!` or `?`, then the number of dimensions of the
600600
designator are required to match the number of dimensions of the field's type. If the two do not
601601
match then a validation error is thrown.
602602

0 commit comments

Comments
 (0)