← Prev in month ← Prev in thread
Next in thread → Next in month →

Language Spec Comment: empty command arguments

From
David Kemp <>
Date
2018-11-28T18:45:30+00:00
ID
Thread
Language Spec Comment: empty command arguments
OpenC2 Technical Committee,

OpenC2-Command consists of 4 fields: {action, target, args, and actuator}.  The action and target fields are required, the args and actuator fields are optional.  Because each of the fields in the Args type is also optional, it is possible for a command with
 no command arguments to be serialized with or without an empty args field:

{ "action": "query",

  "target": {"features": []}}

 

Or

 

{ "action": "query",

  "target": {"features": []},

  "args": {}}

 

PROPOSED CHANGE:

In Section 3.3.1.4, add a syntax requirement that Args is Type Map with [1..n] fields, and an equivalent Usage Note that Args must have at least one value.

 

JUSTIFICATION:

Requiring args to be non-empty if present eliminates an unnecessary corner case and follows the “one way of doing things” design principle.
← Prev in month ← Prev in thread
Next in thread → Next in month →