Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tcgc] remove unused overloads and overloading from method #511

Merged
merged 3 commits into from
Mar 25, 2024
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
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
Loading