http-content-parser 0.0.13__tar.gz → 0.0.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/PKG-INFO +5 -4
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/README.md +3 -2
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/pyproject.toml +1 -1
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/curl_parser.py +2 -3
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/generate_api_file.py +1 -1
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/tests/test_curl.py +1 -1
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/.gitignore +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/LICENSE +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/requirements.txt +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/__init__.py +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/openapi_parser.py +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/param_util.py +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/postman_parser.py +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/req_data.py +0 -0
- {http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/swagger2_parser.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: http_content_parser
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.15
|
|
4
4
|
Summary: parse http's payload and response
|
|
5
5
|
Author-email: max su <suleiabc@gmail.com>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -14,14 +14,15 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
|
|
15
15
|
This is a http content parser package.
|
|
16
16
|
|
|
17
|
-
## package
|
|
17
|
+
## build package
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
python3 -m build
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## upload to pypi
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
+
rm -f dist/*
|
|
26
27
|
python3 -m twine upload dist/*
|
|
27
28
|
```
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/curl_parser.py
RENAMED
|
@@ -106,9 +106,8 @@ class CurlParser(object):
|
|
|
106
106
|
curl_data = line_i_list[1]
|
|
107
107
|
else:
|
|
108
108
|
curl_data = line_i_list[0]
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
)
|
|
109
|
+
body = re.sub( r"\n\s*", "", curl_data.replace(" \\\n", ""))
|
|
110
|
+
req_data["body"] = body[:-1]
|
|
112
111
|
|
|
113
112
|
if not req_data.get("method"):
|
|
114
113
|
req_data["method"] = "post"
|
|
@@ -44,7 +44,7 @@ class GenerateApiFile:
|
|
|
44
44
|
for payload in payload_list:
|
|
45
45
|
self.write_api_content_to_yaml(yaml_file, payload)
|
|
46
46
|
# remove duplicate key
|
|
47
|
-
self.remove_duplicate_key_for_yaml(yaml_file)
|
|
47
|
+
# self.remove_duplicate_key_for_yaml(yaml_file)
|
|
48
48
|
|
|
49
49
|
def convert_curl_data_to_model(
|
|
50
50
|
self, curl_file_path, curl_filter=None
|
|
@@ -13,7 +13,7 @@ class TestCases:
|
|
|
13
13
|
# with open("./postman.json", "r") as f:
|
|
14
14
|
# json_dict = json.load(f)
|
|
15
15
|
# gaf.produce_api_yaml_for_postman(json_dict, "./test.yaml")
|
|
16
|
-
curl_file = '/Users/lei.susl/Desktop/test1/iac-dispatcher/
|
|
16
|
+
curl_file = '/Users/lei.susl/Desktop/test1/iac-dispatcher/tmp2'
|
|
17
17
|
res = gaf.convert_curl_data_to_model(curl_file_path=curl_file)
|
|
18
18
|
for r in res:
|
|
19
19
|
print('body is: \n')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/__init__.py
RENAMED
|
File without changes
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/openapi_parser.py
RENAMED
|
File without changes
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/param_util.py
RENAMED
|
File without changes
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/postman_parser.py
RENAMED
|
File without changes
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/req_data.py
RENAMED
|
File without changes
|
{http_content_parser-0.0.13 → http_content_parser-0.0.15}/src/http_content_parser/swagger2_parser.py
RENAMED
|
File without changes
|