Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support local/relative tm:ref references in WoT TM support #1648

Open
thjaeckle opened this issue Jun 5, 2023 · 0 comments
Open

Support local/relative tm:ref references in WoT TM support #1648

thjaeckle opened this issue Jun 5, 2023 · 0 comments
Labels
WoT Web of Things related enhancements

Comments

@thjaeckle
Copy link
Member

The WoT specification defines that when using "tm:ref", it is also possible to reference local properties/actions/events, e.g.:

From the WoT spec example:

{
    "@context": "https://www.w3.org/2022/wot/td/v1.1", 
    "@type": "tm:ThingModel",
    "title": "Multi Sensor",
    "properties": {
        "genericTemperature": {
            "type": "number",
            "unit": "C"
        },
        "innerTemperature": {
            "tm:ref": "#/properties/genericTemperature",
            "title": "The inner temperature",
            "minimum": 10
        },
        "outerTemperature": {
            "tm:ref": "#/properties/genericTemperature",
            "title": "The outer temperature",
            "description": "The outer temperature is measured in Kelvin",
            "unit": "K"
        }
    },
    "tm:optional": [
        "/properties/genericTemperature"
    ]
}

Ditto currently only supports referencing external references, expecting that "tm:ref" always starts with an URI.

Add support for this to be more standard compliant.

@thjaeckle thjaeckle added the WoT Web of Things related enhancements label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WoT Web of Things related enhancements
Projects
None yet
Development

No branches or pull requests

1 participant