Skip to content

Commit f7930c8

Browse files
azure-sdkmsyyc
andauthored
code and test (Azure#37183)
Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]>
1 parent 18677f1 commit f7930c8

16 files changed

+24
-10
lines changed
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Release History
22

3-
## 1.0.0b1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
3+
## 1.0.0b1 (2024-09-22)
104

115
### Other Changes
6+
7+
- Initial version
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "28c5000054bf2e8112b5543025a519fa60902503",
2+
"commit": "eea7584434f9225cad0327d83d5c6d84257a4d7d",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/fabric/Microsoft.Fabric.Management",
5-
"@azure-tools/typespec-python": "0.29.0"
5+
"@azure-tools/typespec-python": "0.30.0"
66
}

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_model_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-m
441441
return float(o)
442442
if isinstance(o, enum.Enum):
443443
return o.value
444+
if isinstance(o, int):
445+
if format == "str":
446+
return str(o)
447+
return o
444448
try:
445449
# First try datetime.datetime
446450
return _serialize_datetime(o, format)
@@ -660,6 +664,8 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915,
660664
rf: typing.Optional["_RestField"] = None,
661665
) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]:
662666
if not annotation or annotation in [int, float]:
667+
if annotation is int and rf and rf._format == "str":
668+
return int
663669
return None
664670

665671
# is it a type alias?

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_check_name_availability.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ def main():
3737
print(response)
3838

3939

40+
# x-ms-original-file: 2023-11-01/FabricCapacities_CheckNameAvailability.json
4041
if __name__ == "__main__":
4142
main()

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_create_or_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ def main():
4242
print(response)
4343

4444

45+
# x-ms-original-file: 2023-11-01/FabricCapacities_CreateOrUpdate.json
4546
if __name__ == "__main__":
4647
main()

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_delete.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ def main():
3636
).result()
3737

3838

39+
# x-ms-original-file: 2023-11-01/FabricCapacities_Delete.json
3940
if __name__ == "__main__":
4041
main()

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_get.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ def main():
3737
print(response)
3838

3939

40+
# x-ms-original-file: 2023-11-01/FabricCapacities_Get.json
4041
if __name__ == "__main__":
4142
main()

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_list_by_resource_group.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ def main():
3737
print(item)
3838

3939

40+
# x-ms-original-file: 2023-11-01/FabricCapacities_ListByResourceGroup.json
4041
if __name__ == "__main__":
4142
main()

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_list_by_subscription.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ def main():
3535
print(item)
3636

3737

38+
# x-ms-original-file: 2023-11-01/FabricCapacities_ListBySubscription.json
3839
if __name__ == "__main__":
3940
main()

sdk/fabric/azure-mgmt-fabric/generated_samples/fabric_capacities_list_skus.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ def main():
3535
print(item)
3636

3737

38+
# x-ms-original-file: 2023-11-01/FabricCapacities_ListSkus.json
3839
if __name__ == "__main__":
3940
main()

0 commit comments

Comments
 (0)