diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py index f3d321347d..88bb949f0a 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py @@ -547,7 +547,9 @@ def __init__(self, *args, **kwargs) -> None: async def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel: """Expected query parameter: name="Madge" Expected response body: + .. code-block:: json + { "name": "Madge", "inner": @@ -615,7 +617,9 @@ async def _operation(self, *, name: str, **kwargs: Any) -> _models._models.Outer async def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.AbstractModel: """Expected query parameter: kind="real" Expected response body: + .. code-block:: json + { "name": "Madge", "kind": "real" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py index 2479811207..901011e64d 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py @@ -716,7 +716,9 @@ def __init__(self, *args, **kwargs) -> None: def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel: """Expected query parameter: name="Madge" Expected response body: + .. code-block:: json + { "name": "Madge", "inner": @@ -784,7 +786,9 @@ def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel: def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.AbstractModel: """Expected query parameter: kind="real" Expected response body: + .. code-block:: json + { "name": "Madge", "kind": "real" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py index 31d782e70a..b843525db5 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py @@ -64,7 +64,9 @@ async def input_to_input_output( self, body: _models.InputModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -82,7 +84,9 @@ async def input_to_input_output( @overload async def input_to_input_output(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -102,7 +106,9 @@ async def input_to_input_output( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -120,7 +126,9 @@ async def input_to_input_output( @distributed_trace_async async def input_to_input_output(self, body: Union[_models.InputModel, JSON, IO[bytes]], **kwargs: Any) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -180,7 +188,9 @@ async def input_to_input_output(self, body: Union[_models.InputModel, JSON, IO[b @distributed_trace_async async def output_to_input_output(self, **kwargs: Any) -> _models.OutputModel: """Expected response body: + .. code-block:: json + { "name": "Madge" }. @@ -242,12 +252,18 @@ async def model_in_read_only_property( self, body: _models.RoundTripModel, *, content_type: str = "application/json", **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -269,12 +285,18 @@ async def model_in_read_only_property( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -296,12 +318,18 @@ async def model_in_read_only_property( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -323,12 +351,18 @@ async def model_in_read_only_property( self, body: Union[_models.RoundTripModel, JSON, IO[bytes]], **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -402,8 +436,11 @@ async def model_in_read_only_property( @distributed_trace_async async def orphan_model_serializable(self, body: Any, **kwargs: Any) -> None: """Serialize the 'OrphanModel' as request body. + Expected body parameter: + .. code-block:: json + { "name": "name", "desc": "desc" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py index cb5318bf59..5e468d7938 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py @@ -127,7 +127,9 @@ def input_to_input_output( self, body: _models.InputModel, *, content_type: str = "application/json", **kwargs: Any ) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -145,7 +147,9 @@ def input_to_input_output( @overload def input_to_input_output(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -163,7 +167,9 @@ def input_to_input_output(self, body: JSON, *, content_type: str = "application/ @overload def input_to_input_output(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -183,7 +189,9 @@ def input_to_input_output( # pylint: disable=inconsistent-return-statements self, body: Union[_models.InputModel, JSON, IO[bytes]], **kwargs: Any ) -> None: """Expected body parameter: + .. code-block:: json + { "name": "Madge" }. @@ -243,7 +251,9 @@ def input_to_input_output( # pylint: disable=inconsistent-return-statements @distributed_trace def output_to_input_output(self, **kwargs: Any) -> _models.OutputModel: """Expected response body: + .. code-block:: json + { "name": "Madge" }. @@ -305,12 +315,18 @@ def model_in_read_only_property( self, body: _models.RoundTripModel, *, content_type: str = "application/json", **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -332,12 +348,18 @@ def model_in_read_only_property( self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -359,12 +381,18 @@ def model_in_read_only_property( self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -386,12 +414,18 @@ def model_in_read_only_property( self, body: Union[_models.RoundTripModel, JSON, IO[bytes]], **kwargs: Any ) -> _models.RoundTripModel: """ "ResultModel" should be usage=output, as it is read-only and does not exist in request body. + Expected body parameter: + .. code-block:: json + { } + Expected response body: + .. code-block:: json + { "result": { "name": "Madge" @@ -467,8 +501,11 @@ def orphan_model_serializable( # pylint: disable=inconsistent-return-statements self, body: Any, **kwargs: Any ) -> None: """Serialize the 'OrphanModel' as request body. + Expected body parameter: + .. code-block:: json + { "name": "name", "desc": "desc" diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py index 585b0f9346..2dfbc0f4a6 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py @@ -31,10 +31,10 @@ class ResiliencyServiceDrivenClient(_ResiliencyServiceDrivenClientOperationsMixi 3. Api version: The initial deployment of the service only supports api version 'v1'. The new deployment of the service supports api versions 'v1' and 'v2'. We test the following configurations from this service spec: - * A client generated from the second service spec can call the second deployment of a service - with api version v1 - * A client generated from the second service spec can call the second deployment of a service - with api version v2. + * A client generated from the second service spec can call the second deployment of a + service with api version v1 + * A client generated from the second service spec can call the second deployment of a + service with api version v2. :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py index 8fc360c0c5..77ebc4cd15 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py @@ -31,10 +31,10 @@ class ResiliencyServiceDrivenClient(_ResiliencyServiceDrivenClientOperationsMixi 3. Api version: The initial deployment of the service only supports api version 'v1'. The new deployment of the service supports api versions 'v1' and 'v2'. We test the following configurations from this service spec: - * A client generated from the second service spec can call the second deployment of a service - with api version v1 - * A client generated from the second service spec can call the second deployment of a service - with api version v2. + * A client generated from the second service spec can call the second deployment of a + service with api version v1 + * A client generated from the second service spec can call the second deployment of a + service with api version v2. :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py index ec8c2dd238..965680234e 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py @@ -20,10 +20,12 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword - """Scenarios to verify that reserved words can be used in service and generators will handle it - appropriately. + """Scenarios to verify that reserved words can be used in service and generators will handle it appropriately. + Current list of special words + .. code-block:: txt + and as assert diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py index 1c6efa8dd0..5d06f69b5d 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py @@ -20,10 +20,12 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword - """Scenarios to verify that reserved words can be used in service and generators will handle it - appropriately. + """Scenarios to verify that reserved words can be used in service and generators will handle it appropriately. + Current list of special words + .. code-block:: txt + and as assert diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py index 7e48378100..91d1593a03 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py @@ -15,10 +15,12 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword - """Scenarios to verify that reserved words can be used in service and generators will handle it - appropriately. + """Scenarios to verify that reserved words can be used in service and generators will handle it appropriately. + Current list of special words + .. code-block:: txt + and as assert diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py index ee64925ce2..b9ab2daddd 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py @@ -15,10 +15,12 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword - """Scenarios to verify that reserved words can be used in service and generators will handle it - appropriately. + """Scenarios to verify that reserved words can be used in service and generators will handle it appropriately. + Current list of special words + .. code-block:: txt + and as assert