Skip to content

Not allowed to search with only profiles or only travellingAssets #39

@jorgenosberg

Description

@jorgenosberg

The current spec marks the travellers array as required in search-offers, despite travellers and profiles being equally valid types of travellers for a search. It should thus be possible to execute a search with only travellers, only profiles, or only travellingAssets, a combination of these – but never neither. At least one array needs to be present, and, if present, it needs to be non-empty.

A way to solve this in the spec would be to mark the arrays as required with anyOf:

anyOf:
  - required: [ travellers ]
  - required: [ profiles ]
  - required: [ travellingAssets ]

To enforce non-empty arrays the other arrays should then get the same treatment as travellers:

travellers:
  type: array
  minItems: 1
  maxItems: 10
  items:
    $ref: "#/components/schemas/individualTraveller"
    
profiles:
  type: array
  minItems: 1
  maxItems: 10
  items:
    $ref: "#/components/schemas/userProfile"

travellingAssets:
  type: array
  minItems: 1
  maxItems: 10
  items:
    $ref: "#/components/schemas/travellingAsset"

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-bugErrors, contradictions, or missing definitions in the standard.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions