Skip to content
Draft
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,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Additional fixes to documentation with bullet points
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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQ0ODI4Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQ2NzMzNS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "~4.19.1"
Expand Down
2 changes: 1 addition & 1 deletion 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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQ0ODI4Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQ2NzMzNS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz",
"fs-extra": "~11.2.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}.
Expand All @@ -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"
}.
Expand All @@ -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"
}.
Expand All @@ -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"
}.
Expand Down Expand Up @@ -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"
}.
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}.
Expand All @@ -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"
}.
Expand All @@ -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"
}.
Expand All @@ -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"
}.
Expand Down Expand Up @@ -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"
}.
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ class RepeatabilityResult(str, Enum, metaclass=CaseInsensitiveEnumMeta):
REJECTED = "rejected"
"""If the request was rejected because the combination of Repeatability-First-Sent and
Repeatability-Request-ID were invalid
or because the Repeatability-First-Sent value was outside the range of values held by the
or because the Repeatability-First-Sent value was outside the range of values held by the
server."""
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
"""Test that we can use @client and @operationGroup decorators to customize client side code
structure, such as:

1. have everything as default.
2. to rename client or operation group
3. one client can have more than one operations groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
"""Test that we can use @client and @operationGroup decorators to customize client side code
structure, such as:

1. have everything as default.
2. to rename client or operation group
3. one client can have more than one operations groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@
class ResiliencyServiceDrivenClient(_ResiliencyServiceDrivenClientOperationsMixin):
"""Test that we can grow up a service spec and service deployment into a multi-versioned service
with full client support.

There are three concepts that should be clarified:

1. Client spec version: refers to the spec that the client is generated from. 'v1' is a client
generated from old.tsp and 'v2' is a client generated from main.tsp.
2. Service deployment version: refers to a deployment version of the service. 'v1' represents
the initial deployment of the service with a single api version. 'v2' represents the new
deployment of a service with multiple api versions
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
with api version v1
* A client generated from the second service spec can call the second deployment of a service
with api version v2.
with api version v2.

:param endpoint: Need to be set as '`http://localhost:3000 <http://localhost:3000>`_' in
client. Required.
Expand Down
Loading
Loading