mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Merge pull request #874 from dnaka91/fix-markdown-arrays
docs: Fix `Array` type in markdown
This commit is contained in:
commit
6f72da83ff
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user