@autorest/python 6.17.1 → 6.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,7 +55,7 @@ class BaseType(BaseModel, ABC): # pylint: disable=too-many-public-methods
|
|
|
55
55
|
return self.imports(**kwargs)
|
|
56
56
|
|
|
57
57
|
def imports_for_sample(self) -> FileImport:
|
|
58
|
-
return self.
|
|
58
|
+
return FileImport(self.code_model)
|
|
59
59
|
|
|
60
60
|
@staticmethod
|
|
61
61
|
def serialize_sample_value(value: Any) -> str:
|
|
@@ -381,6 +381,12 @@ class ClientParameter(Parameter):
|
|
|
381
381
|
):
|
|
382
382
|
# this means i am the base url
|
|
383
383
|
return ParameterMethodLocation.KEYWORD_ONLY
|
|
384
|
+
if (
|
|
385
|
+
self.client_default_value is not None
|
|
386
|
+
and self.code_model.options["from_typespec"]
|
|
387
|
+
and not self.code_model.options["azure_arm"]
|
|
388
|
+
):
|
|
389
|
+
return ParameterMethodLocation.KEYWORD_ONLY
|
|
384
390
|
return ParameterMethodLocation.POSITIONAL
|
|
385
391
|
|
|
386
392
|
|
|
@@ -516,7 +516,7 @@ class JinjaSerializer(ReaderAndWriter): # pylint: disable=abstract-method
|
|
|
516
516
|
and operation.api_versions[0] != self.code_model.options["default_api_version"]
|
|
517
517
|
):
|
|
518
518
|
continue
|
|
519
|
-
samples = operation.yaml_data
|
|
519
|
+
samples = operation.yaml_data.get("samples")
|
|
520
520
|
if not samples or operation.name.startswith("_"):
|
|
521
521
|
continue
|
|
522
522
|
for value in samples.values():
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autorest/python",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.18.0",
|
|
4
4
|
"description": "The Python extension for generators in AutoRest.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@microsoft.azure/autorest.testserver": "^3.3.46",
|
|
27
27
|
"typescript": "~5.1.3",
|
|
28
|
-
"@azure-tools/typespec-python": "^0.
|
|
28
|
+
"@azure-tools/typespec-python": "^0.28.0"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"autorest/**/*.py",
|
|
Binary file
|