Skip to content

Commit

Permalink
Require points of contact for resources
Browse files Browse the repository at this point in the history
(closes #12)
  • Loading branch information
bhousel committed Mar 13, 2018
1 parent ad9d827 commit 1dd2709
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 19 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,26 @@ Each feature must have a unique `id` property, for example `usa_full`.

These are `*.json` files found under the `resources/` folder.
Each resource file contains a single JSON object with information about
the resource.
the community resource.

Each resource must have a unique `id` property.
The `featureId` property links the resource to a single feature.

```js
{
"id": "OSM-US-Slack",
"featureId": "usa_full",
"type": "slack",
"countryCode": "US",
"name": "OpenStreetMap US Slack",
"description": "Sign up at {url}",
"url": "https://osmus-slack.herokuapp.com/"
"id": "OSM-US-Slack",
"featureId": "usa_full",
"type": "slack",
"countryCode": "US",
"name": "OpenStreetMap US Slack",
"description": "Sign up at {url}",
"url": "https://osmus-slack.herokuapp.com/",
"contacts": [
{
"name" : "Barney Rubble",
"email" : "[email protected]"
}
]
}
```

Expand Down
6 changes: 5 additions & 1 deletion dist/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"countryCode": "US",
"name": "OpenStreetMap US Slack",
"description": "Sign up at {url}",
"url": "https://osmus-slack.herokuapp.com/"
"url": "https://osmus-slack.herokuapp.com/",
"contacts": [
{"name": "Ian Dees", "email": "[email protected]"},
{"name": "Clifford Snow", "email": "[email protected]"}
]
}
}
}
2 changes: 1 addition & 1 deletion dist/resources.min.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"resources":{"OSM-US-Slack":{"id":"OSM-US-Slack","featureId":"usa_full","type":"slack","countryCode":"US","name":"OpenStreetMap US Slack","description":"Sign up at {url}","url":"https://osmus-slack.herokuapp.com/"}}}
{"resources":{"OSM-US-Slack":{"id":"OSM-US-Slack","featureId":"usa_full","type":"slack","countryCode":"US","name":"OpenStreetMap US Slack","description":"Sign up at {url}","url":"https://osmus-slack.herokuapp.com/","contacts":[{"name":"Ian Dees","email":"[email protected]"},{"name":"Clifford Snow","email":"[email protected]"}]}}}
24 changes: 17 additions & 7 deletions resources/north-america/us/OSM-US-Slack.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"id": "OSM-US-Slack",
"featureId": "usa_full",
"type": "slack",
"countryCode": "US",
"name": "OpenStreetMap US Slack",
"description": "Sign up at {url}",
"url": "https://osmus-slack.herokuapp.com/"
"id": "OSM-US-Slack",
"featureId": "usa_full",
"type": "slack",
"countryCode": "US",
"name": "OpenStreetMap US Slack",
"description": "Sign up at {url}",
"url": "https://osmus-slack.herokuapp.com/",
"contacts": [
{
"name": "Ian Dees",
"email": "[email protected]"
},
{
"name": "Clifford Snow",
"email": "[email protected]"
}
]
}
28 changes: 26 additions & 2 deletions schema/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"title": "Resource",
"description": "An OpenStreetMap community resource",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"featureId",
"type",
"countryCode",
"name",
"description",
"url"
"url",
"contacts"
],
"properties": {
"id": {
Expand Down Expand Up @@ -42,6 +43,29 @@
"url": {
"description": "A url link for the community resource",
"type": "string"
},
"contacts": {
"description": "People to contact about this community resource",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"name",
"email"
],
"properties": {
"name": {
"description": "The contact person's name",
"type": "string"
},
"email": {
"description": "The contact person's email address",
"type": "string"
}
}
}
}
}
}

0 comments on commit 1dd2709

Please sign in to comment.