Skip to content

Review design of POST /call-forwardings response body and consider changing #233

Description

@eric-murray

Problem description
The response body is defined as an array which can contain between 1 and 5 entries from the set "inactive", "unconditional", "conditional_busy", "conditional_not_reachable" and "conditional_no_answer".

The issues with this design are:

  • The possible values are not independent. If "inactive" is present, no other value should be present.
  • Given that "inactive" is mutually exclusive with the other values, it is not possible to have 5 valid items in the response array without duplicated values

Expected behaviour
Consider redesigning the response body as follows:

  • Remove "inactive" as a valid response value, instead representing this by the empty set [] (i.e. no call-forwardings active)
  • Set minItems to 0 and maxItems to 4
  • Enforce that array values cannot be duplicated by specifying uniqueItems: true

Alternative solution
None proposed

Additional context
None

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