Skip to content

Commit b7a3e51

Browse files
committed
Changed REST interface for ports
1 parent a380bf6 commit b7a3e51

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

rest/helper.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ def format_ports(ports):
128128
def format_port(port):
129129
port_value = {'name': port.name, 'direction': port._direction}
130130
if port._direction == 'Uses':
131-
port_value['type'] = port._using.name
132-
port_value['namespace'] = port._using.nameSpace
131+
versionIdx = port.using.repoId.rfind(':')
132+
version = port.using.repoId[versionIdx:]
133+
134+
port_value['repId'] = port.using.repoId
135+
port_value['idl'] = {
136+
'type': port._using.name,
137+
'namespace': port._using.nameSpace,
138+
'version': version
139+
}
133140
return port_value

0 commit comments

Comments
 (0)