A WIP lexicon defining a geocache
world.geocache.geocache.json
71 lines 2.9 kB view raw
1{ 2 "lexicon": 1, 3 "id": "world.geocache.geocache", 4 "defs": { 5 "main": { 6 "type": "record", 7 "description": "A geocache out there in the world", 8 "key": "tid", 9 "record": { 10 "type": "object", 11 "required": ["name", "region", "location", "cacheType", "status", "attributes", "description", "createdAt"], 12 "properties": { 13 "name": { 14 "type": "string", 15 "maxLength": 1000, 16 "maxGraphemes": 100, 17 "description": "The name for the geocache" 18 }, 19 "region": { 20 /* there's potentially some merit in having a specific tag for region, but it could be argued 21 that region could be inferred from the location property. this would make sense if we made the 22 community.lexicon.location.address a required property, as that lexicon only requires a country, 23 and has a property for region and locality... 24 25 maybe region could be a ref to a ..location.address specifically, and location could be restricted 26 to coordinates or hthree? will need to think about this */ 27 }, 28 "location": { 29 "type": "object", 30 "required": [/* there's a few options for this and all have their merits */] 31 "properties": { 32 "geo": { "type": "ref", "ref": "community.lexicon.location.geo" }, 33 "address": { "type": "ref", "ref": "community.lexicon.location.address" } 34 "hthree": { "type": "ref", "ref": "community.lexicon.location.hthree" } 35 } 36 }, 37 "cacheType": { 38 /* this needs to be fleshed out more when i'm not tired 39 probably would want to define a set of lexicon tokens 40 under world.geocache.geocache.type so they can be extended 41 while preserving cohesion */ 42 }, 43 "status": { 44 "type": "object", 45 "description": "The status of the lexicon", 46 "required": ["value"], 47 "properties": { 48 "value": /* a string would be enough, but maybe it would be best 49 to define a world.geocache.geocache.status record? tokens?? */ 50 } 51 }, 52 "attributes": { 53 /* similar situation to cacheType. opencaching uses badges to represent the attributes. 54 we'd want attributes to be community driven, so tokens would be a good fit? */ 55 }, 56 "description": { 57 "type": "string", 58 "maxLength": 10000, 59 "maxGraphemes": 1000, 60 "description": "A description for the geocache. " 61 }, 62 "createdAt": { 63 "type": "string", 64 "format": "datetime", 65 "description": "Client-declared timestamp when this post was originally created." 66 } 67 } 68 } 69 }, 70 } 71}