openapi-httpx-client 0.3.0__tar.gz → 0.3.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openapi-httpx-client
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: A Python client for OpenAPI specifications using httpx
5
5
  Home-page: https://github.com/lloydzhou/openapiclient
6
6
  Author: lloydzhou
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openapi-httpx-client
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: A Python client for OpenAPI specifications using httpx
5
5
  Home-page: https://github.com/lloydzhou/openapiclient
6
6
  Author: lloydzhou
@@ -101,6 +101,8 @@ class OpenAPIClient:
101
101
  content_type = response.headers.get('Content-Type', '')
102
102
  if 'yaml' in content_type or 'yml' in content_type:
103
103
  self.definition = yaml.safe_load(response.text)
104
+ elif self.definition_source.endswith('.yaml') or self.definition_source.endswith('.yml'):
105
+ self.definition = yaml.safe_load(response.text)
104
106
  else:
105
107
  self.definition = response.json()
106
108
  else:
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="openapi-httpx-client",
8
- version="0.3.0",
8
+ version="0.3.1",
9
9
  author="lloydzhou",
10
10
  author_email="lloydzhou@qq.com",
11
11
  description="A Python client for OpenAPI specifications using httpx",