Skip to content

Commit

Permalink
[tcgc] remove unused overloads and overloading from method (Azure#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft authored Mar 25, 2024
1 parent 1fb08b7 commit 4a4c377
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: deprecation
packages:
- "@azure-tools/typespec-client-generator-core"
---

Remove support for unused `.overloads` and `.overloading` on `SdkMethod`
4 changes: 0 additions & 4 deletions packages/typespec-client-generator-core/doc/types.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,6 @@ alias SdkServiceParameter = SdkQueryServiceParameter | SdkHeaderServiceParameter
* @property parameters: Parameters object for the method
* @property description: Description of the operation
* @property details: Optional details of the operation
* @property overloads: Any overloads of this method
* @property overloading: The method that this method overloads
*/
@discriminator("kind")
model SdkMethod {
Expand All @@ -541,8 +539,6 @@ model SdkMethod {
parameters: SdkMethodParameter[];
description?: string;
details?: string;
overloads?: SdkMethod[];
overloading?: SdkMethod;
}

/**
Expand Down
9 changes: 3 additions & 6 deletions packages/typespec-client-generator-core/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,20 +451,18 @@ export interface SdkHttpOperation extends SdkServiceOperationBase {
export type SdkServiceOperation = SdkHttpOperation;
export type SdkServiceParameter = SdkHttpParameter;

interface SdkMethodBase<TServiceOperation extends SdkServiceOperation> {
interface SdkMethodBase {
__raw?: Operation;
name: string;
access: AccessFlags | undefined;
parameters: SdkParameter[];
apiVersions: string[];
description?: string;
details?: string;
overloads?: SdkMethod<TServiceOperation>[];
overloading?: SdkMethod<TServiceOperation>;
}

interface SdkServiceMethodBase<TServiceOperation extends SdkServiceOperation>
extends SdkMethodBase<TServiceOperation> {
extends SdkMethodBase {
getParameterMapping(serviceParam: SdkServiceParameter): SdkModelPropertyType[];
operation: TServiceOperation;
parameters: SdkMethodParameter[];
Expand Down Expand Up @@ -515,8 +513,7 @@ export type SdkServiceMethod<TServiceOperation extends SdkServiceOperation> =
| SdkLroPagingServiceMethod<TServiceOperation>
| SdkLroPagingServiceMethod<TServiceOperation>;

interface SdkClientAccessor<TServiceOperation extends SdkServiceOperation>
extends SdkMethodBase<TServiceOperation> {
interface SdkClientAccessor<TServiceOperation extends SdkServiceOperation> extends SdkMethodBase {
kind: "clientaccessor";
response: SdkClientType<TServiceOperation>;
}
Expand Down
1 change: 0 additions & 1 deletion packages/typespec-client-generator-core/src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ function getSdkBasicServiceMethod<
parameters: methodParameters.filter((x) => !x.isApiVersionParam),
description: getDocHelper(context, operation).description,
details: getDocHelper(context, operation).details,
overloads: [],
operation: serviceOperation,
response,
apiVersions: getAvailableApiVersions(context, operation),
Expand Down

0 comments on commit 4a4c377

Please sign in to comment.