GithubHelp home page GithubHelp logo

Comments (2)

benfrancis avatar benfrancis commented on August 19, 2024

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.

dhylands avatar dhylands commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.