Make date format validation stricter
Change-Id: Ib7903e0bb93bf5809f2314285ff631f2caf2bf32
This commit is contained in:
parent
3207279faf
commit
ac99336407
@ -35,8 +35,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"end_date": {
|
"end_date": {
|
||||||
"type": ["string", "null"],
|
"$ref": "#/definitions/date_format"
|
||||||
"pattern": "^20\\d{2}-\\w{3}-[0-3]\\d$"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["company_name", "end_date"],
|
"required": ["company_name", "end_date"],
|
||||||
@ -58,8 +57,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"end_date": {
|
"end_date": {
|
||||||
"type": "string",
|
"$ref": "#/definitions/date_format"
|
||||||
"pattern": "^20\\d{2}-\\w{3}-[0-3]\\d$"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["release_name", "end_date"],
|
"required": ["release_name", "end_date"],
|
||||||
@ -201,9 +199,6 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"voting_date": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"project_types": {
|
"project_types": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@ -231,5 +226,11 @@
|
|||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"definitions": {
|
||||||
|
"date_format": {
|
||||||
|
"type": ["string", "null"],
|
||||||
|
"pattern": "^20\\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[0-3]\\d$"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user