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
7 changes: 7 additions & 0 deletions .chronus/changes/update_tcgc-2024-4-9-16-55-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: dependencies
packages:
- "@azure-tools/typespec-python"
---

bump tcgc to 0.42.1
44 changes: 22 additions & 22 deletions packages/typespec-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
"get-autorest-python-path.cjs"
],
"peerDependencies": {
"@azure-tools/typespec-azure-core": ">=0.41.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.41.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.41.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.41.8 <1.0.0",
"@typespec/compiler": ">=0.55.0 <1.0.0",
"@typespec/http": ">=0.55.0 <1.0.0",
"@typespec/rest": ">=0.55.0 <1.0.0",
"@typespec/versioning": ">=0.55.0 <1.0.0",
"@typespec/openapi": ">=0.55.0 <1.0.0"
"@azure-tools/typespec-azure-core": ">=0.42.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.42.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.42.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.42.2 <1.0.0",
"@typespec/compiler": ">=0.56.0 <1.0.0",
"@typespec/http": ">=0.56.0 <1.0.0",
"@typespec/rest": ">=0.56.0 <1.0.0",
"@typespec/versioning": ">=0.56.0 <1.0.0",
"@typespec/openapi": ">=0.56.0 <1.0.0"
},
"dependenciesMeta": {
"@azure-tools/typespec-client-generator-core": {
Expand All @@ -60,28 +60,28 @@
"dependencies": {
"@autorest/python": "workspace:^",
"js-yaml": "~4.1.0",
"@typespec/openapi3": "~0.55.0"
"@typespec/openapi3": "~0.56.0"
},
"devDependencies": {
"@azure-tools/typespec-azure-resource-manager": "~0.41.0",
"@azure-tools/typespec-autorest": "~0.41.0",
"@azure-tools/cadl-ranch-expect": "~0.13.3",
"@azure-tools/cadl-ranch-specs": "~0.33.2",
"@azure-tools/typespec-azure-resource-manager": "~0.42.0",
"@azure-tools/typespec-autorest": "~0.42.0",
"@azure-tools/cadl-ranch-expect": "~0.13.4",
"@azure-tools/cadl-ranch-specs": "~0.33.4",
"@types/js-yaml": "~4.0.5",
"@types/mocha": "~10.0.1",
"@types/node": "^18.16.3",
"@typespec/eslint-config-typespec": "~0.55.0",
"@typespec/openapi": "~0.55.0",
"@typespec/openapi": "~0.56.0",
"c8": "~7.13.0",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"mocha": "~10.2.0",
"rimraf": "~5.0.0",
"typescript": "~5.1.3",
"@azure-tools/typespec-azure-core": "~0.41.0",
"@azure-tools/typespec-client-generator-core": "~0.41.8",
"@typespec/compiler": "~0.55.0",
"@typespec/http": "~0.55.0",
"@typespec/rest": "~0.55.0",
"@typespec/versioning": "~0.55.0"
"@azure-tools/typespec-azure-core": "~0.42.0",
"@azure-tools/typespec-client-generator-core": "~0.42.2",
"@typespec/compiler": "~0.56.0",
"@typespec/http": "~0.56.0",
"@typespec/rest": "~0.56.0",
"@typespec/versioning": "~0.56.0"
}
}
9 changes: 7 additions & 2 deletions packages/typespec-python/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,13 @@ export function getAddedOn<TServiceOperation extends SdkServiceOperation>(
context: PythonSdkContext<TServiceOperation>,
type: SdkModelPropertyType | SdkMethod<TServiceOperation>,
): string | undefined {
// We only want added on if it's not the same as the client's added on
if (type.apiVersions[0] === context.experimental_sdkPackage.clients[0].apiVersions[0]) return undefined;
// since we do not support multi-service for now, we can just check the root client's api version
// if type is added in the first version of the client, we do not need to add the versioning info
if (
type.apiVersions[0] ===
context.experimental_sdkPackage.clients.find((c) => c.initialization.access === "public")?.apiVersions[0]
)
return undefined;
return type.apiVersions[0];
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading