Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit ddbe166

Browse files
committed
reduce processing of OpenAPI logic when content-type is application/json
1 parent 34bcb1b commit ddbe166

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CloudFlare/api_decode_from_openapi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def do_path(cmd, values):
4949
request_body = values[action]['requestBody']
5050
if 'content' in request_body and request_body['content']:
5151
content_type = ','.join(list(request_body['content'].keys()))
52+
if content_type == 'application/json':
53+
# this is the default; so we simply ignore it
54+
content_type = None
5255

5356
if content_type:
5457
v = {

0 commit comments

Comments
 (0)