From c6afc8f981474925226c93f5ba170fafab5120b0 Mon Sep 17 00:00:00 2001 From: Dominik Nakamura Date: Fri, 17 Dec 2021 12:12:55 +0900 Subject: [PATCH] docs: Fix `Array` type in markdown --- docs/docs/generate_md.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/docs/generate_md.py b/docs/docs/generate_md.py index 5c2a2bdd..539664b9 100644 --- a/docs/docs/generate_md.py +++ b/docs/docs/generate_md.py @@ -178,15 +178,17 @@ def get_requests(requests): if request['requestFields']: ret += requestFieldHeader for requestField in request['requestFields']: + valueType = requestField['valueType'].replace('<', "<").replace('>', ">") valueRestrictions = requestField['valueRestrictions'] if requestField['valueRestrictions'] else 'None' valueOptional = '?' if requestField['valueOptional'] else '' valueOptionalBehavior = requestField['valueOptionalBehavior'] if requestField['valueOptional'] and requestField['valueOptionalBehavior'] else 'N/A' - ret += '| {}{} | {} | {} | {} | {} |\n'.format(valueOptional, requestField['valueName'], requestField['valueType'], requestField['valueDescription'], valueRestrictions, valueOptionalBehavior) + ret += '| {}{} | {} | {} | {} | {} |\n'.format(valueOptional, requestField['valueName'], valueType, requestField['valueDescription'], valueRestrictions, valueOptionalBehavior) if request['responseFields']: ret += responseFieldHeader for responseField in request['responseFields']: - ret += '| {} | {} | {} |\n'.format(responseField['valueName'], responseField['valueType'], responseField['valueDescription']) + valueType = responseField['valueType'].replace('<', "<").replace('>', ">") + ret += '| {} | {} | {} |\n'.format(responseField['valueName'], valueType, responseField['valueDescription']) if request != requestsOut[-1]: ret += '\n---\n\n' @@ -239,7 +241,8 @@ def get_events(events): if event['dataFields']: ret += dataFieldHeader for dataField in event['dataFields']: - ret += '| {} | {} | {} |\n'.format(dataField['valueName'], dataField['valueType'], dataField['valueDescription']) + valueType = dataField['valueType'].replace('<', "<").replace('>', ">") + ret += '| {} | {} | {} |\n'.format(dataField['valueName'], valueType, dataField['valueDescription']) if event != eventsOut[-1]: ret += '\n---\n\n'