Skip to content

Commit

Permalink
update crossLanguageDefinitionId to fully qualified for operations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft authored Apr 26, 2024
1 parent 4d3d30c commit afc98f0
Show file tree
Hide file tree
Showing 66 changed files with 730 additions and 682 deletions.
20 changes: 20 additions & 0 deletions packages/typespec-python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Release

## 2023-04-26 - 0.23.8

| Library | Min Version |
| ----------------------------------------------------------------------- | ------------- |
| `@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.41.7` |
| `@azure-tools/typespec-client-generator-core` | `0.41.2` |
| `azure-core` dep of generated code | `1.30.0` |
| `corehttp` dep of generated code | `1.0.0b3` |
| `isodate` dep of generated code | `0.6.1` |
| `azure-mgmt-core` dep of generated code (If generating mgmt plane code) | `1.3.2` |
| `typing-extensions` dep of generated code | `4.6.0` |

**Bug Fixes**

- Use fully qualified name for operation `crossLanguageDefinitionId`s in `api_view_mapping_python.json` #2548

## 2023-04-25 - 0.23.7

| Library | Min Version |
Expand Down
6 changes: 3 additions & 3 deletions packages/typespec-python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-python",
"version": "0.23.7",
"version": "0.23.8",
"author": "Microsoft Corporation",
"description": "TypeSpec emitter for Python SDKs",
"homepage": "https://github.com/Azure/autorest.python",
Expand Down Expand Up @@ -45,7 +45,7 @@
"@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.6 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.41.7 <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",
Expand Down Expand Up @@ -78,7 +78,7 @@
"rimraf": "~5.0.0",
"typescript": "~5.1.3",
"@azure-tools/typespec-azure-core": "~0.41.0",
"@azure-tools/typespec-client-generator-core": "~0.41.6",
"@azure-tools/typespec-client-generator-core": "~0.41.7",
"@typespec/compiler": "~0.55.0",
"@typespec/http": "~0.55.0",
"@typespec/rest": "~0.55.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/typespec-python/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
SdkQueryParameter,
SdkServiceMethod,
SdkServiceResponseHeader,
getCrossLanguageDefinitionId,
} from "@azure-tools/typespec-client-generator-core";
import {
camelToSnakeCase,
Expand Down Expand Up @@ -180,7 +179,7 @@ function emitHttpOperation(
apiVersions: [],
wantTracing: true,
exposeStreamKeyword: true,
crossLanguageDefinitionId: method ? getCrossLanguageDefinitionId(method) : undefined,
crossLanguageDefinitionId: method?.crossLanguageDefintionId,
};
if (
result.bodyParameter &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"CrossLanguagePackageId": "Authentication.ApiKey",
"CrossLanguageDefinitionId": {
"authentication.apikey.models.InvalidAuth": "Authentication.ApiKey.InvalidAuth",
"authentication.apikey.ApiKeyClient.valid": "valid",
"authentication.apikey.ApiKeyClient.invalid": "invalid"
"authentication.apikey.ApiKeyClient.valid": "Authentication.ApiKey.valid",
"authentication.apikey.ApiKeyClient.invalid": "Authentication.ApiKey.invalid"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"CrossLanguagePackageId": "Authentication.Http.Custom",
"CrossLanguageDefinitionId": {
"authentication.http.custom.models.InvalidAuth": "Authentication.Http.Custom.InvalidAuth",
"authentication.http.custom.CustomClient.valid": "valid",
"authentication.http.custom.CustomClient.invalid": "invalid"
"authentication.http.custom.CustomClient.valid": "Authentication.Http.Custom.valid",
"authentication.http.custom.CustomClient.invalid": "Authentication.Http.Custom.invalid"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"CrossLanguagePackageId": "Authentication.OAuth2",
"CrossLanguageDefinitionId": {
"authentication.oauth2.models.InvalidAuth": "Authentication.OAuth2.InvalidAuth",
"authentication.oauth2.OAuth2Client.valid": "valid",
"authentication.oauth2.OAuth2Client.invalid": "invalid"
"authentication.oauth2.OAuth2Client.valid": "Authentication.OAuth2.valid",
"authentication.oauth2.OAuth2Client.invalid": "Authentication.OAuth2.invalid"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"CrossLanguagePackageId": "Authentication.Union",
"CrossLanguageDefinitionId": {
"authentication.union.UnionClient.valid_key": "validKey",
"authentication.union.UnionClient.valid_token": "validToken"
"authentication.union.UnionClient.valid_key": "Authentication.Union.validKey",
"authentication.union.UnionClient.valid_token": "Authentication.Union.validToken"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.PublicDecoratorModelInPublic",
"specs.azure.clientgenerator.core.access.models.RealModel": "_Specs_.Azure.ClientGenerator.Core.Access.RelativeModelInOperation.RealModel",
"specs.azure.clientgenerator.core.access.models.SharedModel": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.SharedModel",
"specs.azure.clientgenerator.core.access.AccessClient.public_operation.no_decorator_in_public": "noDecoratorInPublic",
"specs.azure.clientgenerator.core.access.AccessClient.public_operation.public_decorator_in_public": "publicDecoratorInPublic",
"specs.azure.clientgenerator.core.access.AccessClient.shared_model_in_operation.public": "public"
"specs.azure.clientgenerator.core.access.AccessClient.public_operation.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic",
"specs.azure.clientgenerator.core.access.AccessClient.public_operation.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic",
"specs.azure.clientgenerator.core.access.AccessClient.shared_model_in_operation.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"specs.azure.clientgenerator.core.usage.models.InputModel": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.InputModel",
"specs.azure.clientgenerator.core.usage.models.OrphanModel": "_Specs_.Azure.ClientGenerator.Core.Usage.OrphanModel",
"specs.azure.clientgenerator.core.usage.models.OutputModel": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.OutputModel",
"specs.azure.clientgenerator.core.usage.UsageClient.model_in_operation.input_to_input_output": "inputToInputOutput",
"specs.azure.clientgenerator.core.usage.UsageClient.model_in_operation.output_to_input_output": "outputToInputOutput"
"specs.azure.clientgenerator.core.usage.UsageClient.model_in_operation.input_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.inputToInputOutput",
"specs.azure.clientgenerator.core.usage.UsageClient.model_in_operation.output_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.outputToInputOutput"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"specs.azure.core.basic.models.UserListResults": "_Specs_.Azure.Core.Basic.CustomPageModel",
"specs.azure.core.basic.models.UserOrder": "_Specs_.Azure.Core.Basic.UserOrder",
"specs.azure.core.basic.models.ListItemInputExtensibleEnum": "_Specs_.Azure.Core.Basic.ListItemInputExtensibleEnum",
"specs.azure.core.basic.BasicClient.two_models_as_page_item.list_first_item": "listFirstItem",
"specs.azure.core.basic.BasicClient.two_models_as_page_item.list_second_item": "listSecondItem",
"specs.azure.core.basic.BasicClient.create_or_update": "createOrUpdate",
"specs.azure.core.basic.BasicClient.create_or_replace": "createOrReplace",
"specs.azure.core.basic.BasicClient.get": "get",
"specs.azure.core.basic.BasicClient.list": "list",
"specs.azure.core.basic.BasicClient.list_with_page": "listWithPage",
"specs.azure.core.basic.BasicClient.list_with_parameters": "listWithParameters",
"specs.azure.core.basic.BasicClient.list_with_custom_page_model": "listWithCustomPageModel",
"specs.azure.core.basic.BasicClient.delete": "delete",
"specs.azure.core.basic.BasicClient.export": "export"
"specs.azure.core.basic.BasicClient.two_models_as_page_item.list_first_item": "_Specs_.Azure.Core.Basic.TwoModelsAsPageItem.listFirstItem",
"specs.azure.core.basic.BasicClient.two_models_as_page_item.list_second_item": "_Specs_.Azure.Core.Basic.TwoModelsAsPageItem.listSecondItem",
"specs.azure.core.basic.BasicClient.create_or_update": "_Specs_.Azure.Core.Basic.createOrUpdate",
"specs.azure.core.basic.BasicClient.create_or_replace": "_Specs_.Azure.Core.Basic.createOrReplace",
"specs.azure.core.basic.BasicClient.get": "_Specs_.Azure.Core.Basic.get",
"specs.azure.core.basic.BasicClient.list": "_Specs_.Azure.Core.Basic.list",
"specs.azure.core.basic.BasicClient.list_with_page": "_Specs_.Azure.Core.Basic.listWithPage",
"specs.azure.core.basic.BasicClient.list_with_parameters": "_Specs_.Azure.Core.Basic.listWithParameters",
"specs.azure.core.basic.BasicClient.list_with_custom_page_model": "_Specs_.Azure.Core.Basic.listWithCustomPageModel",
"specs.azure.core.basic.BasicClient.delete": "_Specs_.Azure.Core.Basic.delete",
"specs.azure.core.basic.BasicClient.export": "_Specs_.Azure.Core.Basic.export"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"CrossLanguageDefinitionId": {
"specs.azure.core.lro.standard.models.ExportedUser": "_Specs_.Azure.Core.Lro.Standard.ExportedUser",
"specs.azure.core.lro.standard.models.User": "_Specs_.Azure.Core.Lro.Standard.User",
"specs.azure.core.lro.standard.StandardClient.begin_create_or_replace": "createOrReplace",
"specs.azure.core.lro.standard.StandardClient.begin_delete": "delete",
"specs.azure.core.lro.standard.StandardClient.begin_export": "export"
"specs.azure.core.lro.standard.StandardClient.begin_create_or_replace": "_Specs_.Azure.Core.Lro.Standard.createOrReplace",
"specs.azure.core.lro.standard.StandardClient.begin_delete": "_Specs_.Azure.Core.Lro.Standard.delete",
"specs.azure.core.lro.standard.StandardClient.begin_export": "_Specs_.Azure.Core.Lro.Standard.export"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"CrossLanguagePackageId": "_Specs_.Azure.Core.Scalar",
"CrossLanguageDefinitionId": {
"specs.azure.core.scalar.models.AzureLocationModel": "_Specs_.Azure.Core.Scalar.AzureLocationModel",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.get": "get",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.put": "put",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.post": "post",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.header": "header",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.query": "query"
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.get": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.get",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.put": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.put",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.post": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.post",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.header": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.header",
"specs.azure.core.scalar.ScalarClient.azure_location_scalar.query": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.query"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"specs.azure.core.traits.models.UserActionParam": "_Specs_.Azure.Core.Traits.UserActionParam",
"specs.azure.core.traits.models.UserActionResponse": "_Specs_.Azure.Core.Traits.UserActionResponse",
"specs.azure.core.traits.models.RepeatabilityResult": "Azure.Core.RepeatabilityResult",
"specs.azure.core.traits.TraitsClient.smoke_test": "smokeTest",
"specs.azure.core.traits.TraitsClient.repeatable_action": "repeatableAction"
"specs.azure.core.traits.TraitsClient.smoke_test": "_Specs_.Azure.Core.Traits.smokeTest",
"specs.azure.core.traits.TraitsClient.repeatable_action": "_Specs_.Azure.Core.Traits.repeatableAction"
}
}
Loading

0 comments on commit afc98f0

Please sign in to comment.