Skip to content

Commit 2b751eb

Browse files
Charlie OwenPhil Sturgeon
authored andcommitted
Adding the example folder to the list of AJV tests.
1 parent a601102 commit 2b751eb

File tree

5 files changed

+109
-108
lines changed

5 files changed

+109
-108
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ before_script:
99
script:
1010
- bundle exec jekyll build
1111
- ajv test -s schema -d address -d calendar -d card -d geo --valid
12+
- ajv test -s schema -d "_includes/example/*.json" --valid

example/address.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"$schema": "http://json-schema.org/draft-06/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-
}
2+
"$schema": "http://json-schema.org/draft-06/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+
}
1919
}

example/calendar.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
{
2-
"$schema": "http://json-schema.org/draft-06/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-
}
2+
"$schema": "http://json-schema.org/draft-06/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+
}
3838
}

example/card.json

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
{
2-
"$schema": "http://json-schema.org/draft-06/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-
}
2+
"$schema": "http://json-schema.org/draft-06/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+
}
4847
}
48+
}
4949
}

example/geo.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"id": "http://json-schema.org/geo",
3-
"$schema": "http://json-schema.org/draft-06/schema#",
4-
"description": "A geographical coordinate",
5-
"type": "object",
6-
"properties": {
7-
"latitude": { "type": "number" },
8-
"longitude": { "type": "number" }
9-
}
10-
}
2+
"id": "http://json-schema.org/geo",
3+
"$schema": "http://json-schema.org/draft-06/schema#",
4+
"description": "A geographical coordinate",
5+
"type": "object",
6+
"properties": {
7+
"latitude": { "type": "number" },
8+
"longitude": { "type": "number" }
9+
}
10+
}

0 commit comments

Comments
 (0)