eclipse-thingweb / td-tools

Utility libraries for W3C Thing Descriptions and Thing Models
https://thingweb.io
Other
4 stars 3 forks source link

[AID] SecurityConfiguration value has no idShort #51

Closed egekorkan closed 1 month ago

egekorkan commented 1 month ago

Using the following TD:

{
    "@context": [
        "https://www.w3.org/2022/wot/td/v1.1"
    ],
    "title": "test",
    "securityDefinitions": {
        "nosec_sc": {
            "scheme": "nosec"
        }
    },
    "base": "http://example.com",
    "security": [
        "nosec_sc"
    ],
    "properties": {
        "frequency": {
            "type": "number",
            "forms": [
                {
                    "href": "/test",
                    "contentType": "application/json"
                }

            ]
        }
    }
}

The generated AID, just below line 107 in Playground, there is no idShort generated inside that value. So there should be a value at submodelElements[0].value[1].value[1].value[0]

egekorkan commented 1 month ago

@kaz040 will check this since idShort should not be mandatory in this case.

Kaz040 commented 1 month ago

@egekorkan , I just checked, for now I think everything is ok.

  1. According to the specification (p. 194), The idShort of elements in a submodelElementList should not be specified

image

  1. literally, the element in the security submdelElementList is a referenceElement. so the element that it is referencing (from image below) has IdShort and other informations....
Security
danielpeintner commented 1 month ago

@egekorkan @Kaz040 your findings show that we can close the issue, right?

egekorkan commented 1 month ago

Indeed, closing as no fix is needed

egekorkan commented 1 month ago

Apparently the problem might be slightly different. Reopening

wiresio commented 1 month ago

@Kaz040 - thanks for clarifying! As an additional question I would like to ask whether the "ReferenceElement" list is the correct way for the security element. If yes, then I have an issue in my own implementation at https://github.com/wiresio/domus-tdd-api-plugin-aid :-) and this one can really be closed.

Kaz040 commented 1 month ago

Yes, ReferenceElement is correct. The Security SML can contain list of reference(s) (referenceElement(s)) that reference securities defined in securityDefinition SMC.

wiresio commented 1 month ago

Thanks, let's close here. Will try to fix this one: https://github.com/wiresio/domus-tdd-api-plugin-aid/issues/2#issuecomment-2250157287