Skip to content

Commit 09f1536

Browse files
adamvosshandrews
authored andcommitted
Improve experience when accessing schemas from web browser
This adds a .json file where it has been indicated as allowable and a notice elsewhere.
1 parent 3391184 commit 09f1536

File tree

10 files changed

+136
-122
lines changed

10 files changed

+136
-122
lines changed

address

Lines changed: 0 additions & 19 deletions
This file was deleted.

address

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
example/address.json

calendar

Lines changed: 0 additions & 38 deletions
This file was deleted.

calendar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
example/calendar.json

card

Lines changed: 0 additions & 49 deletions
This file was deleted.

card

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
example/card.json

documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ For previous versions of the specification, please see the [Specification Links]
1717
Meta-schemas
1818
------------
1919

20-
The meta-schemas are the schemas which define the JSON Schema and Hyper-Schema formats.
21-
20+
The meta-schemas define the JSON Schema and Hyper-Schema formats using the JSON Schema format.
2221
The latest meta-schema is draft-06.
2322

2423
|--------------------------------------------------------------|------------------------------------------------------------|
2524
| [Core/Validation Meta-Schema](http://json-schema.org/schema) | Used for schemas written for pure validation. |
2625
| [Hyper Meta-Schema](http://json-schema.org/hyper-schema) | Used for schemas written for validation and hyper-linking. |
2726

27+
**If you are accessing the above meta-schema links from a web browser, you will need to save the file then open it as a JSON file.**

example/address.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"description": "An Address following the convention of http://microformats.org/wiki/hcard",
4+
"type": "object",
5+
"properties": {
6+
"post-office-box": { "type": "string" },
7+
"extended-address": { "type": "string" },
8+
"street-address": { "type": "string" },
9+
"locality":{ "type": "string" },
10+
"region": { "type": "string" },
11+
"postal-code": { "type": "string" },
12+
"country-name": { "type": "string"}
13+
},
14+
"required": ["locality", "region", "country-name"],
15+
"dependencies": {
16+
"post-office-box": ["street-address"],
17+
"extended-address": ["street-address"]
18+
}
19+
}

example/calendar.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"description": "A representation of an event",
4+
"type": "object",
5+
"required": [ "dtstart", "summary" ],
6+
"properties": {
7+
"dtstart": {
8+
"format": "date-time",
9+
"type": "string",
10+
"description": "Event starting time"
11+
},
12+
"dtend": {
13+
"format": "date-time",
14+
"type": "string",
15+
"description": "Event ending time"
16+
},
17+
"summary": { "type": "string" },
18+
"___location": { "type": "string" },
19+
"url": { "type": "string", "format": "uri" },
20+
"duration": {
21+
"format": "time",
22+
"type": "string",
23+
"description": "Event duration"
24+
},
25+
"rdate": {
26+
"format": "date-time",
27+
"type": "string",
28+
"description": "Recurrence date"
29+
},
30+
"rrule": {
31+
"type": "string",
32+
"description": "Recurrence rule"
33+
},
34+
"category": { "type": "string" },
35+
"description": { "type": "string" },
36+
"geo": { "$ref": "http: //json-schema.org/geo" }
37+
}
38+
}

example/card.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"description": "A representation of a person, company, organization, or place",
4+
"type": "object",
5+
"required": ["familyName", "givenName"],
6+
"properties": {
7+
"fn": {
8+
"description": "Formatted Name",
9+
"type": "string"
10+
},
11+
"familyName": { "type": "string" },
12+
"givenName": { "type": "string" },
13+
"additionalName": { "type": "array", "items": { "type": "string" } },
14+
"honorificPrefix": { "type": "array", "items": { "type": "string" } },
15+
"honorificSuffix": { "type": "array", "items": { "type": "string" } },
16+
"nickname": { "type": "string" },
17+
"url": { "type": "string", "format": "uri" },
18+
"email": {
19+
"type": "object",
20+
"properties": {
21+
"type": { "type": "string" },
22+
"value": { "type": "string", "format": "email" }
23+
}
24+
},
25+
"tel": {
26+
"type": "object",
27+
"properties": {
28+
"type": { "type": "string" },
29+
"value": { "type": "string", "format": "phone" }
30+
}
31+
},
32+
"adr": { "$ref": "http://json-schema.org/address" },
33+
"geo": { "$ref": "http://json-schema.org/geo" },
34+
"tz": { "type": "string" },
35+
"photo": { "type": "string" },
36+
"logo": { "type": "string" },
37+
"sound": { "type": "string" },
38+
"bday": { "type": "string", "format": "date" },
39+
"title": { "type": "string" },
40+
"role": { "type": "string" },
41+
"org": {
42+
"type": "object",
43+
"properties": {
44+
"organizationName": { "type": "string" },
45+
"organizationUnit": { "type": "string" }
46+
}
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)