SpaceApi-archive / SpaceApi

Android app and widget showing hackerspace status
18 stars 10 forks source link

keymaster should always be empty or array #7

Closed sonologic closed 11 years ago

sonologic commented 12 years ago

(from my inbox from Lennart)

Also the key "keymaster" should always be an array or empty. Even for one keymaster. Otherwise everything but object introspection will fail.

slopjong commented 12 years ago

It's how it's implemented in OpenSpaceLint because validating something against two types isn't possible with the json schema that I use.

The formal schema can be found here: http://openspace.slopjong.de/c/js/apienv.js

Some weeks ago I started with the new specification version which removes most design errors. As soon as I've got my rfc finished I'll post it here. Then we can improve it further.

brimstone commented 12 years ago

In lhw's patch, there's mention of "empty array." Why would this be an empty array? If it's empty, shouldn't it not be there since it's optional?

slopjong commented 12 years ago

I share your opinion. Something optional means "present" or "not present".