Skip to content

Consider 1 item arrays for PipeDelimited and SpaceDelimited as conflicting #13

@charjr

Description

@charjr

Right now the assumption is made that two parameters can be identified by differing styles, thus spaceDelimited and pipeDelimited cannot conflict.

That makes sense mostly:

spaceDelimited: blue%20black%20brown
pipeDelimited: blue|black|brown

But what if they can have one element? Nothing gets delimited.

spaceDelimited: blue
pipeDelimited: blue

In that instance, nothing differs between styles and there is no parameter name to identify them.

Solution:

if both parameters meet the following criteria, then they conflict:

  • schema->canBe(array)
  • style:spaceDelimited or style:pipeDelimited
  • schema does not specify minItems: 2 (or more)
    • this point can only be achieved once the reader looks into minItems
    • this point can only be achieved once the reader looks into minProperties

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