Expose nullable fields properties

Some fields are not required parameters, therfore this patch allows them
to be None.

This has been done for images in a previous patch. This patch does the
same thing for tasks.

This will allow the client to have attributes with value `None` and
it'll make it consistent across responses and with regards to the API.

NOTE: A follow-up patch will enable None values to be returned by the
API.

Change-Id: I694cc144375c76ad8aaab495fc2e3ac5ed84ec2f
This commit is contained in:
Flavio Percoco 2014-12-02 13:30:11 +01:00
parent 8b3ca087b7
commit 5a265dada4
1 changed files with 3 additions and 3 deletions

View File

@ -330,11 +330,11 @@ _TASK_SCHEMA = {
},
"input": {
"description": _("The parameters required by task, JSON blob"),
"type": "object"
"type": ["null", "object"],
},
"result": {
"description": _("The result of current task, JSON blob"),
"type": "object",
"type": ["null", "object"],
},
"owner": {
"description": _("An identifier for the owner of this task"),
@ -348,7 +348,7 @@ _TASK_SCHEMA = {
"expires_at": {
"description": _("Datetime when this resource would be"
" subject to removal"),
"type": "string"
"type": ["null", "string"]
},
"created_at": {
"description": _("Datetime when this resource was created"),