Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions postdown/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def parse_api(doc, api):
doc.table(['Key', 'Value', 'Description'], rows)

# Request Header
if request['header']:
if 'header' in request:
doc.bold('Header')
rows = get_rows(
request['header'],
Expand Down Expand Up @@ -125,7 +125,7 @@ def parse_api(doc, api):
doc.table(['Key', 'Value', 'Description'], rows)

# Request Header
if request['header']:
if 'header' in request:
doc.bold('Header')
rows = get_rows(
request['header'],
Expand Down Expand Up @@ -159,7 +159,7 @@ def parse_api(doc, api):
doc.comment_end('Request Query')
doc.hr()

if response['body']:
if 'body' in response:
doc.bold('Response')
logger.info('Example Response')
#logger.debug('response body: % s', response['body'])
Expand Down Expand Up @@ -211,4 +211,4 @@ def parse(in_file, out_file):
parse_api(doc, folder)

with open(out_file, 'w+') as f:
f.write(doc.output())
f.write(doc.output())