diff --git a/schemas.go b/schemas.go index ba2ce70..f20ccf0 100644 --- a/schemas.go +++ b/schemas.go @@ -1,7 +1,7 @@ package spaceapivalidator // CommitHash contains the hash of the commit the Validate function validates against -var CommitHash = "19afba712e0b9e9ab8138d3b1fd55d3523898872" +var CommitHash = "9914a1eb86fdc1067a0cf7627a84b03dfc13666c" // SpaceAPISchemas load from the repository as a map var SpaceAPISchemas = map[string]string{ @@ -1398,7 +1398,11 @@ var SpaceAPISchemas = map[string]string{ }, "timezone": { "description": "The timezone the space is located in. It should be formatted according to the TZ database location names.", - "type": "string" + "type": "string", + "examples": [ + "Europe/Kyiv", + "Antarctica/Palmer" + ] } }, "required": [ @@ -1448,7 +1452,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "trigger_person": { - "description": "The person who lastly changed the state e.g. opened or closed the space.", + "description": "The person who lastly changed the state e.g. opened or closed the space", "type": "string" }, "message": { @@ -1506,16 +1510,23 @@ var SpaceAPISchemas = map[string]string{ } }, "contact": { - "description": "Contact information about your space.", + "description": "Contact information about your space", "type": "object", "properties": { "phone": { - "description": "Phone number, including country code with a leading plus sign. Example: +1 800 555 4567", - "type": "string" + "description": "Phone number, including country code with a leading plus sign", + "type": "string", + "examples": [ + "+1 800 555 4567", + "+41 79 123 45 67" + ] }, "sip": { - "description": "URI for Voice-over-IP via SIP. Example: sip:yourspace@sip.example.org", - "type": "string" + "description": "URI for Voice-over-IP via SIP", + "type": "string", + "examples": [ + "sip:yourspace@sip.example.org" + ] }, "keymasters": { "description": "Persons who carry a key and are able to open the space upon request. One of the fields irc_nick, phone, email or twitter must be specified.", @@ -1533,46 +1544,68 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "phone": { - "description": "Example: ['+1 800 555 4567','+1 800 555 4544']", - "type": "string" + "description": "Phone number, including country code with a leading plus sign", + "type": "string", + "examples": [ + "+1 800 555 4567", + "+41 79 123 45 67" + ] }, "email": { - "description": "Email address which can be base64 encoded.", + "description": "Email address which can be base64 encoded", "type": "string" }, "twitter": { - "description": "Twitter username with leading @.", - "type": "string" + "description": "Twitter username with leading @", + "type": "string", + "examples": [ + "@space_api" + ] }, "xmpp": { "description": "XMPP (Jabber) ID", "type": "string" }, "mastodon": { - "description": "Mastodon username. Example: @ordnung@chaos.social", - "type": "string" + "description": "Mastodon username", + "type": "string", + "examples": [ + "@ordnung@chaos.social" + ] }, "matrix": { - "description": "Matrix username. Example: @user:example.org", - "type": "string" + "description": "Matrix username (including domain)", + "type": "string", + "examples": [ + "@user:example.org" + ] } } } }, "irc": { - "description": "URL of the IRC channel, in the form irc://example.org/#channelname", - "type": "string" + "description": "URL of the IRC channel", + "type": "string", + "examples": [ + "irc://example.org/#channelname" + ] }, "twitter": { - "description": "Twitter handle, with leading @", - "type": "string" + "description": "Twitter username with leading @", + "type": "string", + "examples": [ + "@space_api" + ] }, "mastodon": { - "description": "Mastodon username: Example: @ordnung@chaos.social.", - "type": "string" + "description": "Mastodon username", + "type": "string", + "examples": [ + "@ordnung@chaos.social" + ] }, "facebook": { - "description": "Facebook account URL.", + "description": "Facebook account URL", "type": "string" }, "identica": { @@ -1580,7 +1613,7 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "foursquare": { - "description": "Foursquare ID, in the form 4d8a9114d85f3704eab301dc.", + "description": "Foursquare ID, in the form 4d8a9114d85f3704eab301dc", "type": "string" }, "email": { @@ -1600,16 +1633,26 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "gopher": { - "description": "A URL to find information about the Space in the Gopherspace. Example: gopher://gopher.binary-kitchen.de", - "type": "string" + "description": "A URL to find information about the Space in the Gopherspace", + "type": "string", + "examples": [ + "gopher://gopher.binary-kitchen.de" + ] }, "matrix": { - "description": "Matrix channel/community for the Hackerspace. Example: #spaceroom:example.org or +spacecommunity:example.org", - "type": "string" + "description": "Matrix channel/community for the Hackerspace", + "type": "string", + "examples": [ + "#spaceroom:example.org", + "+spacecommunity:example.org" + ] }, "mumble": { - "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL . Example: mumble://mumble.example.org/spaceroom?version=1.2.0", - "type": "string" + "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL", + "type": "string", + "examples": [ + "mumble://mumble.example.org/spaceroom?version=1.2.0" + ] } } }, @@ -1628,7 +1671,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value.", + "description": "The unit of the sensor value", "type": "string", "enum": [ "°C", @@ -1642,15 +1685,21 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Ceiling", + "Room 1" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1662,7 +1711,7 @@ var SpaceAPISchemas = map[string]string{ } }, "door_locked": { - "description": "Sensor type to indicate if a certain door is locked.", + "description": "Sensor type to indicate if a certain door is locked", "type": "array", "items": { "type": "object", @@ -1672,15 +1721,20 @@ var SpaceAPISchemas = map[string]string{ "type": "boolean" }, "location": { - "description": "The location of your sensor such as front door, chill room or lab.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Front door", + "Chill room", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1709,15 +1763,20 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1743,7 +1802,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -1762,15 +1821,20 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1791,7 +1855,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -1810,15 +1874,20 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1839,7 +1908,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -1858,15 +1927,20 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1887,7 +1961,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -1906,15 +1980,20 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1944,15 +2023,20 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -1974,7 +2058,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit, either btl for bottles or crt for crates.", + "description": "The unit, either btl for bottles or crt for crates", "type": "string", "enum": [ "btl", @@ -1982,15 +2066,21 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Room 1 or Room 2 or Room 3, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Entrance", + "Room 1", + "Fridge 3", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2001,7 +2091,7 @@ var SpaceAPISchemas = map[string]string{ } }, "power_consumption": { - "description": "The power consumption of a specific device or of your whole space.", + "description": "The power consumption of a specific device or of your whole space", "type": "array", "items": { "type": "object", @@ -2020,15 +2110,19 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Room 1", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2040,7 +2134,7 @@ var SpaceAPISchemas = map[string]string{ } }, "wind": { - "description": "Your wind sensor.", + "description": "Your wind sensor", "type": "array", "items": { "type": "object", @@ -2096,7 +2190,7 @@ var SpaceAPISchemas = map[string]string{ ] }, "direction": { - "description": "The wind direction in degrees.", + "description": "The wind direction in degrees", "type": "object", "properties": { "value": { @@ -2117,7 +2211,7 @@ var SpaceAPISchemas = map[string]string{ ] }, "elevation": { - "description": "Height above mean sea level.", + "description": "Height above mean sea level", "type": "object", "properties": { "value": { @@ -2146,15 +2240,19 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Roof", + "Entrance" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2165,7 +2263,7 @@ var SpaceAPISchemas = map[string]string{ } }, "network_connections": { - "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", + "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", "type": "array", "items": { "type": "object", @@ -2204,15 +2302,19 @@ var SpaceAPISchemas = map[string]string{ } }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Lab", + "Room 1" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2244,7 +2346,7 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2273,7 +2375,7 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2309,7 +2411,7 @@ var SpaceAPISchemas = map[string]string{ "minItems": 1 }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" } }, @@ -2392,8 +2494,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -2409,8 +2516,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -2426,8 +2538,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -2443,8 +2560,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -2471,15 +2593,15 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "name": { - "description": "The link name.", + "description": "The link name", "type": "string" }, "description": { - "description": "An extra field for a more detailed description of the link.", + "description": "An extra field for a more detailed description of the link", "type": "string" }, "url": { - "description": "The URL.", + "description": "The URL", "type": "string" } }, @@ -2496,8 +2618,12 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "name": { - "description": "The name of the membership plan. For example Student Membership, Normal Membership etc.", - "type": "string" + "description": "The name of the membership plan", + "type": "string", + "examples": [ + "Student Membership", + "Normal Membership" + ] }, "value": { "description": "How much does this plan cost?", @@ -2505,7 +2631,12 @@ var SpaceAPISchemas = map[string]string{ }, "currency": { "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", - "type": "string" + "type": "string", + "examples": [ + "EUR", + "USD", + "CHF" + ] }, "billing_interval": { "description": "How often is the membership billed? If you select other, please specify in the description what your billing interval is.", @@ -2520,7 +2651,7 @@ var SpaceAPISchemas = map[string]string{ ] }, "description": { - "description": "A free form string.", + "description": "A free form string", "type": "string" } }, @@ -2544,9 +2675,9 @@ var SpaceAPISchemas = map[string]string{ } `, "15": `{ - "$id": "https://schema.spaceapi.io/15-draft.json", + "$id": "https://schema.spaceapi.io/15.json", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "SpaceAPI v15 (Draft)", + "description": "SpaceAPI v15", "type": "object", "properties": { "api_compatibility": { @@ -2572,7 +2703,7 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "location": { - "description": "Position data such as a postal address or geographic coordinates", + "description": "Position data such as a postal address or geographic coordinates. May be omitted for spaces without a fixed physical location.", "type": "object", "properties": { "address": { @@ -2589,13 +2720,77 @@ var SpaceAPISchemas = map[string]string{ }, "timezone": { "description": "The timezone the space is located in. It should be formatted according to the TZ database location names.", - "type": "string" + "type": "string", + "examples": [ + "Europe/Kyiv", + "Antarctica/Palmer" + ] + }, + "country_code": { + "description": "Country code in ISO 3166 alpha-2 format", + "type": "string", + "examples": [ + "CH", + "DE", + "UA" + ] + }, + "hint": { + "description": "Information that can be used to describe how to access your space, if it is not trivial to find when standing at the address", + "type": "string", + "examples": [ + "Ring the doorbell marked with HACKSPACE", + "Knock three times, say Shibboleet and follow the white rabbit" + ] + }, + "areas": { + "description": "A list of areas in your space. Must include at least 1 area if defined.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of this area", + "examples": [ + "Hackerspace", + "Kitchen", + "Workshop" + ] + }, + "description": { + "type": "string", + "description": "A description of this area", + "examples": [ + "Our hackerspace area", + "Woodworking machines and power tools" + ] + }, + "square_meters": { + "type": "number", + "description": "The size of this area in square meters", + "examples": [ + 23.23, + 42 + ] + } + }, + "required": [ + "square_meters" + ] + }, + "minItems": 1 } }, - "required": [ - "lat", - "lon" - ] + "minProperties": 1, + "dependentRequired": { + "lat": [ + "lon" + ], + "lon": [ + "lat" + ] + } }, "spacefed": { "description": "A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that visiting hackers can use the space WiFi with their home space credentials.", @@ -2632,7 +2827,7 @@ var SpaceAPISchemas = map[string]string{ "type": "boolean" }, "lastchange": { - "description": "The Unix timestamp when the space status changed most recently", + "description": "The Unix timestamp (in seconds) when the space status changed most recently", "type": "number" }, "trigger_person": { @@ -2683,7 +2878,7 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "timestamp": { - "description": "Unix timestamp when the event occurred", + "description": "The Unix timestamp (in seconds) when the event occurred.", "type": "number" }, "extra": { @@ -2698,12 +2893,19 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "phone": { - "description": "Phone number, including country code with a leading plus sign. Example: +1 800 555 4567", - "type": "string" + "description": "Phone number, including country code with a leading plus sign", + "type": "string", + "examples": [ + "+1 800 555 4567", + "+41 79 123 45 67" + ] }, "sip": { - "description": "URI for Voice-over-IP via SIP. Example: sip:yourspace@sip.example.org", - "type": "string" + "description": "URI for Voice-over-IP via SIP", + "type": "string", + "examples": [ + "sip:yourspace@sip.example.org" + ] }, "keymasters": { "description": "Persons who carry a key and are able to open the space upon request. One of the fields irc_nick, phone, email or twitter must be specified.", @@ -2721,43 +2923,65 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "phone": { - "description": "Example: ['+1 800 555 4567','+1 800 555 4544']", - "type": "string" + "description": "Phone number, including country code with a leading plus sign", + "type": "string", + "examples": [ + "+1 800 555 4567", + "+41 79 123 45 67" + ] }, "email": { "description": "Email address which can be base64 encoded.", "type": "string" }, "twitter": { - "description": "Twitter username with leading @.", - "type": "string" + "description": "Twitter username with leading @", + "type": "string", + "examples": [ + "@space_api" + ] }, "xmpp": { "description": "XMPP (Jabber) ID", "type": "string" }, "mastodon": { - "description": "Mastodon username. Example: @ordnung@chaos.social", - "type": "string" + "description": "Mastodon username", + "type": "string", + "examples": [ + "@ordnung@chaos.social" + ] }, "matrix": { - "description": "Matrix username. Example: @user:example.org", - "type": "string" + "description": "Matrix username (including domain)", + "type": "string", + "examples": [ + "@user:example.org" + ] } } } }, "irc": { - "description": "URL of the IRC channel, in the form irc://example.org/#channelname", - "type": "string" + "description": "URL of the IRC channel", + "type": "string", + "examples": [ + "irc://example.org/#channelname" + ] }, "twitter": { - "description": "Twitter handle, with leading @", - "type": "string" + "description": "Twitter username with leading @", + "type": "string", + "examples": [ + "@space_api" + ] }, "mastodon": { - "description": "Mastodon username: Example: @ordnung@chaos.social.", - "type": "string" + "description": "Mastodon username", + "type": "string", + "examples": [ + "@ordnung@chaos.social" + ] }, "facebook": { "description": "Facebook account URL.", @@ -2788,16 +3012,26 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "gopher": { - "description": "A URL to find information about the Space in the Gopherspace. Example: gopher://gopher.binary-kitchen.de", - "type": "string" + "description": "A URL to find information about the Space in the Gopherspace", + "type": "string", + "examples": [ + "gopher://gopher.binary-kitchen.de" + ] }, "matrix": { - "description": "Matrix channel/community for the Hackerspace. Example: #spaceroom:example.org or +spacecommunity:example.org", - "type": "string" + "description": "Matrix channel/community for the Hackerspace", + "type": "string", + "examples": [ + "#spaceroom:example.org", + "+spacecommunity:example.org" + ] }, "mumble": { - "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL . Example: mumble://mumble.example.org/spaceroom?version=1.2.0", - "type": "string" + "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL", + "type": "string", + "examples": [ + "mumble://mumble.example.org/spaceroom?version=1.2.0" + ] } } }, @@ -2830,16 +3064,26 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Ceiling", + "Room 1" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -2849,27 +3093,1600 @@ var SpaceAPISchemas = map[string]string{ ] } }, - "door_locked": { - "description": "Sensor type to indicate if a certain door is locked.", + "carbondioxide": { + "description": "CO2 sensor", "type": "array", "items": { "type": "object", "properties": { "value": { "description": "The sensor value", - "type": "boolean" + "type": "number" + }, + "unit": { + "description": "The unit of the sensor value.", + "type": "string", + "enum": [ + "ppm", + "vol%" + ] }, "location": { - "description": "The location of your sensor such as front door, chill room or lab.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Ceiling", + "Room 1" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "door_locked": { + "description": "Sensor type to indicate if a certain door is locked.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "boolean" + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Front door", + "Chill room", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "location" + ] + } + }, + "barometer": { + "description": "Barometer sensor", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The unit of pressure used by your sensor", + "type": "string", + "enum": [ + "hPa" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "radiation": { + "description": "Compound radiation sensor. Check this resource.", + "type": "object", + "properties": { + "alpha": { + "description": "An alpha sensor", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", + "type": "number" + }, + "unit": { + "description": "Choose the appropriate unit for your radiation sensor instance", + "type": "string", + "enum": [ + "cpm", + "r/h", + "µSv/h", + "mSv/a", + "µSv/a" + ] + }, + "dead_time": { + "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", + "type": "number" + }, + "conversion_factor": { + "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", + "type": "number" + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "beta": { + "description": "A beta sensor", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", + "type": "number" + }, + "unit": { + "description": "Choose the appropriate unit for your radiation sensor instance", + "type": "string", + "enum": [ + "cpm", + "r/h", + "µSv/h", + "mSv/a", + "µSv/a" + ] + }, + "dead_time": { + "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", + "type": "number" + }, + "conversion_factor": { + "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", + "type": "number" + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "gamma": { + "description": "A gamma sensor", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", + "type": "number" + }, + "unit": { + "description": "Choose the appropriate unit for your radiation sensor instance", + "type": "string", + "enum": [ + "cpm", + "r/h", + "µSv/h", + "mSv/a", + "µSv/a" + ] + }, + "dead_time": { + "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", + "type": "number" + }, + "conversion_factor": { + "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", + "type": "number" + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "beta_gamma": { + "description": "A sensor which cannot filter beta and gamma radiation separately.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", + "type": "number" + }, + "unit": { + "description": "Choose the appropriate unit for your radiation sensor instance", + "type": "string", + "enum": [ + "cpm", + "r/h", + "µSv/h", + "mSv/a", + "µSv/a" + ] + }, + "dead_time": { + "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", + "type": "number" + }, + "conversion_factor": { + "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", + "type": "number" + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit" + ] + } + } + } + }, + "humidity": { + "description": "Humidity sensor", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The humidity unit", + "type": "string", + "enum": [ + "%" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "beverage_supply": { + "description": "How much Mate and beer is in your fridge?", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The unit, either btl for bottles or crt for crates", + "type": "string", + "enum": [ + "btl", + "crt" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Entrance", + "Room 1", + "Fridge 3", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "power_consumption": { + "description": "The power consumption of a specific device or of your whole space", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The power unit", + "type": "string", + "enum": [ + "W", + "VA" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Room 1", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "power_generation": { + "description": "The power generation of a specific device or of your whole space", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The unit of the sensor value.", + "type": "string", + "enum": [ + "W", + "VA" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Room 1", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "wind": { + "description": "Your wind sensor", + "type": "array", + "items": { + "type": "object", + "properties": { + "properties": { + "description": "", + "type": "object", + "properties": { + "speed": { + "description": "", + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The wind speed unit", + "type": "string", + "enum": [ + "m/s", + "km/h", + "kn" + ] + } + }, + "required": [ + "value", + "unit" + ] + }, + "gust": { + "description": "", + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The gust speed unit", + "type": "string", + "enum": [ + "m/s", + "km/h", + "kn" + ] + } + }, + "required": [ + "value", + "unit" + ] + }, + "direction": { + "description": "The wind direction in degrees", + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The direction unit", + "type": "string", + "enum": [ + "°" + ] + } + }, + "required": [ + "value", + "unit" + ] + }, + "elevation": { + "description": "Height above mean sea level", + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The elevation unit", + "type": "string", + "enum": [ + "m" + ] + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "required": [ + "speed", + "gust", + "direction", + "elevation" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Roof", + "Entrance" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "properties", + "location" + ] + } + }, + "network_connections": { + "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "description": "This field is optional but you can use it to the network type such as wifi or cable. You can even expose the number of spacenet-authenticated connections.", + "type": "string", + "enum": [ + "wifi", + "cable", + "spacenet" + ] + }, + "value": { + "description": "The amount of network connections.", + "type": "number" + }, + "machines": { + "description": "The machines that are currently connected with the network.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "The machine name.", + "type": "string" + }, + "mac": { + "description": "The machine's MAC address of the format D3:3A:DB:EE:FF:00.", + "type": "string" + } + }, + "required": [ + "mac" + ] + } + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Lab", + "Room 1" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "account_balance": { + "description": "How rich is your hackerspace?", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "How much?", + "type": "number" + }, + "unit": { + "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", + "type": "string" + }, + "location": { + "description": "If you have more than one account you can use this field to specify where it is.", + "type": "string" + }, + "name": { + "description": "Give your sensor instance a name.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit" + ] + } + }, + "total_member_count": { + "description": "Specify the number of space members.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The amount of your space members.", + "type": "number" + }, + "location": { + "description": "Specify the location if your hackerspace has different departments (for whatever reason). This field is for one department. Every department should have its own sensor instance.", + "type": "string" + }, + "name": { + "description": "You can use this field to specify if this sensor instance counts active or inactive members.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "people_now_present": { + "description": "Specify the number of people that are currently in your space. Optionally you can define a list of names.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The amount of present people.", + "type": "number" + }, + "location": { + "description": "If you use multiple sensor instances for different rooms, use this field to indicate the location.", + "type": "string" + }, + "name": { + "description": "Give this sensor a name if necessary at all. Use the location field for the rooms. This field is not intended to be used for names of hackerspace members. Use the field 'names' instead.", + "type": "string" + }, + "names": { + "description": "List of hackerspace members that are currently occupying the space.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "network_traffic": { + "description": "The current network traffic, in bits/second or packets/second (or both)", + "type": "array", + "items": { + "type": "object", + "properties": { + "properties": { + "type": "object", + "properties": { + "bits_per_second": { + "description": "", + "type": "object", + "properties": { + "value": { + "description": "The measurement value, in bits/second", + "type": "number", + "minimum": 0 + }, + "maximum": { + "description": "The maximum available throughput in bits/second, e.g. as sold by your ISP", + "type": "number", + "minimum": 0 + } + }, + "required": [ + "value" + ] + }, + "packets_per_second": { + "description": "", + "type": "object", + "properties": { + "value": { + "description": "The measurement value, in packets/second", + "type": "number", + "minimum": 0 + } + }, + "required": [ + "value" + ] + } + } + }, + "name": { + "description": "Name of the measurement, e.g. to distinguish between upstream and downstream traffic", + "type": "string" + }, + "location": { + "description": "Location the measurement relates to, e.g. WiFi or Uplink", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "properties" + ] + }, + "minItems": 1 + } + } + }, + "feeds": { + "description": "Feeds where users can get updates of your space", + "type": "object", + "properties": { + "blog": { + "description": "", + "type": "object", + "properties": { + "type": { + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] + }, + "url": { + "description": "Feed URL", + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "wiki": { + "description": "", + "type": "object", + "properties": { + "type": { + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] + }, + "url": { + "description": "Feed URL", + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "calendar": { + "description": "", + "type": "object", + "properties": { + "type": { + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] + }, + "url": { + "description": "Feed URL", + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "flickr": { + "description": "", + "type": "object", + "properties": { + "type": { + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] + }, + "url": { + "description": "Feed URL", + "type": "string" + } + }, + "required": [ + "url" + ] + } + } + }, + "projects": { + "description": "Your project sites (links to GitHub, wikis or wherever your projects are hosted)", + "type": "array", + "items": { + "type": "string" + } + }, + "links": { + "description": "Arbitrary links that you'd like to share", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "The link name.", + "type": "string" + }, + "description": { + "description": "An extra field for a more detailed description of the link", + "type": "string" + }, + "url": { + "description": "The URL.", + "type": "string" + } + }, + "required": [ + "name", + "url" + ] + } + }, + "membership_plans": { + "description": "A list of the different membership plans your hackerspace might have. Set the value according to your billing process. For example, if your membership fee is 10€ per month, but you bill it yearly (aka. the member pays the fee once per year), set the amount to 120 an the billing_interval to yearly.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "The name of the membership plan", + "type": "string", + "examples": [ + "Student Membership", + "Normal Membership" + ] + }, + "value": { + "description": "How much does this plan cost?", + "type": "number" + }, + "currency": { + "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", + "type": "string", + "examples": [ + "EUR", + "USD", + "CHF" + ] + }, + "billing_interval": { + "description": "How often is the membership billed? If you select other, please specify in the description what your billing interval is.", + "type": "string", + "enum": [ + "yearly", + "quarterly", + "monthly", + "weekly", + "daily", + "hourly", + "other" + ] + }, + "description": { + "description": "A free form string.", + "type": "string" + } + }, + "required": [ + "name", + "value", + "currency", + "billing_interval" + ] + } + }, + "linked_spaces": { + "description": "A list of spaces you know and feel connected too.", + "type": "array", + "items": { + "type": "object", + "properties": { + "endpoint": { + "description": "The SpaceAPI endpoint of the space", + "type": "string" + }, + "website": { + "description": "The website of the space", + "type": "string" + } + }, + "anyOf": [ + { + "required": [ + "endpoint" + ] + }, + { + "required": [ + "website" + ] + } + ] + } + } + }, + "required": [ + "api_compatibility", + "space", + "logo", + "url", + "contact" + ] +} +`, + "16": `{ + "$id": "https://schema.spaceapi.io/16-draft.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "SpaceAPI v16 (Draft)", + "type": "object", + "properties": { + "api_compatibility": { + "description": "The versions your SpaceAPI endpoint supports", + "type": "array", + "items": { + "type": "string" + }, + "contains": { + "const": "16" + } + }, + "space": { + "description": "The name of your space", + "type": "string" + }, + "logo": { + "description": "URL to your space logo", + "type": "string" + }, + "url": { + "description": "URL to your space website", + "type": "string" + }, + "location": { + "description": "Position data such as a postal address or geographic coordinates. May be omitted for spaces without a fixed physical location.", + "type": "object", + "properties": { + "address": { + "description": "The postal address of your space (street, block, housenumber, zip code, city, whatever you usually need in your country, and the country itself).
Examples:
  • Netzladen e.V., Breite Straße 74, 53111 Bonn, Germany
