Skip to content
Merged
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"
---

Order keyword-only args overload first in generated operations
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": "~0.6.5",
"@typespec/http-client-python": "~0.6.6",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "~4.19.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
"""This is a fake class to support current implementation of MultiApiClientMixin."
Will be removed in final version of multiapi azure-core based client
"""
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
"""This is a fake class to support current implementation of MultiApiClientMixin."
Will be removed in final version of multiapi azure-core based client
"""
pass
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 @@ -60,7 +60,7 @@
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
"tsx": "~4.19.1",
"@typespec/http-client-python": "~0.6.5",
"@typespec/http-client-python": "~0.6.6",
"fs-extra": "~11.2.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")

@overload
async def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
async def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
"""simple.

:param body: Required.
:type body: JSON
:keyword name: Required.
:paramtype name: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -188,11 +188,11 @@ async def simple(self, body: JSON, *, content_type: str = "application/json", **
"""

@overload
async def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
async def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
"""simple.

:keyword name: Required.
:paramtype name: str
: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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ def __init__(self, *args, **kwargs):
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")

@overload
def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
"""simple.

:param body: Required.
:type body: JSON
:keyword name: Required.
:paramtype name: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -220,11 +220,11 @@ def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs
"""

@overload
def simple(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
def simple(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
"""simple.

:keyword name: Required.
:paramtype name: str
: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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,11 @@ async def required_explicit(self, body: Union[_models.BodyModel, JSON, IO[bytes]
return cls(pipeline_response, None, {}) # type: ignore

@overload
async def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
async def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
"""required_implicit.

:param body: Required.
:type body: JSON
:keyword name: Required.
:paramtype name: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -393,11 +393,11 @@ async def required_implicit(self, body: JSON, *, content_type: str = "applicatio
"""

@overload
async def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
async def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
"""required_implicit.

:keyword name: Required.
:paramtype name: str
: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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ def required_explicit( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, {}) # type: ignore

@overload
def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
"""required_implicit.

:param body: Required.
:type body: JSON
:keyword name: Required.
:paramtype name: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -446,11 +446,11 @@ def required_implicit(self, body: JSON, *, content_type: str = "application/json
"""

@overload
def required_implicit(self, *, name: str, content_type: str = "application/json", **kwargs: Any) -> None:
def required_implicit(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
"""required_implicit.

:keyword name: Required.
:paramtype name: str
: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
Expand Down
Loading
Loading