Hi,
The validator for m320 seems to be validating my assignment solution against a different schema. I solved the assignment as per the bullet points in the question. But on command prompt when I run the validator - as shown below -
validate_m320 pattern_polymorphic --file pattern_polymorphic.json --verbose=3
I get the following output -
Validating against the schema:
{
“$id”: “https://university.mongodb.com/m320/homework.polymorphic2.pattern.solution.json”,
“$schema”: “http://json-schema.org/draft-07/schema#”,
“title”: “Homework for the Polymorchic Pattern”,
“type”: “object”,
“required”: ["_id", “first_name”,“last_name”, “recruiting_source”, “extend_offer”, “team_placement”, “start_date”, “end_date”, “education”
, “skills”, “notes”],
“additionalProperties”: false,
“properties”: {
“_id”: {
“type”: “string”,
“enum”: [""]
},
“first_name”: {
“type”: “string”,
“enum”: [""]
},
“last_name”: {
“type”: “string”,
“enum”: [""]
},
“recruiting_source”: {
“type”: “string”,
“enum”: [""]
},
“extend_offer”: {
“type”: “string”,
“enum”: [""]
},
“team_placement”: {
“type”: “string”,
“enum”: [""]
},
“start_date”: {
“type”: “string”,
“enum”: [""]
},
“end_date”: {
“type”: “string”,
“enum”: [""]
},
“education”: {
“type”: “array”,
“items”: {
“description”: “details about the education”,
“type”: “object”,
“required”: [“level”, “subject”],
“additionalProperties”: false,
“properties”: {
“level”: {
“type”: “string”,
“enum”: [""]
},
“subject”: {
“type”: “string”,
“enum”: [""]
}
}
}
},
“skills”: {
“description”: “skills enumeration”,
“type”: “object”,
“required”: [“technical”, “languages”, “other”],
“additionalProperties”: false,
“properties”: {
“technical”: {
“type”: “array”,
“items”:{
“type”: “string”,
“enum”: [""]
}
},
“languages”: {
“type”: “array”,
“items”:{
“type”: “string”,
“enum”: [""]
}
},
“other”: {
“type”: “array”,
“items”:{
“type”: “string”,
“enum”: [""]
}
}
}
},
“notes”: {
“type”: “string”,
“enum”: [""]
}
}
}
The document fails validation against this solution
Detailed errors :
- (root): first_name is required
Detailed errors : - (root): last_name is required
Detailed errors : - (root): recruiting_source is required
Detailed errors : - (root): extend_offer is required
Detailed errors : - (root): team_placement is required
Detailed errors : - (root): start_date is required
Detailed errors : - (root): end_date is required
Detailed errors : - (root): education is required
Detailed errors : - (root): skills is required
Detailed errors : - (root): notes is required
Detailed errors : - (root): Additional property authors is not allowed
Detailed errors : - (root): Additional property format is not allowed
Detailed errors : - (root): Additional property publisher is not allowed
Detailed errors : - (root): Additional property title is not allowed
Detailed errors : - (root): Additional property narrator is not allowed
Detailed errors : - (root): Additional property product_id is not allowed
Detailed errors : - (root): Additional property description is not allowed
Detailed errors : - (root): Additional property language is not allowed
Detailed errors : - (root): Additional property length_minutes is not allowed
The document fails validation.
Errors:
At least one of your solutions is not passing validation.
Please help on this.
Thanks
Nusrat