Comments (6)
The reason is that the content of the title
property (and description
) is not found in the multilang version. Thus the error message
root_title is not on the multilang object at the same level
I don't no why or if this behaviour is wanted, but it has been there before I touched the code...so it seemed to be a feature not a bug ;)
If you use the TD below the validation says valid (added en
tags with corresponding content):
{
"@context":[
"https://www.w3.org/2019/wot/td/v1",
{
"cov":"http://www.example.org/coap-binding#"
},
{
"saref":"https://w3id.org/saref#"
}
],
"securityDefinitions":{
"basic_schema":{
"scheme":"basic",
"descriptions":{
},
"description":"Basic sec schema",
"in":"query",
"name":"querykey"
}
},
"security":[
"basic_schema"
],
"@type":[
"saref:LightSwitch"
],
"titles":{
"de":"Deutscher Titel",
"en": "English title"
},
"title":"English title",
"descriptions":{
"de":"Deutsche Beschreibung",
"en": "English description"
},
"description":"English description",
"properties":{
"echo":{
"observable":false,
"forms":[
{
"op":[
"readproperty"
],
"href":"/echo",
"contentType":"application/json"
}
]
}
}
}
from playground.
The TD spec says:
When title and titles or description and descriptions are present in a TD document, each title and description member SHOULD have a corresponding titles and descriptions member, respectively.
Thus, the current behavior of the playground is correct. @Citrullin sadly your TD was not correct but this is a really detailed case where I am pretty sure anyone in the working group can make. Even I didn't remember this requirement, even though I have created the validation case.
Somewhat related issue here: w3c/wot-thing-description#959
from playground.
Closing since even the error message is accurate, @Citrullin you can reopen it if you need to :)
from playground.
The TD spec says:
When title and titles or description and descriptions are present in a TD document, each title and description member SHOULD have a corresponding titles and descriptions member, respectively.
Thus, the current behavior of the playground is correct. @Citrullin sadly your TD was not correct but this is a really detailed case where I am pretty sure anyone in the working group can make. Even I didn't remember this requirement, even though I have created the validation case.
Somewhat related issue here: w3c/wot-thing-description#959
Okay, I get that. But why do I need to duplicate data? This seems not very intuitive to me. Why not making the titles and descriptions property mandatory and have some kind of default lang in the thing itself?
from playground.
Why not making the titles and descriptions property mandatory and have some kind of default lang in the thing itself?
That is quite interesting and if you need to declare a default language, there is even more redundant information, the TD would have the following @context
{
"@context":[
"https://www.w3.org/2019/wot/td/v1",
{ "@language" : "en" }
],
...
}
In this TD, all the title
and description
should contain english text. I think relying on this mechanism and removing title
would create more effort on TD processors but I personnaly do not care too much about Consumers requiring more resources, the Things should be optimized first I think.
Should this be a question/issue for the TD Task Force? What do you think @sebastiankb :)
from playground.
closing since the linked TD issue should result on something first. Can be reopened if needed
from playground.
Related Issues (20)
- Redesign the filter section for the examples
- Tab deletion handle web-new
- Tree-like view for examples
- Save As not working HOT 2
- Tests for the new web package HOT 1
- Quick Example Access HOT 2
- Understanding how people use the web interface HOT 2
- Detecting protocols for AID generation HOT 1
- Adding RDF representations to console
- Linking Back and Forth between two web interfaces HOT 3
- Change copyright to creation date HOT 4
- Improving the examples pop up HOT 1
- Defaulting to validation tab below when a new td tab/file is chosen HOT 1
- Rethinking the trash icon in tabs below
- [web-new] CSS mapping file HOT 3
- Auto expanding console when clicked if it is minimized HOT 1
- Changing icons to SVG
- Collapse/Open icons are reversed HOT 1
- Netlify Mention
- Changing to td-tools AID HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playground.