Skip to content

Clarify how to combine boolean and numeric "items" annotations #904

Closed
@ssilverman

Description

@ssilverman

I'm implementing the "items" annotations and had some questions:

  1. Is it correct to assume that when combining Boolean and numeric "items" annotations, we first
    convert a "true" Boolean annotation value to the size of the array minus one? A "false" annotation value I think would convert to -1.
  2. Why is the annotation the max. index as opposed to the number of items the schema was applied to? A count might be much clearer and avoid the weird potential "-1" interpretation above, for example, when an array-style "items" is applied to an empty array, or an empty array "items" is applied to any array.
  3. Am I correct in reading the annotation value as "max. index of application regardless of success" and not "max. index of successful validation"?

See: 9.3.1.1. items

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions