зеркало из https://github.com/Azure/autorest.az.git
fix-string-bug-in-windows (#479)
This commit is contained in:
Родитель
3207bbbf35
Коммит
5b3fa182e0
|
@ -484,7 +484,13 @@ function GetPolyMethodCall(model: CodeModelAz, prefix: any, originalOperation: O
|
|||
parameterPair = model.Parameter_NamePython(param) + "=None";
|
||||
}
|
||||
} else {
|
||||
parameterPair = parameterName + "=" + optionName;
|
||||
if(model.Parameter_Type(param) == SchemaType.Integer) {
|
||||
parameterPair = parameterName + "=int(" + optionName + ")";
|
||||
} else if(model.Parameter_Type(param) == SchemaType.Number) {
|
||||
parameterPair = parameterName + "=float(" + optionName + ")";
|
||||
} else {
|
||||
parameterPair = parameterName + "=" + optionName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -561,7 +567,13 @@ function GetMethodCall(model: CodeModelAz, required: any, prefix: any): string[]
|
|||
}
|
||||
}
|
||||
else {
|
||||
parameterPair = model.MethodParameter_NamePython + "=" + model.MethodParameter_MapsTo;
|
||||
if(model.MethodParameter_Type == SchemaType.Integer) {
|
||||
parameterPair = model.MethodParameter_NamePython + "=int(" + model.MethodParameter_MapsTo + ")";
|
||||
} else if(model.MethodParameter_Type == SchemaType.Number) {
|
||||
parameterPair = model.MethodParameter_NamePython + "=float(" + model.MethodParameter_MapsTo + ")";
|
||||
} else {
|
||||
parameterPair = model.MethodParameter_NamePython + "=" + model.MethodParameter_MapsTo;
|
||||
}
|
||||
}
|
||||
|
||||
if (methodCall.endsWith("(")) {
|
||||
|
|
|
@ -19,9 +19,9 @@ def managed_network_mn_list(client,
|
|||
skiptoken=None):
|
||||
if resource_group_name:
|
||||
return client.list_by_resource_group(resource_group_name=resource_group_name,
|
||||
top=top,
|
||||
top=int(top),
|
||||
skiptoken=skiptoken)
|
||||
return client.list_by_subscription(top=top,
|
||||
return client.list_by_subscription(top=int(top),
|
||||
skiptoken=skiptoken)
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ def managed_network_mn_group_list(client,
|
|||
skiptoken=None):
|
||||
return client.list_by_managed_network(resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
top=top,
|
||||
top=int(top),
|
||||
skiptoken=skiptoken)
|
||||
|
||||
|
||||
|
@ -185,7 +185,7 @@ def managed_network_managed_network_peering_policy_list(client,
|
|||
skiptoken=None):
|
||||
return client.list_by_managed_network(resource_group_name=resource_group_name,
|
||||
managed_network_name=managed_network_name,
|
||||
top=top,
|
||||
top=int(top),
|
||||
skiptoken=skiptoken)
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче