@autorest/python 6.1.10 → 6.1.11
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.
|
@@ -159,7 +159,7 @@ def build_type(yaml_data: Dict[str, Any], code_model: CodeModel) -> BaseType:
|
|
|
159
159
|
response.fill_instance_from_yaml(yaml_data, code_model)
|
|
160
160
|
else:
|
|
161
161
|
object_type = yaml_data.get("type")
|
|
162
|
-
if object_type
|
|
162
|
+
if object_type not in TYPE_TO_OBJECT:
|
|
163
163
|
_LOGGER.warning(
|
|
164
164
|
'Unrecognized definition type "%s" is found, falling back it as "string"! ',
|
|
165
165
|
yaml_data["type"],
|
|
@@ -143,15 +143,7 @@ class PagingOperationBase(OperationBase[PagingResponseType]):
|
|
|
143
143
|
elif "api-version" in [
|
|
144
144
|
p.rest_api_name for p in self.code_model.client.parameters
|
|
145
145
|
]:
|
|
146
|
-
file_import.
|
|
147
|
-
"urllib.parse", "urlparse", ImportType.STDLIB
|
|
148
|
-
)
|
|
149
|
-
file_import.add_submodule_import(
|
|
150
|
-
"urllib.parse", "urljoin", ImportType.STDLIB
|
|
151
|
-
)
|
|
152
|
-
file_import.add_submodule_import(
|
|
153
|
-
"urllib.parse", "parse_qs", ImportType.STDLIB
|
|
154
|
-
)
|
|
146
|
+
file_import.add_import("urllib.parse", ImportType.STDLIB)
|
|
155
147
|
file_import.add_submodule_import(
|
|
156
148
|
"azure.core.utils", "case_insensitive_dict", ImportType.AZURECORE
|
|
157
149
|
)
|
|
@@ -1208,15 +1208,20 @@ class _PagingOperationSerializer(
|
|
|
1208
1208
|
if p.rest_api_name == "api-version"
|
|
1209
1209
|
)
|
|
1210
1210
|
retval.append("# make call to next link with the client's api-version")
|
|
1211
|
-
retval.append("_parsed_next_link = urlparse(next_link)")
|
|
1212
|
-
retval.
|
|
1213
|
-
|
|
1211
|
+
retval.append("_parsed_next_link = urllib.parse.urlparse(next_link)")
|
|
1212
|
+
retval.extend(
|
|
1213
|
+
[
|
|
1214
|
+
"_next_request_params = case_insensitive_dict({",
|
|
1215
|
+
" key: [urllib.parse.quote(v) for v in value]"
|
|
1216
|
+
" for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()"
|
|
1217
|
+
"})",
|
|
1218
|
+
]
|
|
1214
1219
|
)
|
|
1215
1220
|
retval.append(
|
|
1216
1221
|
f'_next_request_params["api-version"] = {api_version_param.full_client_name}'
|
|
1217
1222
|
)
|
|
1218
1223
|
query_str = ", params=_next_request_params"
|
|
1219
|
-
next_link_str = "urljoin(next_link, _parsed_next_link.path)"
|
|
1224
|
+
next_link_str = "urllib.parse.urljoin(next_link, _parsed_next_link.path)"
|
|
1220
1225
|
except StopIteration:
|
|
1221
1226
|
pass
|
|
1222
1227
|
|