eclipse-tractusx / sldt-semantic-models

sldt-semantic-models
Creative Commons Attribution 4.0 International
29 stars 44 forks source link

[Model Issue]: Error in json example data for io.catenax.transmission.transmission_pass\1.0.0 #269

Open a-trzewik opened 1 year ago

a-trzewik commented 1 year ago

URL to Model with Issue

Example payload is not valid

https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.transmission.transmission_pass/1.0.0/gen/TransmissionPass.json

according to json schema and definition in Pcf.ttl

https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.transmission.transmission_pass/1.0.0/gen/TransmissionPass-schema.json

https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.pcf/3.0.0/Pcf.ttl

Issue Description

The ruleNames in example payload is string but in ttl and in generated json schema it is array (set)

    "productOrSectorSpecificRules" : [ {
            "operator" : "PEF",
            "ruleNames" : "ABC 2021",
            "otherOperatorName" : "NSF"
          } ]

should be

  "productOrSectorSpecificRules" : [ {
          "operator" : "PEF",
          "ruleNames" : ["ABC 2021"],
          "otherOperatorName" : "NSF"
        } ]

see definition in referenced https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.pcf/3.0.0/Pcf.ttl

  :RuleNamesTrait a bamm-c:Trait;
      bamm:name "RuleNamesTrait";
      bamm:preferredName "Rule Names Trait"@en;
      bamm:description "Trait to ensure non-empty set of rule names."@en;
      bamm-c:baseCharacteristic :RuleNamesCharacteristic;
      bamm-c:constraint :RuleNamesConstraint.
  :RuleNamesCharacteristic a bamm-c:Set;
      bamm:name "RuleNamesCharacteristic";
      bamm:preferredName "Rule Names Characteristic"@en;
      bamm:description "Non-empty set of rules applied by the specified operator. Defined by the WBCSD (World Business Council for Sustainable Development) Pathfinder initiative."@en;
      bamm:see <https://wbcsd.github.io/introduction/>;
      bamm-c:elementCharacteristic :NonEmptyString.
catroest commented 1 year ago

@SMaierTSI @birgitZF Error in PCF model

jacewski-bosch commented 1 year ago

This is caused by a bug in the SAMM SDK, it is already addressed there, as sson as a bugfix SDK is available the generated artifacts will be fixed.

bs-jokri commented 1 year ago

PR #277 solves this issue.

catroest commented 1 year ago

@a-trzewik can this issue be closed, if PR #277 has solved this issue?