Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

[python] ensure first line in param description wrap around is a space
2 changes: 1 addition & 1 deletion packages/autorest.python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
"dependencies": {
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTM4Nzg0Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.18.1.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTM5NzQ4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.18.1.tgz",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "~4.19.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/typespec-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
"tsx": "~4.19.1",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTM4Nzg0Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.18.1.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTM5NzQ4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.18.1.tgz",
"fs-extra": "~11.2.0"
},
"devDependencies": {
Expand All @@ -86,7 +86,7 @@
"@azure-tools/typespec-azure-rulesets": "~0.60.0",
"@azure-tools/typespec-autorest": "~0.60.0",
"@azure-tools/typespec-client-generator-core": "~0.60.2",
"@azure-tools/azure-http-specs": "0.1.0-alpha.29",
"@azure-tools/azure-http-specs": "0.1.0-alpha.30-dev.5",
"@typespec/http-specs": "0.1.0-alpha.26",
"@typespec/spector": "0.1.0-alpha.18",
"@typespec/spec-api": "0.1.0-alpha.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"specs.azure.clientgenerator.core.override.operations.ReorderParametersOperations.reorder": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters.reorder",
"specs.azure.clientgenerator.core.override.aio.operations.ReorderParametersOperations.reorder": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters.reorder",
"specs.azure.clientgenerator.core.override.operations.GroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group",
"specs.azure.clientgenerator.core.override.aio.operations.GroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group"
"specs.azure.clientgenerator.core.override.aio.operations.GroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group",
"specs.azure.clientgenerator.core.override.operations.RequireOptionalParameterOperations.require_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter.requireOptional",
"specs.azure.clientgenerator.core.override.aio.operations.RequireOptionalParameterOperations.require_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter.requireOptional",
"specs.azure.clientgenerator.core.override.operations.RemoveOptionalParameterOperations.remove_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter.removeOptional",
"specs.azure.clientgenerator.core.override.aio.operations.RemoveOptionalParameterOperations.remove_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter.removeOptional"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import pytest
from devtools_testutils import recorded_by_proxy
from testpreparer import OverrideClientTestBase, OverridePreparer


@pytest.mark.skip("you may need to update the auto-generated test case before run it")
class TestOverrideRemoveOptionalParameterOperations(OverrideClientTestBase):
@OverridePreparer()
@recorded_by_proxy
def test_remove_optional_parameter_remove_optional(self, override_endpoint):
client = self.create_client(endpoint=override_endpoint)
response = client.remove_optional_parameter.remove_optional(
param1="str",
)

# please add some check logic here by yourself
# ...
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import pytest
from devtools_testutils.aio import recorded_by_proxy_async
from testpreparer import OverridePreparer
from testpreparer_async import OverrideClientTestBaseAsync


@pytest.mark.skip("you may need to update the auto-generated test case before run it")
class TestOverrideRemoveOptionalParameterOperationsAsync(OverrideClientTestBaseAsync):
@OverridePreparer()
@recorded_by_proxy_async
async def test_remove_optional_parameter_remove_optional(self, override_endpoint):
client = self.create_async_client(endpoint=override_endpoint)
response = await client.remove_optional_parameter.remove_optional(
param1="str",
)

# please add some check logic here by yourself
# ...
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import pytest
from devtools_testutils import recorded_by_proxy
from testpreparer import OverrideClientTestBase, OverridePreparer


@pytest.mark.skip("you may need to update the auto-generated test case before run it")
class TestOverrideRequireOptionalParameterOperations(OverrideClientTestBase):
@OverridePreparer()
@recorded_by_proxy
def test_require_optional_parameter_require_optional(self, override_endpoint):
client = self.create_client(endpoint=override_endpoint)
response = client.require_optional_parameter.require_optional(
param1="str",
param2="str",
)

# please add some check logic here by yourself
# ...
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import pytest
from devtools_testutils.aio import recorded_by_proxy_async
from testpreparer import OverridePreparer
from testpreparer_async import OverrideClientTestBaseAsync


@pytest.mark.skip("you may need to update the auto-generated test case before run it")
class TestOverrideRequireOptionalParameterOperationsAsync(OverrideClientTestBaseAsync):
@OverridePreparer()
@recorded_by_proxy_async
async def test_require_optional_parameter_require_optional(self, override_endpoint):
client = self.create_async_client(endpoint=override_endpoint)
response = await client.require_optional_parameter.require_optional(
param1="str",
param2="str",
)

# please add some check logic here by yourself
# ...
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

from ._configuration import OverrideClientConfiguration
from ._utils.serialization import Deserializer, Serializer
from .operations import GroupParametersOperations, ReorderParametersOperations
from .operations import (
GroupParametersOperations,
RemoveOptionalParameterOperations,
ReorderParametersOperations,
RequireOptionalParameterOperations,
)


class OverrideClient: # pylint: disable=client-accepts-api-version-keyword
Expand All @@ -28,6 +33,12 @@ class OverrideClient: # pylint: disable=client-accepts-api-version-keyword
:ivar group_parameters: GroupParametersOperations operations
:vartype group_parameters:
specs.azure.clientgenerator.core.override.operations.GroupParametersOperations
:ivar require_optional_parameter: RequireOptionalParameterOperations operations
:vartype require_optional_parameter:
specs.azure.clientgenerator.core.override.operations.RequireOptionalParameterOperations
:ivar remove_optional_parameter: RemoveOptionalParameterOperations operations
:vartype remove_optional_parameter:
specs.azure.clientgenerator.core.override.operations.RemoveOptionalParameterOperations
:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
"""
Expand Down Expand Up @@ -66,6 +77,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
self.group_parameters = GroupParametersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.require_optional_parameter = RequireOptionalParameterOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.remove_optional_parameter = RemoveOptionalParameterOperations(
self._client, self._config, self._serialize, self._deserialize
)

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

from .._utils.serialization import Deserializer, Serializer
from ._configuration import OverrideClientConfiguration
from .operations import GroupParametersOperations, ReorderParametersOperations
from .operations import (
GroupParametersOperations,
RemoveOptionalParameterOperations,
ReorderParametersOperations,
RequireOptionalParameterOperations,
)


class OverrideClient: # pylint: disable=client-accepts-api-version-keyword
Expand All @@ -28,6 +33,12 @@ class OverrideClient: # pylint: disable=client-accepts-api-version-keyword
:ivar group_parameters: GroupParametersOperations operations
:vartype group_parameters:
specs.azure.clientgenerator.core.override.aio.operations.GroupParametersOperations
:ivar require_optional_parameter: RequireOptionalParameterOperations operations
:vartype require_optional_parameter:
specs.azure.clientgenerator.core.override.aio.operations.RequireOptionalParameterOperations
:ivar remove_optional_parameter: RemoveOptionalParameterOperations operations
:vartype remove_optional_parameter:
specs.azure.clientgenerator.core.override.aio.operations.RemoveOptionalParameterOperations
:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
"""
Expand Down Expand Up @@ -66,6 +77,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
self.group_parameters = GroupParametersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.require_optional_parameter = RequireOptionalParameterOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.remove_optional_parameter = RemoveOptionalParameterOperations(
self._client, self._config, self._serialize, self._deserialize
)

def send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

from ._operations import ReorderParametersOperations # type: ignore
from ._operations import GroupParametersOperations # type: ignore
from ._operations import RequireOptionalParameterOperations # type: ignore
from ._operations import RemoveOptionalParameterOperations # type: ignore

from ._patch import __all__ as _patch_all
from ._patch import *
Expand All @@ -22,6 +24,8 @@
__all__ = [
"ReorderParametersOperations",
"GroupParametersOperations",
"RequireOptionalParameterOperations",
"RemoveOptionalParameterOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Loading
Loading