Skip to content

"device" should not be mandatory for subscription APIs #241

@eric-murray

Description

@eric-murray

Problem description
The SubscriptionDetail schema used in the subscription APIs currently makes device a mandatory parameter:

    SubscriptionDetail:
      description: The detail of the requested event subscription
      type: object
      properties:
        device:
          $ref: '#/components/schemas/Device'
      required:
        - device

But if the subscription is created using a 3-legged token, then no device parameter should be provided.

Expected behaviour
device should be an optional parameter in SubscriptionDetail

    SubscriptionDetail:
      description: The detail of the requested event subscription
      type: object
      properties:
        device:
          $ref: '#/components/schemas/Device'

Alternative solution
subscriptionDetail itself could also be made optional in the Config schema. But this might cause issues if additional parameters were later added to SubscriptionDetail

Additional context

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