", + "type": "string" + }, + "lat": { + "description": "Latitude of your space location, in degree with decimal places. Use positive values for locations north of the equator, negative values for locations south of equator.", + "type": "number" + }, + "lon": { + "description": "Longitude of your space location, in degree with decimal places. Use positive values for locations east of Greenwich, and negative values for locations west of Greenwich.", + "type": "number" + }, + "timezone": { + "description": "The timezone the space is located in. It should be formatted according to the TZ database location names.", + "type": "string", + "examples": [ + "Europe/Kyiv", + "Antarctica/Palmer" + ] + }, + "country_code": { + "description": "Country code in ISO 3166 alpha-2 format", + "type": "string", + "examples": [ + "CH", + "DE", + "UA" + ] + }, + "hint": { + "description": "Information that can be used to describe how to access your space, if it is not trivial to find when standing at the address", + "type": "string", + "examples": [ + "Ring the doorbell marked with HACKSPACE", + "Knock three times, say Shibboleet and follow the white rabbit" + ] + }, + "areas": { + "description": "A list of areas in your space. Must include at least 1 area if defined.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of this area", + "examples": [ + "Hackerspace", + "Kitchen", + "Workshop" + ] + }, + "description": { + "type": "string", + "description": "A description of this area", + "examples": [ + "Our hackerspace area", + "Woodworking machines and power tools" + ] + }, + "square_meters": { + "type": "number", + "description": "The size of this area in square meters", + "examples": [ + 23.23, + 42 + ] + } + }, + "required": [ + "square_meters" + ] + }, + "minItems": 1 + } + }, + "minProperties": 1, + "dependentRequired": { + "lat": [ + "lon" + ], + "lon": [ + "lat" + ] + } + }, + "spacefed": { + "description": "A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that visiting hackers can use the space WiFi with their home space credentials.", + "type": "object", + "properties": { + "spacenet": { + "description": "See the wiki.", + "type": "boolean" + }, + "spacesaml": { + "description": "See the wiki.", + "type": "boolean" + } + }, + "required": [ + "spacenet", + "spacesaml" + ] + }, + "cam": { + "description": "URL(s) of webcams in your space", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "state": { + "description": "A collection of status-related data: actual open/closed status, icons, last change timestamp etc.", + "type": "object", + "properties": { + "open": { + "description": "A flag which indicates whether the space is currently open or closed. The state 'undefined' can be achieved by omitting this field. A missing 'open' property carries the semantics of a temporary unavailability of the state, whereas the absence of the 'state' property itself means the state is generally not implemented for this space.", + "type": "boolean" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the space status changed most recently", + "type": "number" + }, + "trigger_person": { + "description": "The person who lastly changed the state e.g. opened or closed the space.", + "type": "string" + }, + "message": { + "description": "An additional free-form string, could be something like 'open for public', 'members only' or whatever you want it to be", + "type": "string" + }, + "icon": { + "description": "Icons that show the status graphically", + "type": "object", + "properties": { + "open": { + "description": "The URL to your customized space logo showing an open space", + "type": "string" + }, + "closed": { + "description": "The URL to your customized space logo showing a closed space", + "type": "string" + } + }, + "required": [ + "open", + "closed" + ] + } + } + }, + "events": { + "description": "Events which happened recently in your space and which could be interesting to the public, like 'User X has entered/triggered/did something at timestamp Z'", + "type": "array", + "items": { + "required": [ + "name", + "type", + "timestamp" + ], + "type": "object", + "properties": { + "name": { + "description": "Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)", + "type": "string" + }, + "type": { + "description": "Action (e.g. check-in, check-out, finish-print, …). Define your own actions and use them consistently, canonical actions are not (yet) specified", + "type": "string" + }, + "timestamp": { + "description": "The Unix timestamp (in seconds) when the event occurred.", + "type": "number" + }, + "extra": { + "description": "A custom text field to give more information about the event", + "type": "string" + } + } + } + }, + "contact": { + "description": "Contact information about your space. You must define at least one which is in the list of allowed values of the issue_report_channels field.", + "type": "object", + "properties": { + "phone": { + "description": "Phone number, including country code with a leading plus sign", + "type": "string", + "examples": [ + "+1 800 555 4567", + "+41 79 123 45 67" + ] + }, + "sip": { + "description": "URI for Voice-over-IP via SIP", + "type": "string", + "examples": [ + "sip:yourspace@sip.example.org" + ] + }, + "keymasters": { + "description": "Persons who carry a key and are able to open the space upon request. One of the fields irc_nick, phone, email or twitter must be specified.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "name": { + "description": "Real name", + "type": "string" + }, + "irc_nick": { + "description": "Contact the person with this nickname directly in irc if available. The irc channel to be used is defined in the contact/irc field.", + "type": "string" + }, + "phone": { + "description": "Phone number, including country code with a leading plus sign", + "type": "string", + "examples": [ + "+1 800 555 4567", + "+41 79 123 45 67" + ] + }, + "email": { + "description": "Email address which can be base64 encoded.", + "type": "string" + }, + "twitter": { + "description": "Twitter username with leading @", + "type": "string", + "examples": [ + "@space_api" + ] + }, + "xmpp": { + "description": "XMPP (Jabber) ID", + "type": "string" + }, + "mastodon": { + "description": "Mastodon username", + "type": "string", + "examples": [ + "@ordnung@chaos.social" + ] + }, + "matrix": { + "description": "Matrix username (including domain)", + "type": "string", + "examples": [ + "@user:example.org" + ] + } + } + } + }, + "irc": { + "description": "URL of the IRC channel", + "type": "string", + "examples": [ + "irc://example.org/#channelname" + ] + }, + "twitter": { + "description": "Twitter username with leading @", + "type": "string", + "examples": [ + "@space_api" + ] + }, + "mastodon": { + "description": "Mastodon username", + "type": "string", + "examples": [ + "@ordnung@chaos.social" + ] + }, + "facebook": { + "description": "Facebook account URL.", + "type": "string" + }, + "identica": { + "description": "Identi.ca or StatusNet account, in the form yourspace@example.org", + "type": "string" + }, + "foursquare": { + "description": "Foursquare ID, in the form 4d8a9114d85f3704eab301dc.", + "type": "string" + }, + "email": { + "description": "E-mail address for contacting your space. If this is a mailing list consider to use the contact/ml field.", + "type": "string" + }, + "ml": { + "description": "The e-mail address of your mailing list. If you use Google Groups then the e-mail looks like your-group@googlegroups.com.", + "type": "string" + }, + "xmpp": { + "description": "A public Jabber/XMPP multi-user chatroom in the form chatroom@conference.example.net", + "type": "string" + }, + "issue_mail": { + "description": "A separate email address for issue reports. This value can be Base64-encoded.", + "type": "string" + }, + "gopher": { + "description": "A URL to find information about the Space in the Gopherspace", + "type": "string", + "examples": [ + "gopher://gopher.binary-kitchen.de" + ] + }, + "matrix": { + "description": "Matrix channel/community for the Hackerspace", + "type": "string", + "examples": [ + "#spaceroom:example.org", + "+spacecommunity:example.org" + ] + }, + "mumble": { + "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL", + "type": "string", + "examples": [ + "mumble://mumble.example.org/spaceroom?version=1.2.0" + ] + } + } + }, + "sensors": { + "description": "Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate left, …). The only canonical property is the temp property, additional sensor types may be defined by you. In this case, you are requested to share your definition for inclusion in this specification.", + "type": "object", + "properties": { + "temperature": { + "description": "Temperature sensor. To convert from one unit of temperature to another consider Wikipedia.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The unit of the sensor value.", + "type": "string", + "enum": [ + "°C", + "°F", + "K", + "°De", + "°N", + "°R", + "°Ré", + "°Rø" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Ceiling", + "Room 1" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", + "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "door_locked": { + "description": "Sensor type to indicate if a certain door is locked.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "boolean" + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Front door", + "Chill room", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -2889,24 +4706,32 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of pressure used by your sensor
Note: The hPA unit is deprecated and should not be used anymore. Use the correct hPa unit instead.", + "description": "The unit of pressure used by your sensor", "type": "string", "enum": [ - "hPa", - "hPA" + "hPa" ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Inside", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -2931,7 +4756,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -2950,16 +4775,25 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -2979,7 +4813,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -2998,16 +4832,25 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3027,7 +4870,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -3046,16 +4889,25 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3075,7 +4927,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "Choose the appropriate unit for your radiation sensor instance.", + "description": "Choose the appropriate unit for your radiation sensor instance", "type": "string", "enum": [ "cpm", @@ -3094,16 +4946,25 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3125,23 +4986,32 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", + "description": "The humidity unit", "type": "string", "enum": [ "%" ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Outside", + "Roof", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3162,7 +5032,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit, either btl for bottles or crt for crates.", + "description": "The unit, either btl for bottles or crt for crates", "type": "string", "enum": [ "btl", @@ -3170,16 +5040,26 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Room 1 or Room 2 or Room 3, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Entrance", + "Room 1", + "Fridge 3", + "Lab" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3189,7 +5069,7 @@ var SpaceAPISchemas = map[string]string{ } }, "power_consumption": { - "description": "The power consumption of a specific device or of your whole space.", + "description": "The power consumption of a specific device or of your whole space", "type": "array", "items": { "type": "object", @@ -3199,25 +5079,78 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", + "description": "The power unit", "type": "string", "enum": [ - "mW", "W", "VA" ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Room 1", + "Lab" + ] + }, + "name": { + "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", + "type": "string" + }, + "description": { + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" + } + }, + "required": [ + "value", + "unit", + "location" + ] + } + }, + "power_generation": { + "description": "The power generation of a specific device or of your whole space", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "description": "The sensor value", + "type": "number" + }, + "unit": { + "description": "The unit of the sensor value.", + "type": "string", + "enum": [ + "W", + "VA" + ] + }, + "location": { + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Room 1", + "Lab" + ] + }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3228,7 +5161,7 @@ var SpaceAPISchemas = map[string]string{ } }, "wind": { - "description": "Your wind sensor.", + "description": "Your wind sensor", "type": "array", "items": { "type": "object", @@ -3246,7 +5179,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", + "description": "The wind speed unit", "type": "string", "enum": [ "m/s", @@ -3269,7 +5202,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", + "description": "The gust speed unit", "type": "string", "enum": [ "m/s", @@ -3284,7 +5217,7 @@ var SpaceAPISchemas = map[string]string{ ] }, "direction": { - "description": "The wind direction in degrees.", + "description": "The wind direction in degrees", "type": "object", "properties": { "value": { @@ -3292,7 +5225,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", + "description": "The direction unit", "type": "string", "enum": [ "°" @@ -3305,7 +5238,7 @@ var SpaceAPISchemas = map[string]string{ ] }, "elevation": { - "description": "Height above mean sea level.", + "description": "Height above mean sea level", "type": "object", "properties": { "value": { @@ -3313,7 +5246,7 @@ var SpaceAPISchemas = map[string]string{ "type": "number" }, "unit": { - "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", + "description": "The elevation unit", "type": "string", "enum": [ "m" @@ -3334,16 +5267,24 @@ var SpaceAPISchemas = map[string]string{ ] }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Roof", + "Entrance" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3353,7 +5294,7 @@ var SpaceAPISchemas = map[string]string{ } }, "network_connections": { - "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", + "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", "type": "array", "items": { "type": "object", @@ -3392,16 +5333,24 @@ var SpaceAPISchemas = map[string]string{ } }, "location": { - "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", - "type": "string" + "description": "The location of your sensor", + "type": "string", + "examples": [ + "Lab", + "Room 1" + ] }, "name": { "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3432,8 +5381,12 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3461,8 +5414,12 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3497,8 +5454,12 @@ var SpaceAPISchemas = map[string]string{ "minItems": 1 }, "description": { - "description": "An extra field that you can use to attach some additional information to this sensor instance.", + "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3561,6 +5522,10 @@ var SpaceAPISchemas = map[string]string{ "description": { "description": "An extra field that you can use to attach some additional information to this sensor instance", "type": "string" + }, + "lastchange": { + "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", + "type": "number" } }, "required": [ @@ -3580,8 +5545,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -3597,8 +5567,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -3614,8 +5589,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -3631,8 +5611,13 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "type": { - "description": "Type of the feed, for example rss, atom, ical", - "type": "string" + "description": "Type of the feed", + "type": "string", + "examples": [ + "rss", + "atom", + "ical" + ] }, "url": { "description": "Feed URL", @@ -3663,7 +5648,7 @@ var SpaceAPISchemas = map[string]string{ "type": "string" }, "description": { - "description": "An extra field for a more detailed description of the link.", + "description": "An extra field for a more detailed description of the link", "type": "string" }, "url": { @@ -3684,8 +5669,12 @@ var SpaceAPISchemas = map[string]string{ "type": "object", "properties": { "name": { - "description": "The name of the membership plan. For example Student Membership, Normal Membership etc.", - "type": "string" + "description": "The name of the membership plan", + "type": "string", + "examples": [ + "Student Membership", + "Normal Membership" + ] }, "value": { "description": "How much does this plan cost?", @@ -3693,13 +5682,19 @@ var SpaceAPISchemas = map[string]string{ }, "currency": { "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", - "type": "string" + "type": "string", + "examples": [ + "EUR", + "USD", + "CHF" + ] }, "billing_interval": { "description": "How often is the membership billed? If you select other, please specify in the description what your billing interval is.", "type": "string", "enum": [ "yearly", + "quarterly", "monthly", "weekly", "daily", @@ -3726,13 +5721,26 @@ var SpaceAPISchemas = map[string]string{ "items": { "type": "object", "properties": { - "url": { - "description": "The space's website according to their SpaceAPI endpoint", + "endpoint": { + "description": "The SpaceAPI endpoint of the space", + "type": "string" + }, + "website": { + "description": "The website of the space", "type": "string" } }, - "required": [ - "url" + "anyOf": [ + { + "required": [ + "endpoint" + ] + }, + { + "required": [ + "website" + ] + } ] } } @@ -3742,7 +5750,6 @@ var SpaceAPISchemas = map[string]string{ "space", "logo", "url", - "location", "contact" ] }