diff --git a/.chronus/changes/python-diff-upstream-skill-2026-02-26-14-34-52.md b/.chronus/changes/python-diff-upstream-skill-2026-02-26-14-34-52.md new file mode 100644 index 00000000000..60b253a4639 --- /dev/null +++ b/.chronus/changes/python-diff-upstream-skill-2026-02-26-14-34-52.md @@ -0,0 +1,8 @@ +--- +changeKind: internal +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Add diff-upstream skill for comparing generated code against autorest.python baseline diff --git a/.chronus/changes/python-flatten-property-tests-2026-3-2-7-34-49.md b/.chronus/changes/python-flatten-property-tests-2026-3-2-7-34-49.md new file mode 100644 index 00000000000..da83e903013 --- /dev/null +++ b/.chronus/changes/python-flatten-property-tests-2026-3-2-7-34-49.md @@ -0,0 +1,8 @@ +--- +changeKind: internal +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Add test cases for flatten property with unknown type and read-only properties scenarios. diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index bb03af02461..2594729406a 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md", "dependencies": { - "@typespec/http-client-python": "~0.27.2", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "^4.21.0" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} +} \ No newline at end of file diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index eed02793b23..9ecac9c5509 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -49,7 +49,7 @@ ], "peerDependencies": { "@typespec/compiler": "^1.9.0", - "@typespec/http": "^1.9.1", + "@typespec/http": "^1.9.0", "@typespec/rest": ">=0.79.0 <1.0.0", "@typespec/versioning": ">=0.79.0 <1.0.0", "@typespec/openapi": "^1.9.0", @@ -67,12 +67,12 @@ "js-yaml": "~4.1.0", "semver": "~7.6.2", "tsx": "^4.21.0", - "@typespec/http-client-python": "~0.27.2", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { "@typespec/compiler": "^1.9.0", - "@typespec/http": "^1.9.1", + "@typespec/http": "^1.9.0", "@typespec/rest": "~0.79.0", "@typespec/versioning": "~0.79.0", "@typespec/openapi": "^1.9.0", @@ -86,7 +86,7 @@ "@azure-tools/typespec-azure-rulesets": "~0.65.0", "@azure-tools/typespec-autorest": "~0.65.0", "@azure-tools/typespec-client-generator-core": "~0.65.3", - "@azure-tools/azure-http-specs": "0.1.0-alpha.38-dev.2", + "@azure-tools/azure-http-specs": "0.1.0-alpha.38-dev.4", "@typespec/http-specs": "0.1.0-alpha.33-dev.2", "@typespec/spector": "0.1.0-alpha.23", "@typespec/spec-api": "0.1.0-alpha.12", @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} +} \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/apiview-properties.json index 4fc450681ad..e0f596444f4 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/apiview-properties.json @@ -4,10 +4,17 @@ "specs.azure.clientgenerator.core.flattenproperty.models.ChildFlattenModel": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.ChildFlattenModel", "specs.azure.clientgenerator.core.flattenproperty.models.ChildModel": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.ChildModel", "specs.azure.clientgenerator.core.flattenproperty.models.FlattenModel": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.FlattenModel", + "specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.FlattenUnknownModel", "specs.azure.clientgenerator.core.flattenproperty.models.NestedFlattenModel": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.NestedFlattenModel", + "specs.azure.clientgenerator.core.flattenproperty.models.Solution": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.Solution", + "specs.azure.clientgenerator.core.flattenproperty.models.SolutionProperties": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.SolutionProperties", "specs.azure.clientgenerator.core.flattenproperty.FlattenPropertyClient.put_flatten_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenModel", "specs.azure.clientgenerator.core.flattenproperty.aio.FlattenPropertyClient.put_flatten_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenModel", "specs.azure.clientgenerator.core.flattenproperty.FlattenPropertyClient.put_nested_flatten_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putNestedFlattenModel", - "specs.azure.clientgenerator.core.flattenproperty.aio.FlattenPropertyClient.put_nested_flatten_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putNestedFlattenModel" + "specs.azure.clientgenerator.core.flattenproperty.aio.FlattenPropertyClient.put_nested_flatten_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putNestedFlattenModel", + "specs.azure.clientgenerator.core.flattenproperty.FlattenPropertyClient.put_flatten_unknown_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenUnknownModel", + "specs.azure.clientgenerator.core.flattenproperty.aio.FlattenPropertyClient.put_flatten_unknown_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenUnknownModel", + "specs.azure.clientgenerator.core.flattenproperty.FlattenPropertyClient.put_flatten_read_only_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenReadOnlyModel", + "specs.azure.clientgenerator.core.flattenproperty.aio.FlattenPropertyClient.put_flatten_read_only_model": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenReadOnlyModel" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property.py index 8563ebaa3b4..9a36a269fc7 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property.py @@ -33,3 +33,29 @@ def test_put_nested_flatten_model(self, flattenproperty_endpoint): # please add some check logic here by yourself # ... + + @FlattenPropertyPreparer() + @recorded_by_proxy + def test_put_flatten_unknown_model(self, flattenproperty_endpoint): + client = self.create_client(endpoint=flattenproperty_endpoint) + response = client.put_flatten_unknown_model( + input={"name": "str", "properties": {}}, + ) + + # please add some check logic here by yourself + # ... + + @FlattenPropertyPreparer() + @recorded_by_proxy + def test_put_flatten_read_only_model(self, flattenproperty_endpoint): + client = self.create_client(endpoint=flattenproperty_endpoint) + response = client.put_flatten_read_only_model( + body={ + "name": "str", + "properties": {"content": "str", "solutionId": "str", "title": "str"}, + "propertiesOptional": {"content": "str", "solutionId": "str", "title": "str"}, + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property_async.py index 93a1b1b5eff..c4e60a6ae47 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property_async.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/generated_tests/test_flatten_property_async.py @@ -34,3 +34,29 @@ async def test_put_nested_flatten_model(self, flattenproperty_endpoint): # please add some check logic here by yourself # ... + + @FlattenPropertyPreparer() + @recorded_by_proxy_async + async def test_put_flatten_unknown_model(self, flattenproperty_endpoint): + client = self.create_async_client(endpoint=flattenproperty_endpoint) + response = await client.put_flatten_unknown_model( + input={"name": "str", "properties": {}}, + ) + + # please add some check logic here by yourself + # ... + + @FlattenPropertyPreparer() + @recorded_by_proxy_async + async def test_put_flatten_read_only_model(self, flattenproperty_endpoint): + client = self.create_async_client(endpoint=flattenproperty_endpoint) + response = await client.put_flatten_read_only_model( + body={ + "name": "str", + "properties": {"content": "str", "solutionId": "str", "title": "str"}, + "propertiesOptional": {"content": "str", "solutionId": "str", "title": "str"}, + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py index 76c9f18bd8f..5452ea688d6 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/_operations.py @@ -76,6 +76,44 @@ def build_flatten_property_put_nested_flatten_model_request( # pylint: disable= return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) +def build_flatten_property_put_flatten_unknown_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/azure/client-generator-core/flatten-property/flattenUnknownModel" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_flatten_property_put_flatten_read_only_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/azure/client-generator-core/flatten-property/flattenReadOnlyModel" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + class _FlattenPropertyClientOperationsMixin( ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], FlattenPropertyClientConfiguration] ): @@ -319,3 +357,243 @@ def put_nested_flatten_model( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + + @overload + def put_flatten_unknown_model( + self, input: _models.FlattenUnknownModel, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Required. + :type input: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put_flatten_unknown_model( + self, input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Required. + :type input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put_flatten_unknown_model( + self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Required. + :type input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put_flatten_unknown_model( + self, input: Union[_models.FlattenUnknownModel, JSON, IO[bytes]], **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Is one of the following types: FlattenUnknownModel, JSON, IO[bytes] Required. + :type input: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel or + JSON or IO[bytes] + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.FlattenUnknownModel] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(input, (IOBase, bytes)): + _content = input + else: + _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_flatten_property_put_flatten_unknown_model_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.FlattenUnknownModel, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put_flatten_read_only_model( + self, body: _models.Solution, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Required. + :type body: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put_flatten_read_only_model( + self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put_flatten_read_only_model( + self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put_flatten_read_only_model( + self, body: Union[_models.Solution, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Is one of the following types: Solution, JSON, IO[bytes] Required. + :type body: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution or JSON or + IO[bytes] + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Solution] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_flatten_property_put_flatten_read_only_model_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Solution, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py index 91eee5f0fda..49c64d6790b 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/_operations.py @@ -30,6 +30,8 @@ from ... import models as _models from ..._operations._operations import ( build_flatten_property_put_flatten_model_request, + build_flatten_property_put_flatten_read_only_model_request, + build_flatten_property_put_flatten_unknown_model_request, build_flatten_property_put_nested_flatten_model_request, ) from ..._utils.model_base import SdkJSONEncoder, _deserialize @@ -284,3 +286,243 @@ async def put_nested_flatten_model( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + + @overload + async def put_flatten_unknown_model( + self, input: _models.FlattenUnknownModel, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Required. + :type input: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put_flatten_unknown_model( + self, input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Required. + :type input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put_flatten_unknown_model( + self, input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Required. + :type input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put_flatten_unknown_model( + self, input: Union[_models.FlattenUnknownModel, JSON, IO[bytes]], **kwargs: Any + ) -> _models.FlattenUnknownModel: + """put_flatten_unknown_model. + + :param input: Is one of the following types: FlattenUnknownModel, JSON, IO[bytes] Required. + :type input: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel or + JSON or IO[bytes] + :return: FlattenUnknownModel. The FlattenUnknownModel is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.FlattenUnknownModel + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.FlattenUnknownModel] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(input, (IOBase, bytes)): + _content = input + else: + _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_flatten_property_put_flatten_unknown_model_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.FlattenUnknownModel, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put_flatten_read_only_model( + self, body: _models.Solution, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Required. + :type body: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put_flatten_read_only_model( + self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put_flatten_read_only_model( + self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put_flatten_read_only_model( + self, body: Union[_models.Solution, JSON, IO[bytes]], **kwargs: Any + ) -> _models.Solution: + """put_flatten_read_only_model. + + :param body: Is one of the following types: Solution, JSON, IO[bytes] Required. + :type body: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution or JSON or + IO[bytes] + :return: Solution. The Solution is compatible with MutableMapping + :rtype: ~specs.azure.clientgenerator.core.flattenproperty.models.Solution + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Solution] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_flatten_property_put_flatten_read_only_model_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Solution, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/__init__.py index 5315d18dff9..542f2f4a23d 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/__init__.py @@ -17,7 +17,10 @@ ChildFlattenModel, ChildModel, FlattenModel, + FlattenUnknownModel, NestedFlattenModel, + Solution, + SolutionProperties, ) from ._patch import __all__ as _patch_all from ._patch import * @@ -27,7 +30,10 @@ "ChildFlattenModel", "ChildModel", "FlattenModel", + "FlattenUnknownModel", "NestedFlattenModel", + "Solution", + "SolutionProperties", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py index ee3f100ca2d..c87d2d08edd 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/models/_models.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- # pylint: disable=useless-super-delegation -from typing import Any, Mapping, TYPE_CHECKING, overload +from typing import Any, Mapping, Optional, TYPE_CHECKING, overload from .._utils.model_base import Model as _Model, rest_field @@ -154,6 +154,58 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) +class FlattenUnknownModel(_Model): + """This is the model with unknown type properties to be flattened. + + :ivar name: Required. + :vartype name: str + :ivar properties: + :vartype properties: any + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Required.""" + properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + __flattened_items = [""] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + class NestedFlattenModel(_Model): """This is the model with two levels of flattening. @@ -185,3 +237,80 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) + + +class Solution(_Model): + """This is the model with flattened properties that are all read-only. + + :ivar name: Required. + :vartype name: str + :ivar properties: Required. + :vartype properties: + ~specs.azure.clientgenerator.core.flattenproperty.models.SolutionProperties + :ivar properties_optional: + :vartype properties_optional: + ~specs.azure.clientgenerator.core.flattenproperty.models.SolutionProperties + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Required.""" + properties: "_models.SolutionProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Required.""" + properties_optional: Optional["_models.SolutionProperties"] = rest_field( + name="propertiesOptional", visibility=["read", "create", "update", "delete", "query"] + ) + + __flattened_items = ["solution_id", "title", "content", "solution_id", "title", "content"] + + @overload + def __init__( + self, + *, + name: str, + properties: "_models.SolutionProperties", + properties_optional: Optional["_models.SolutionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SolutionProperties(_Model): + """This is the model with all read-only properties to be flattened. + + :ivar solution_id: + :vartype solution_id: str + :ivar title: + :vartype title: str + :ivar content: + :vartype content: str + """ + + solution_id: Optional[str] = rest_field(name="solutionId", visibility=["read"]) + title: Optional[str] = rest_field(visibility=["read"]) + content: Optional[str] = rest_field(visibility=["read"]) diff --git a/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py b/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py index fe2f64f13db..b0c6c4786df 100644 --- a/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py +++ b/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py @@ -6,10 +6,12 @@ import pytest from specs.azure.clientgenerator.core.flattenproperty.aio import FlattenPropertyClient from specs.azure.clientgenerator.core.flattenproperty.models import ( - FlattenModel, + ChildFlattenModel, ChildModel, + FlattenModel, + FlattenUnknownModel, NestedFlattenModel, - ChildFlattenModel, + Solution, ) @@ -46,6 +48,22 @@ async def test_put_nested_flatten_model(client: FlattenPropertyClient): ) +@pytest.mark.asyncio +async def test_put_flatten_unknown_model(client: FlattenPropertyClient): + result = await client.put_flatten_unknown_model(FlattenUnknownModel(name="foo")) + assert result.name == "test" + assert result.properties == {"key1": "value1", "key2": "value2"} + + +@pytest.mark.asyncio +async def test_put_flatten_read_only_model(client: FlattenPropertyClient): + result = await client.put_flatten_read_only_model(Solution({"name": "foo"})) + assert result.name == "foo" + assert result["solutionId"] == "solution1" + assert result["title"] == "Solution Title" + assert result["content"] == "Solution Content" + + @pytest.mark.asyncio # ============test for compatibility ============ async def test_dpg_model_common(): flatten_model = FlattenModel(name="hello", properties=ChildModel(age=0, description="test")) diff --git a/packages/typespec-python/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py b/packages/typespec-python/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py index b1492f524ad..e90308509a2 100644 --- a/packages/typespec-python/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py +++ b/packages/typespec-python/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py @@ -6,10 +6,12 @@ import pytest from specs.azure.clientgenerator.core.flattenproperty import FlattenPropertyClient from specs.azure.clientgenerator.core.flattenproperty.models import ( - FlattenModel, + ChildFlattenModel, ChildModel, + FlattenModel, + FlattenUnknownModel, NestedFlattenModel, - ChildFlattenModel, + Solution, ) @@ -41,6 +43,20 @@ def test_put_nested_flatten_model(client: FlattenPropertyClient): ) +def test_put_flatten_unknown_model(client: FlattenPropertyClient): + result = client.put_flatten_unknown_model(FlattenUnknownModel(name="foo")) + assert result.name == "test" + assert result.properties == {"key1": "value1", "key2": "value2"} + + +def test_put_flatten_read_only_model(client: FlattenPropertyClient): + result = client.put_flatten_read_only_model(Solution({"name": "foo"})) + assert result.name == "foo" + assert result["solutionId"] == "solution1" + assert result["title"] == "Solution Title" + assert result["content"] == "Solution Content" + + # ============test for compatibility ============ def test_dpg_model_common(): flatten_model = FlattenModel(name="hello", properties=ChildModel(age=0, description="test")) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a212eacb12d..e3301643c9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: ~0.27.2 - version: 0.27.2(sjuqmbhka3ctg7d4p66zqqaix4) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz(sjuqmbhka3ctg7d4p66zqqaix4) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: ~0.27.2 - version: 0.27.2(sjuqmbhka3ctg7d4p66zqqaix4) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz(sjuqmbhka3ctg7d4p66zqqaix4) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -98,8 +98,8 @@ importers: version: 4.21.0 devDependencies: '@azure-tools/azure-http-specs': - specifier: 0.1.0-alpha.38-dev.2 - version: 0.1.0-alpha.38-dev.2(hnj6frj7evimbkzzvgztepttvq) + specifier: 0.1.0-alpha.38-dev.4 + version: 0.1.0-alpha.38-dev.4(hnj6frj7evimbkzzvgztepttvq) '@azure-tools/typespec-autorest': specifier: ~0.65.0 version: 0.65.0(pqg7vsrbtnqcusmn36y4aubeqq) @@ -137,7 +137,7 @@ importers: specifier: ~0.79.0 version: 0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)) '@typespec/http': - specifier: ^1.9.1 + specifier: ^1.9.0 version: 1.9.1(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))) '@typespec/http-specs': specifier: 0.1.0-alpha.33-dev.2 @@ -212,8 +212,8 @@ packages: resolution: {integrity: sha512-T21naRb6JDdjjn2s/zwr9iCIv/9jviL/PRtiWAhi+3UA2WKH2wrId2VqJa4uVD7iEV8BLkuGgFmMkaMBG26hFw==} engines: {node: '>=12.0.0'} - '@azure-tools/azure-http-specs@0.1.0-alpha.38-dev.2': - resolution: {integrity: sha512-rrxSHv70c5d9ZZQRN1xZ849/vzAFM7uHEkpjSNtKBBkx/6/2J2arSiltk4OP6xE/lqHPVPeANzbYQsL4b4wNZw==} + '@azure-tools/azure-http-specs@0.1.0-alpha.38-dev.4': + resolution: {integrity: sha512-RcMWlJoH/ZfFXR4X/nZ/L6siNDtYylYERikcF23JbJ1/SrYsFIS3IpdG4E1YlEMwwfgolL31CDM32+d6g+AViQ==} engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-azure-core': ^0.65.0 || >=0.66.0-dev <0.66.0 @@ -1725,8 +1725,9 @@ packages: peerDependencies: '@typespec/compiler': ^1.9.0 - '@typespec/http-client-python@0.27.2': - resolution: {integrity: sha512-isxYqnflUIla/M8TWRtIajoHLft7pQm0izw+f8aRqtH33/FQ7UeZ6MD4aPu0U8Xsnt8giJ+3zyQOLucBGezsFA==} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz} + version: 0.27.2 engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-autorest': '>=0.65.0 <1.0.0' @@ -5002,7 +5003,7 @@ snapshots: command-exists: 1.2.9 semver: 7.6.3 - '@azure-tools/azure-http-specs@0.1.0-alpha.38-dev.2(hnj6frj7evimbkzzvgztepttvq)': + '@azure-tools/azure-http-specs@0.1.0-alpha.38-dev.4(hnj6frj7evimbkzzvgztepttvq)': dependencies: '@azure-tools/typespec-azure-core': 0.65.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.1(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.1(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))) '@typespec/compiler': 1.9.0(@types/node@25.0.10) @@ -6712,7 +6713,7 @@ snapshots: dependencies: '@typespec/compiler': 1.9.0(@types/node@25.0.10) - '@typespec/http-client-python@0.27.2(sjuqmbhka3ctg7d4p66zqqaix4)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTk0NTcxMS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.2.tgz(sjuqmbhka3ctg7d4p66zqqaix4)': dependencies: '@azure-tools/typespec-autorest': 0.65.0(pqg7vsrbtnqcusmn36y4aubeqq) '@azure-tools/typespec-azure-core': 0.65.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.1(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.1(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))))