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

Skip operations_list by CrossLanguageDefinitionId #5077

Merged
merged 1 commit into from
Sep 20, 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
Expand Up @@ -22,9 +22,8 @@ private static void RemoveInternalOperationFromInputClient(InputClient inputClie
var operationsToKeep = new List<InputOperation>();
foreach (var operation in inputClient.Operations)
{
// "internal" is set only we set access decorator in typespec, default null represents public
// TODO: Skip internal operations for Mgmt, we might need a better way to remove operations, tracking in https://github.com/Azure/typespec-azure/issues/964
if (operation.Accessibility == "public")
// operations_list has been covered in Azure.ResourceManager already, we don't need to generate it in the client
if (operation.CrossLanguageDefinitionId != "Azure.ResourceManager.Operations.list")
live1206 marked this conversation as resolved.
Show resolved Hide resolved
{
operationsToKeep.Add(operation);
}
Expand Down
2 changes: 2 additions & 0 deletions test/TestProjects/MgmtTypeSpec/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ using Azure.ResourceManager;
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
namespace MgmtTypeSpec;

interface Operations extends Azure.ResourceManager.Operations {}

/** The available API versions. */
enum Versions {
/** Azure Cosmos DB for Mongo vCore clusters api version 2024-03-01-preview. */
Expand Down
Loading