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

Is the @type ThingID defined anywhere? #550

Open
benfrancis opened this issue Feb 11, 2025 · 1 comment
Open

Is the @type ThingID defined anywhere? #550

benfrancis opened this issue Feb 11, 2025 · 1 comment

Comments

@benfrancis
Copy link
Member

I note that in the (normative) Thing Model used in the API specification for the Directory Service API uses semantic annotations to explain to a Consumer that certain URI variables are Thing IDs. E.g.

"retrieveThing": {
            "description": "Retrieve a Thing Description",
            "uriVariables": {
                "id": {
                    "@type": "ThingID",
                    "title": "Thing Description ID",
                    "type": "string",
                    "format": "iri-reference"
                }
            },
            "output": {
                "description": "The schema is implied by the content type",
                "type": "object"
            },
            "safe": true,
            "idempotent": true,
            "forms": [
                {
                    "href": "/things/{id}",
                    "htv:methodName": "GET",
                    "response": {
                        "description": "Success response",
                        "htv:statusCodeValue": 200,
                        "contentType": "application/td+json"
                    },
                    "additionalResponses": [
                        {
                            "description": "TD with the given id not found",
                            "contentType": "application/problem+json",
                            "htv:statusCodeValue": 404
                        }
                    ]
                }
            ]
        },

I really like this approach of helping a Consumer to understand dynamic resources, but I can't find the term "ThingID" specified anywhere. In particular, I can't see it specified in the discovery context linked to at the top of the Thing Model (https://www.w3.org/2022/wot/discovery).

Have I missed something, or is this an oversight?

@JKRhb
Copy link
Member

JKRhb commented Feb 13, 2025

Have I missed something, or is this an oversight?

Partly because the term expands to https://www.w3.org/2019/wot/td#ThingID when using a JSON-LD processor while not being present in the TD ontology, this definitely seems like an oversight to me :/ Because of the IRI pointing to the TD ontology, I am wondering, though, whether this term should be defined there or rather in the discovery ontology.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants