openapi icon indicating copy to clipboard operation
openapi copied to clipboard

Parsing fails when a response includes a header without a description

Open TBBle opened this issue 5 years ago • 0 comments

The exception looks like this:

Exception occurred:
  File "/usr/local/lib/python3.7/site-packages/sphinxcontrib/openapi/openapi20.py", line 75, in _httpresource
    for line in convert(header['description']).splitlines():
KeyError: 'description'

It appears to be because _httpresource blindly defererences header['description']. According to HeaderObject the description field is not required.

TBBle avatar Mar 25 '20 08:03 TBBle