Commit c263cc5a authored by Joan Pascual Sana's avatar Joan Pascual Sana

Fix bad type for RsGxsGrpMsgIdPair

parent 3b9cd451
......@@ -29,7 +29,7 @@ class MethodParam:
def translateType(self, _type):
if not isinstance(_type, str):
if isinstance(_type, list):
return "map<" + ",".join(p for p in _type) + ">"
return "pair<" + ",".join(p for p in _type) + ">"
else:
print("Error: not supported type of parameter", type(_type))
sys.exit(1)
......@@ -92,14 +92,22 @@ class MethodParam:
else:
mapTypes = inner.split(",")
lines = ["type: array",
"items:",
tab + "type: object",
tab + "properties:"]
minIndent = tab + tab
lines = []
minIndent = ""
if type.startswith("map"):
minIndent = tab
lines = ["type: array",
"items:",
minIndent + "type: object",
minIndent + "properties:"]
elif type.startswith("pair"):
lines = ["type: object",
"properties:"]
minIndent = minIndent + tab + tab
for y in range(0, len(mapTypes)):
recursive = self.getOpenApiTypeReference(mapTypes[y])
# If is a map the construction is {"key" : <key>, "value": <value>}
if y == 0 and type.startswith("map"):
lines.append(minIndent + "key:")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment