Skip to content

Commit

Permalink
fleshed out schematic
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdavis committed Jun 28, 2014
1 parent 1008fc4 commit 0e67a72
Show file tree
Hide file tree
Showing 3 changed files with 225 additions and 7 deletions.
10 changes: 5 additions & 5 deletions resume.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"firstName":"",
"lastName":"",
"email": {
"work": null,
"personal": null
"work": "",
"personal": ""
},
"phone": {
"work": null,
"personal": null
"work": "",
"personal": ""
},
"summary":"",
"location":{
Expand All @@ -17,7 +17,7 @@
"state":""
},
"websites": {
"blog": null
"blog": ""
},
"profiles":{
"github":"",
Expand Down
218 changes: 218 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Resume Schema",
"type": "object",
"properties": {
Expand All @@ -10,8 +11,225 @@
},
"lastName": {
"type": "string"
},
"email": {
"type": "object",
"properties": {
"work": {
"type": "string"
},
"personal": {
"type": "string"
}
}
},
"phone": {
"type": "object",
"properties": {
"work": {
"type": "string"
},
"personal": {
"type": "string"
}
}
},
"summary": {
"type": "string"
},
"location": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"websites": {
"type": "object",
"properties": {
"blog": {
"type": "string"
}
}
},
"profiles": {
"type": "object",
"properties": {
"twitter": {
"type": "string"
},
"github": {
"type": "string"
}
}
}
}
},
"work": {
"type": "array",
"items": {
"type": "object",
"properties": {
"company": {
"type": "string"
},
"position": {
"type": "string"
},
"summary": {
"type": "string"
},
"website": {
"type": "string"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
},
"highlights": {
"type": "array",
"items": {
"type": "string"
}
}
}

}
},
"education": {
"type": "array",
"items": {
"type": "object",
"properties": {
"institution": {
"type": "string"
},
"area": {
"type": "string"
},
"studyType": {
"type": "string"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
},
"courses": {
"type": "array",
"items": {
"type": "string"
}
}
}

}
},
"awards": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"awardDate": {
"type": "string"
},
"awarder": {
"type": "string"
}
}

}
},
"publications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"publisher": {
"type": "string"
},
"releaseDate": {
"type": "string"
},
"website": {
"type": "string"
}
}

}
},
"skills": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"level": {
"type": "string"
},
"releaseDate": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
}
}

}
},
"hobbies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
}
}

}
},
"references": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"reference": {
"type": "string"
}
}

}
}
}
}
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var validator = require('../validator');

test('Test validator on resume.json.', function(t) {
validator.validate(validator.resumeJson, function(report, err) {
t.equal(err, null, 'no error');
t.equal(report && report.valid, true, 'schema passed.');
t.equal(err, null, 'No formatting errors');
t.equal(report && report.valid, true, 'Passes JsonResume v1.0.0 specification - DRAFT.');
t.end();
});
});

0 comments on commit 0e67a72

Please sign in to comment.