diff --git a/autorest/codegen/templates/metadata.json.jinja2 b/autorest/codegen/templates/metadata.json.jinja2 index f682bc60268..11f8da77585 100644 --- a/autorest/codegen/templates/metadata.json.jinja2 +++ b/autorest/codegen/templates/metadata.json.jinja2 @@ -50,18 +50,16 @@ }, "operation_mixins": { {% for operation in mixin_operations %} - {{ operation.name | tojson }} : { + {% set operation_name = "begin_" + operation.name if is_lro(operation) else operation.name %} + {{ operation_name | tojson }} : { "sync": { - {% set sync_operation_name = "begin_" + operation.name if is_lro(operation) else operation.name %} {% set sync_return_type_wrapper = "LROPoller" if is_lro(operation) else ("ItemPaged" if is_paging(operation) else "") %} - "operation_name": {{ sync_operation_name | tojson }}, - "signature": {{ op_tools.method_signature(operation, sync_operation_name, False, False, sync_return_type_wrapper) | tojson }} + "signature": {{ op_tools.method_signature(operation, operation_name, False, False, sync_return_type_wrapper) | tojson }} }, "async": { {% set coroutine = False if is_paging(operation) else True %} - {% set async_return_type_wrapper = "AsyncItemPaged" if is_paging(operation) else "" %} - "operation_name": {{ operation.name | tojson }}, - "signature": {{ op_tools.method_signature(operation, operation.name, True, coroutine, async_return_type_wrapper) | tojson }}, + {% set async_return_type_wrapper = "AsyncLROPoller" if is_lro(operation) else ("AsyncItemPaged" if is_paging(operation) else "") %} + "signature": {{ op_tools.method_signature(operation, operation_name, True, coroutine, async_return_type_wrapper) | tojson }}, "coroutine": {{ coroutine | tojson }} }, "doc": {{ op_tools.operation_docstring(operation) | tojson }}, diff --git a/autorest/multiapi/__init__.py b/autorest/multiapi/__init__.py index 3b0e5fe2014..07a7ae64b18 100644 --- a/autorest/multiapi/__init__.py +++ b/autorest/multiapi/__init__.py @@ -103,8 +103,8 @@ def there_is_a_rt_that_contains_api_version(rt_dict, api_version): # Operations at client level versioned_dict.update( { - operation_metadata[sync_or_async]["operation_name"]: operation_metadata[sync_or_async]["available_apis"] - for operation_metadata in mixin_operations.values() + operation_name: operation_metadata[sync_or_async]["available_apis"] + for operation_name, operation_metadata in mixin_operations.items() } ) for operation, api_versions_list in versioned_dict.items(): @@ -181,13 +181,11 @@ def _build_operation_mixin_meta(self, paths_to_versions: List[Path]) -> Dict[str mixin_operations.setdefault(func_name, {}).setdefault('async', {}) mixin_operations[func_name]['sync'].update({ "signature": func['sync']['signature'], - "operation_name": func['sync']['operation_name'], "doc": func['doc'], "call": func['call'] }) mixin_operations[func_name]['async'].update({ "signature": func['async']['signature'], - "operation_name": func['async']['operation_name'], "coroutine": func['async']['coroutine'], "doc": func['doc'], "call": func['call'] diff --git a/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 b/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 index cf50ce67016..2c7e500697c 100644 --- a/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 +++ b/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 @@ -16,11 +16,11 @@ from msrest import Serializer, Deserializer class {{ client_name }}OperationsMixin(object): -{% for _, metadata_sync_and_async in mixin_operations|dictsort %} +{% for operation_name, metadata_sync_and_async in mixin_operations|dictsort %} {% set metadata = metadata_sync_and_async['async'] if async_mode else metadata_sync_and_async['sync'] %} {{ metadata['signature'] | indent }} {{ metadata['doc'] | indent(8) }} - api_version = self._get_api_version('{{ metadata['operation_name'] }}') + api_version = self._get_api_version('{{ operation_name }}') {% for api in metadata['available_apis']|sort %} {% set if_statement = "if" if loop.first else "elif" %} {{ if_statement }} api_version == '{{ mod_to_api_version[api] }}': @@ -33,5 +33,5 @@ class {{ client_name }}OperationsMixin(object): mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return {{ "await " if async_mode and metadata['coroutine'] else "" }}mixin_instance.{{ metadata['operation_name'] }}({{ metadata['call'] }}{{ ", **kwargs" if metadata['call'] else "**kwargs" }}) + return {{ "await " if async_mode and metadata['coroutine'] else "" }}mixin_instance.{{ operation_name }}({{ metadata['call'] }}{{ ", **kwargs" if metadata['call'] else "**kwargs" }}) {% endfor %} \ No newline at end of file diff --git a/test/multiapi/AcceptanceTests/asynctests/multiapi_base.py b/test/multiapi/AcceptanceTests/asynctests/multiapi_base.py index 249ca0ae36b..23fec594ef0 100644 --- a/test/multiapi/AcceptanceTests/asynctests/multiapi_base.py +++ b/test/multiapi/AcceptanceTests/asynctests/multiapi_base.py @@ -181,7 +181,8 @@ async def test_version_two_operation_group_two(self, client): @pytest.mark.parametrize('api_version', ["1.0.0"]) @pytest.mark.asyncio async def test_lro(self, client, namespace_models): - product = await client.test_lro(namespace_models.Product()) + poller = await client.begin_test_lro(namespace_models.Product()) + product = await poller.result() assert product.id == 100 @pytest.mark.asyncio diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_multiapi_service_client_async.py b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_multiapi_service_client_async.py index fec9d8babb4..dfa13e5b3c0 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_multiapi_service_client_async.py +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_multiapi_service_client_async.py @@ -49,7 +49,7 @@ class MultiapiServiceClient(MultiapiServiceClientOperationsMixin, MultiApiClient LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'test_lro': '1.0.0', + 'begin_test_lro': '1.0.0', 'test_one': '2.0.0', }}, _PROFILE_TAG + " latest" diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py index 2643b77915a..a4af9a328a8 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py @@ -20,11 +20,11 @@ class MultiapiServiceClientOperationsMixin(object): - async def test_lro( + async def begin_test_lro( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put. @@ -34,7 +34,7 @@ async def test_lro( :rtype: ~multiapi.v1.models.Product or None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('test_lro') + api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': from ..v1.aio.operations_async import MultiapiServiceClientOperationsMixin as OperationClass else: @@ -44,7 +44,7 @@ async def test_lro( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.test_lro(product, **kwargs) + return await mixin_instance.begin_test_lro(product, **kwargs) async def test_one( self, diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json index 5ae7064e457..0082bc1ecd8 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json @@ -37,11 +37,9 @@ "operation_mixins": { "test_one" : { "sync": { - "operation_name": "test_one", "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_one", "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e None:\n", "coroutine": true }, @@ -50,25 +48,21 @@ }, "_test_lro_initial" : { "sync": { - "operation_name": "_test_lro_initial", "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "_test_lro_initial", "signature": "async def _test_lro_initial(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e \"models.Product\":\n", "coroutine": true }, "doc": " \"\"\"\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapi.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" }, - "test_lro" : { + "begin_test_lro" : { "sync": { - "operation_name": "begin_test_lro", "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_lro", - "signature": "async def test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e \"models.Product\":\n", + "signature": "async def begin_test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.Product\"]:\n", "coroutine": true }, "doc": " \"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapi.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json index 7f4d71d3487..bcfd8aaf876 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json @@ -38,11 +38,9 @@ "operation_mixins": { "test_one" : { "sync": { - "operation_name": "test_one", "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_one", "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e \"models.ModelTwo\":\n", "coroutine": true }, diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json index ce561fbf18f..5953fe8f741 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json @@ -38,11 +38,9 @@ "operation_mixins": { "test_paging" : { "sync": { - "operation_name": "test_paging", "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_paging", "signature": "def test_paging(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.PagingResult\"]:\n", "coroutine": false }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json index 4af2a4e2659..b47ebb898b9 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json @@ -37,11 +37,9 @@ "operation_mixins": { "test_one" : { "sync": { - "operation_name": "test_one", "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_one", "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e None:\n", "coroutine": true }, @@ -50,25 +48,21 @@ }, "_test_lro_initial" : { "sync": { - "operation_name": "_test_lro_initial", "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "_test_lro_initial", "signature": "async def _test_lro_initial(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e \"models.Product\":\n", "coroutine": true }, "doc": " \"\"\"\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapinoasync.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" }, - "test_lro" : { + "begin_test_lro" : { "sync": { - "operation_name": "begin_test_lro", "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_lro", - "signature": "async def test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e \"models.Product\":\n", + "signature": "async def begin_test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.Product\"]:\n", "coroutine": true }, "doc": " \"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapinoasync.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json index b981a3ced91..0323f54a015 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json @@ -38,11 +38,9 @@ "operation_mixins": { "test_one" : { "sync": { - "operation_name": "test_one", "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_one", "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e \"models.ModelTwo\":\n", "coroutine": true }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json index e0b2353be92..40e1a20d0fa 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json @@ -38,11 +38,9 @@ "operation_mixins": { "test_paging" : { "sync": { - "operation_name": "test_paging", "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_paging", "signature": "def test_paging(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.PagingResult\"]:\n", "coroutine": false }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_multiapi_service_client_async.py b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_multiapi_service_client_async.py index c8d71d4fcfe..ce5870e503a 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_multiapi_service_client_async.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_multiapi_service_client_async.py @@ -49,7 +49,7 @@ class MultiapiServiceClient(MultiapiServiceClientOperationsMixin, MultiApiClient LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'test_lro': '1.0.0', + 'begin_test_lro': '1.0.0', 'test_one': '2.0.0', }}, _PROFILE_TAG + " latest" diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py index 11552e376da..b8844971c34 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py @@ -20,11 +20,11 @@ class MultiapiServiceClientOperationsMixin(object): - async def test_lro( + async def begin_test_lro( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put. @@ -34,7 +34,7 @@ async def test_lro( :rtype: ~multiapiwithsubmodule.submodule.v1.models.Product or None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('test_lro') + api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': from ..v1.aio.operations_async import MultiapiServiceClientOperationsMixin as OperationClass else: @@ -44,7 +44,7 @@ async def test_lro( mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.test_lro(product, **kwargs) + return await mixin_instance.begin_test_lro(product, **kwargs) async def test_one( self, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json index 4df1f0d992d..bb1d74396e0 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json @@ -37,11 +37,9 @@ "operation_mixins": { "test_one" : { "sync": { - "operation_name": "test_one", "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_one", "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e None:\n", "coroutine": true }, @@ -50,25 +48,21 @@ }, "_test_lro_initial" : { "sync": { - "operation_name": "_test_lro_initial", "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "_test_lro_initial", "signature": "async def _test_lro_initial(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e \"models.Product\":\n", "coroutine": true }, "doc": " \"\"\"\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" }, - "test_lro" : { + "begin_test_lro" : { "sync": { - "operation_name": "begin_test_lro", "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_lro", - "signature": "async def test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e \"models.Product\":\n", + "signature": "async def begin_test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.Product\"]:\n", "coroutine": true }, "doc": " \"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json index b2a215b7d33..0450cf993d7 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json @@ -38,11 +38,9 @@ "operation_mixins": { "test_one" : { "sync": { - "operation_name": "test_one", "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_one", "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e \"models.ModelTwo\":\n", "coroutine": true }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json index e21e9254f01..bee6b022a45 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json @@ -38,11 +38,9 @@ "operation_mixins": { "test_paging" : { "sync": { - "operation_name": "test_paging", "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n" }, "async": { - "operation_name": "test_paging", "signature": "def test_paging(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.PagingResult\"]:\n", "coroutine": false },