Skip to content

[Deprecate]: deprecate apiVersion in ClientOptions from core-client-rest #29883

Open
Azure/autorest.typescript
#2561

Description

Package Name

@azure-rest/core-client

Deprecated Versions

none

Deprecation Message

not sure yet?

Why is deprecation necessary?

It's not about deprecating the whole package. Currently, we put apiVersion in the ClientOptions in core client rest https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client-rest/src/common.ts#L331 and have a apiVersionPolicy to append the apiVersion query parameter that customer passes in the clientOptions https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client-rest/src/apiVersionPolicy.ts#L14, however, not every operation inside a client has apiVersion parameter and even if it has, it may not be a query parameter, this is especially true for non Azure services, currently, we have add https://github.com/Azure/autorest.typescript/blob/81e09d148e33ce8d24e1746a7913782e621b8f6c/packages/typespec-ts/test/integration/generated/type/scalar/src/scalarClient.ts#L34 remove this policy logic and log a warning here to reduce customers confusion.

But we should actually get rid of apiVersion here as discussed here Azure/autorest.typescript#2427 (comment) and generate it in the client level and add the policy here if this client really does support client level apiVersion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions