ditto icon indicating copy to clipboard operation
ditto copied to clipboard

UI: Provide message templates based on WoT model "actions"

Open thjaeckle opened this issue 1 year ago • 0 comments

When fully embracing using WoT ThingModels to define the capabilities of things, it would be really powerful if the Ditto UI would not only show the "WoT TD" in a tab, but also use the TD to present the user the available "actions" to invoke on a thing and on a feature level.

The WoT TD "action" should define all we need:

  • action name is the "message subject"
  • from the "title" and "description" the Ditto UI could show a small "help" about the action
  • "input" is the request payload and includes a JsonSchema which the Ditto UI could
    • provide a "JSON skeleton" for with default values to quickly see what fields are there and which data type they have
    • validate input based on the schema

This would be an example "action" containing "title", "description" and "input" with a very simple payload (an "integer"): https://github.com/eclipse-ditto/ditto-examples/blob/82451ac0b510e34bb5409cdf9128e7d315965931/wot/models/switchable-1.0.0.tm.jsonld#L30-L38

thjaeckle avatar Nov 21 '23 20:11 thjaeckle