Add a mandatory 'id' attribute to 'resource' elements
This is now required by api-site. Change-Id: Ifdfd80060cb294ded92c99743c371ae22df933b7
This commit is contained in:
parent
607177b8b4
commit
9caebf8371
|
@ -140,7 +140,12 @@ class MyNodeVisitor(SparseNodeVisitor):
|
|||
|
||||
def build_resources(root, d, path=''):
|
||||
for k, v in d.iteritems():
|
||||
tmp = ET.SubElement(root, 'resource', {'path': k})
|
||||
tmp = ET.SubElement(root, 'resource', {
|
||||
# NOTE(cyril): sometimes, id and path might differ. This
|
||||
# should be good enough, though.
|
||||
'id': k.replace('{', '').replace('}', ''),
|
||||
'path': k,
|
||||
})
|
||||
if path + '/' + k + '/' in self.paths:
|
||||
for method in self.paths[path + '/' + k + '/']:
|
||||
ET.SubElement(tmp, 'method', {'href': '#' + method})
|
||||
|
|
Loading…
Reference in New Issue