From 5307c41bbab179382e5c3518645ea8d98290bd8b Mon Sep 17 00:00:00 2001 From: edpryk Date: Wed, 26 Apr 2023 21:36:09 +0300 Subject: [PATCH 1/2] fixed issue with unstable type list --- mitmproxy2swagger/mitmproxy2swagger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy2swagger/mitmproxy2swagger.py b/mitmproxy2swagger/mitmproxy2swagger.py index d5a1449..5b546c0 100644 --- a/mitmproxy2swagger/mitmproxy2swagger.py +++ b/mitmproxy2swagger/mitmproxy2swagger.py @@ -313,7 +313,7 @@ def main(override_args: Sequence[str] | None = None): swagger["paths"][path_template_to_set][method]["responses"]["200"] = { "description": "OK", - "content": {content_type: {}}, + "content": "", } except FlowReadException as e: From 74f5c8265be6e53dca3eda2bbb964f846fcfed12 Mon Sep 17 00:00:00 2001 From: edpryk Date: Wed, 26 Apr 2023 21:53:09 +0300 Subject: [PATCH 2/2] replaced str to tuple --- mitmproxy2swagger/mitmproxy2swagger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy2swagger/mitmproxy2swagger.py b/mitmproxy2swagger/mitmproxy2swagger.py index 5b546c0..26b1770 100644 --- a/mitmproxy2swagger/mitmproxy2swagger.py +++ b/mitmproxy2swagger/mitmproxy2swagger.py @@ -313,7 +313,7 @@ def main(override_args: Sequence[str] | None = None): swagger["paths"][path_template_to_set][method]["responses"]["200"] = { "description": "OK", - "content": "", + "content": ("content-type", ""), } except FlowReadException as e: