device-automation-bus/dab-specification-2.0

Specification mismatch in launch application api

Closed this issue · 2 comments

Hi team,
Regarding launch and launch-with-content api, previously the parameter field was mentioned as optional, as its recently updated as not optional, the sample response needs to be updated for launch and launch-with-content.
Request Topic
dab//applications/launch

Request Format
interface LaunchApplicationRequest extends DabRequest {
   appId: string;
   parameters?: string [];
}

parameters?: string []; should be modified as not optional

dab//applications/launch-with-content

Request format
interface LaunchApplicationWithContentRequest extends DabRequest {
   appId: string;
   contentId: string;
   parameters?: string [];
}

also parameter field must be added in sample request for launch-with-content

Sample Request
{
   "appId": "YouTube",
   "contentId": "XqZsoesa55w"
}

These changes are needed as parameter field is mentioned not optional right?

Hi @liginPunoose, the previous wording of "optional" in the specification was misleading some DAB spec readers to believe the feature of passing parameters to applications itself was optional, hence we removed that wording.

The parameters argument is in fact still optional (it may or may not be present) in the request. This is represented by the question mark ? in the request interface -- parameters? instead of parameters.

This formatting scheme is described in the message payloads section of the spec earlier -- https://github.com/device-automation-bus/dab-specification-2.0/blob/main/DAB.md#message-payloads

Therefore, the sample request is still adhering to per spec. DAB implementations can assume there are no parameters to be passed to the application when parameters does not exist.

Hi @GaganBhat

Thanks for clarifying.