Encode type of 'links' for Extension objects
Change-Id: Iefe15202cc4f386284c07b7500cf0713e71542f1 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
@@ -17,7 +17,6 @@ class Extension(resource.Resource):
|
|||||||
resource_key = 'extension'
|
resource_key = 'extension'
|
||||||
resources_key = 'extensions'
|
resources_key = 'extensions'
|
||||||
base_path = '/extensions'
|
base_path = '/extensions'
|
||||||
id_attribute = "alias"
|
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_fetch = True
|
allow_fetch = True
|
||||||
@@ -30,7 +29,7 @@ class Extension(resource.Resource):
|
|||||||
description = resource.Body('description')
|
description = resource.Body('description')
|
||||||
#: Links pertaining to this extension. This is a list of dictionaries,
|
#: Links pertaining to this extension. This is a list of dictionaries,
|
||||||
#: each including keys ``href`` and ``rel``.
|
#: each including keys ``href`` and ``rel``.
|
||||||
links = resource.Body('links')
|
links = resource.Body('links', type=list, list_type=dict)
|
||||||
#: The name of the extension.
|
#: The name of the extension.
|
||||||
name = resource.Body('name')
|
name = resource.Body('name')
|
||||||
#: A URL pointing to the namespace for this extension.
|
#: A URL pointing to the namespace for this extension.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Extension(resource.Resource):
|
|||||||
#: A description of the extension. *Type: string*
|
#: A description of the extension. *Type: string*
|
||||||
description = resource.Body('description')
|
description = resource.Body('description')
|
||||||
#: Links to the documentation in various format. *Type: string*
|
#: Links to the documentation in various format. *Type: string*
|
||||||
links = resource.Body('links')
|
links = resource.Body('links', type=list, list_type=dict)
|
||||||
#: The name of the extension. *Type: string*
|
#: The name of the extension. *Type: string*
|
||||||
name = resource.Body('name')
|
name = resource.Body('name')
|
||||||
#: The second unique identifier of the extension after the alias.
|
#: The second unique identifier of the extension after the alias.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class Extension(resource.Resource):
|
|||||||
#: Text describing what the extension does.
|
#: Text describing what the extension does.
|
||||||
description = resource.Body('description')
|
description = resource.Body('description')
|
||||||
#: Links pertaining to this extension.
|
#: Links pertaining to this extension.
|
||||||
links = resource.Body('links')
|
links = resource.Body('links', type=list, list_type=dict)
|
||||||
#: The name of this extension.
|
#: The name of this extension.
|
||||||
name = resource.Body('name')
|
name = resource.Body('name')
|
||||||
#: Timestamp when the extension was last updated.
|
#: Timestamp when the extension was last updated.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ IDENTIFIER = 'IDENTIFIER'
|
|||||||
EXAMPLE = {
|
EXAMPLE = {
|
||||||
'alias': '1',
|
'alias': '1',
|
||||||
'description': '2',
|
'description': '2',
|
||||||
'links': '3',
|
'links': [],
|
||||||
'name': '4',
|
'name': '4',
|
||||||
'namespace': '5',
|
'namespace': '5',
|
||||||
'updated': '2015-03-09T12:14:57.233772',
|
'updated': '2015-03-09T12:14:57.233772',
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ IDENTIFIER = 'IDENTIFIER'
|
|||||||
EXAMPLE = {
|
EXAMPLE = {
|
||||||
'alias': '1',
|
'alias': '1',
|
||||||
'description': '2',
|
'description': '2',
|
||||||
'links': '3',
|
'links': [],
|
||||||
'name': '4',
|
'name': '4',
|
||||||
'namespace': '5',
|
'namespace': '5',
|
||||||
'updated': '2015-03-09T12:14:57.233772',
|
'updated': '2015-03-09T12:14:57.233772',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ IDENTIFIER = 'IDENTIFIER'
|
|||||||
EXAMPLE = {
|
EXAMPLE = {
|
||||||
'alias': '1',
|
'alias': '1',
|
||||||
'description': '2',
|
'description': '2',
|
||||||
'links': '3',
|
'links': [],
|
||||||
'name': '4',
|
'name': '4',
|
||||||
'updated': '2016-03-09T12:14:57.233772',
|
'updated': '2016-03-09T12:14:57.233772',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user