admin-shell-io/aas-specs-api

Clarification of Value-Only for Operation and Capability

BirgitBoss opened this issue · 4 comments

What?

/submodels/{submodelIdentifier}/submodel-elements/{idShortPath}/$value:

For Operation and Capability there is no Value-Only serialization. However the idShortPath may point to a SubmodelElementList containing Operations or to a BasicEvent itself etc.

So in this case a error is returned? Or an empty object or list, resp.?

In the case a collection contains

myCollection: 
{ 
   "prop1": string, 
   "capability1": Capability,
   "operation1": Operation,
    "list": SubmodelElementList(typeofElements:Operation) 
}

then Value-Only of the collection is either

{
 "prop1": "value of prop1"
}

ignoring "capability1" and "operation1" and "list" or an error message is returned: "no Value-Only serialization possible". However, the latter would mean that there is no Value-Only serialization of a submodel containing Operations, Events or Capabilities.

Or (see admin-shell-io/aas-specs#402)

{
 "prop1": "value of prop1"
 "list": []
}

ADDED: the idShortPath can direct link to an BasicEventElement or a Capability or an Operation: in this case it should be sufficient to throw an error.

We discussed the topic today in the task force call. It's clear that we have a critical gap here, however, we don't see that we will have a fix already for V3.0.2. Therefore, I am changing the milestone tag.

I think there are in total these four options:

  1. throw an error
  2. serialise these SMEs in a certain way, e.g., as an empty element
  3. state that for these SMEs their normal serialisation shall be used
  4. add specific ValueOnly elements for them.

As discussed in today's AAS Workstream:

  • Define the error message/code for a GET .../submodel-elements/idShortOfaOperation/$value

Additionally define what happens for

  • Define the error message/code for a GET .../submodel-elements/idShortOfaListOfOperationsOrCapabilities/$value