Comments (2)
Just leaving a note here from our earlier discussion...
Yes, good point, I think the W3C version has this. The reason I haven't included it in the Thing Description yet is that I wasn't sure how much of this should be in the Thing Description vs. the Thing API. Whether a property is writeable may depend on who sent the request (based on authentication/authorisation). The read/write permissions could either be enumerated in the Thing Description and the Thing Description may be different depending on who requests it, or a client could test for available methods with an HTTP OPTIONS request on the property URL. I'm not sure what the convention is for enumerating read/write permissions for properties in REST APIs...
You raise the point here that you may want to know whether a property can be written to, regardless of whether the current "user" has permission to set it. Can you think of use cases for needing to know a property can be set even when the current consumer can't set it?
A read/write property of some kind seems like a potentially sensible addition, I just want to make sure it's actually necessary to enumerate in the Thing Description or whether read/write status should be handled in the API/protocol instead.
from api.
I think that this really all boils down to UI. If a property is read-only, then the UI shouldn't be presenting it a potentially modifiable field. Similarly, if a field is write-only, then there is no way to get the current value and display it.
In ZWave, each value (which seems to map to what we're calling a property) has read-only and write-only attributes.
from api.
Related Issues (20)
- Support oneOf for enums
- type vs. mediaType vs. contentType
- Localisation (l10n) HOT 6
- CODE_OF_CONDUCT.md file missing
- [Question] Things Firmware Update HOT 2
- Default on change event for some properties
- Add WebSocket Gateway events
- Define which members are mandatory vs. optional HOT 6
- base member
- Include human-readable label in Property resource HOT 4
- Support "format" member for a property
- Consider removing object wrapper from Property payload HOT 12
- Add "auto" to HeatingCoolingProperty HOT 1
- What is the project's relationship with W3C WoT? HOT 1
- Join "Project Connected Home over IP"? HOT 1
- Allow properties to indicate if they may be logged HOT 1
- Why is Mozilla Web Thing API different from W3C Web of Things? HOT 3
- More descriptive license HOT 3
- @type should be at top level of action HOT 2
- Support for multiple @context (aka support for Linked Data) HOT 4
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 api.