Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Proposal:
      Hide

      I suggest that we change the get_property to be something like

      get_property[ entity_name, path_to_property]

      path_to_property being something like:
      properties.toto.titi
      or
      capabilities.toto.titi
      In case of array in complex types people can write
      properties.toto[6].titi

      the initial keywords MUST be either properties, capabilities or requirements
      note that to make it easier to write we could also accept that properties is an optional keyword:

      if the path_to_property doesn't start with neither properties, capabilities or requirements we assume that get_property reference a property on the node directly and
      get_property["node", "toto.titi"] will be processed as get_property["node", "properties.toto.titi"]

      Show
      I suggest that we change the get_property to be something like get_property[ entity_name, path_to_property] path_to_property being something like: properties.toto.titi or capabilities.toto.titi In case of array in complex types people can write properties.toto [6] .titi the initial keywords MUST be either properties, capabilities or requirements note that to make it easier to write we could also accept that properties is an optional keyword: if the path_to_property doesn't start with neither properties, capabilities or requirements we assume that get_property reference a property on the node directly and get_property ["node", "toto.titi"] will be processed as get_property ["node", "properties.toto.titi"]

      Description

      There is currently a big issue with the syntax of get_property, having an optional parameter as a second parameter with all parameters being of the same type is really bad practice.

      Let's consider a node:

      node:
      properties:
      toto:
      type: my_complex
      capabilities:
      toto:
      properties:
      titi:
      type: string

      Let's say that the my_complex type has a titi field that is a string.

      What do we do when we encounter a get_property that is:

      get_property["node", "toto", "titi"]

      Are we getting the toto's property nested field ? or the titi property of toto capability ?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              luc.boutier Luc Boutier (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: