admin-shell-io / aas-specs

Repository of the Asset Administration Shell Specification IDTA-01001 - Metamodel
https://industrialdigitaltwin.org/en/content-hub/aasspecifications
Creative Commons Attribution 4.0 International
45 stars 26 forks source link

What is the Value-Only of a List of Operations or Capabilities #402

Open BirgitBoss opened 2 months ago

BirgitBoss commented 2 months ago

Is your feature request related to a problem? Please describe. What is the Value-Only of a List of OPerations or Capabilities

Describe the solution you'd like If the submodel element list is part the Value-Only serialization of its parent element (e.g. in the context of a submodel or submodel element collection) and the list consists of submodel elements of type Operation or Capability, i.e. SubmodelElementList/typeValueListElement equal to Operation or Capability, the complete list is ignored.

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"
}

Or

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

See also https://github.com/admin-shell-io/aas-specs-api/issues/270

The current schema looks like this (extract):

    "SubmodelElementListValue": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/SubmodelElementValue"
      }
    },

    "SubmodelElementValue": {
      "oneOf": [
        {
          "$ref": "#/definitions/BasicEventElementValue"
        },
        {
          "$ref": "#/definitions/RangeValue"
        },
        {
          "$ref": "#/definitions/MultiLanguagePropertyValue"
        },
        {
          "$ref": "#/definitions/FileBlobValue"
        },
        {
          "$ref": "#/definitions/ReferenceElementValue"
        },
        {
          "$ref": "#/definitions/RelationshipElementValue"
        },
        {
          "$ref": "#/definitions/AnnotatedRelationshipElementValue"
        },
        {
          "$ref": "#/definitions/EntityValue"
        },
        {
          "$ref": "#/definitions/PropertyValue"
        },
        {
          "$ref": "#/definitions/SubmodelElementListValue"
        }
      ]
    },

So recommendation is to stay with

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