- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.1k
[AutoPR azure-resourcemanager-keyvault]-generated-from-SDK Generation - Java-5500355 #47100
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
base: main
Are you sure you want to change the base?
[AutoPR azure-resourcemanager-keyvault]-generated-from-SDK Generation - Java-5500355 #47100
Conversation
….yaml', API Version: 2025-05-01, SDK Release Type: stable, and CommitSHA: '0cb64d42641af4650a90a716afc321b3f0cb4057' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5500355 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
| API Change CheckAPIView identified API level changes in this PR and created the following API reviews | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codegen issue logged: Azure/autorest.java#1861 (comment)
| String us = generateRandomResourceName("us", 20); | ||
| ServicePrincipal servicePrincipal | ||
| = authorizationManager.servicePrincipals().define(sp).withNewApplication().create(); | ||
| // String sp = generateRandomResourceName("sp", 20); | ||
| // String us = generateRandomResourceName("us", 20); | ||
| // issue: https://github.com/Azure/azure-sdk-for-java/issues/47117 | ||
| // ServicePrincipal servicePrincipal | ||
| // = authorizationManager.servicePrincipals().define(sp).withNewApplication().create(); | ||
|  | ||
| ActiveDirectoryUser user | ||
| = authorizationManager.users().define(us).withEmailAlias(us).withPassword(password()).create(); | ||
| // Status code 403, "{"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation." | ||
| // ActiveDirectoryUser user | ||
| // = authorizationManager.users().define(us).withEmailAlias(us).withPassword(password()).create(); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to tests are mostly about this.
- Applicationneeds an additional- serviceTreeIDparameter: [FEATURE REQ] mgmt, authorization, support creating Application with serviceTreeID #47117
- We don't have permission to create AAD user anymore.
| revapi error is not related to mgmt libraries | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Azure Key Vault resource manager library from AutoRest to TypeSpec code generation, migrating from API version 2024-11-01 to 2025-05-01. The changes are primarily auto-generated code updates.
- Updated code generator from AutoRest to TypeSpec
- Updated API version from 2024-11-01 to 2025-05-01
- Simplified example file references in sample code (removing full specification paths)
- Added new test files for generated models
- Modified test cases to use empty access policies instead of user/service principal-based policies
- Updated module-info.java to expose implementation.models package
Reviewed Changes
Copilot reviewed 169 out of 288 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description | 
|---|---|
| Sample files (43 files) | Updated code generator reference and simplified x-ms-original-file paths | 
| Test files (80+ new files) | Added comprehensive test coverage for model serialization/deserialization | 
| VaultTests.java | Modified to use empty access policies, commented out user/service principal code | 
| Sku.java | Removed default value initialization for family field | 
| ServiceSpecification.java | Changed from @fluent to @immutable, made constructor private, removed setters | 
| PrivateLinkResource.java | Changed from Resource to ProxyResource base class, added SystemData field | 
| PrivateEndpointConnectionsPutHeaders.java | Changed to @immutable with final fields, removed setters | 
| Reason.java | Changed from enum to ExpandableStringEnum | 
| ProvisioningState.java | Added JavaDoc comments for enum values | 
| tsp-location.yaml | New file specifying TypeSpec source location | 
| module-info.java | Opened implementation.models package to azure.core | 
| Metadata and package-info files | Updated generator references and descriptions | 
| * SKU family name | ||
| */ | ||
| private SkuFamily family = SkuFamily.A; | ||
| private SkuFamily family; | 
    
      
    
      Copilot
AI
    
    
    
      Oct 31, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the default value SkuFamily.A from the family field is a breaking change. Previously, this field had a default value, but now it will be null until explicitly set. This could break existing code that relies on the default value being present. Consider documenting this breaking change in the CHANGELOG and ensuring backward compatibility is addressed.
| * Creates an instance of ServiceSpecification class. | ||
| */ | ||
| public ServiceSpecification() { | ||
| private ServiceSpecification() { | 
    
      
    
      Copilot
AI
    
    
    
      Oct 31, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the constructor from public to private is a breaking change that prevents instantiation of this class by consumers. This appears intentional as the class is now marked @immutable, but this should be documented as a breaking change in the CHANGELOG.
| * The Retry-After property. | ||
| */ | ||
| private Integer retryAfter; | ||
| private final Integer retryAfter; | 
    
      
    
      Copilot
AI
    
    
    
      Oct 31, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting mutable fields to final fields and removing setters is a breaking change. Code that previously used withRetryAfter() or withAzureAsyncOperation() methods will no longer compile. This breaking change should be documented in the CHANGELOG.
| * The Azure-AsyncOperation property. | ||
| */ | ||
| private String azureAsyncOperation; | ||
| private final String azureAsyncOperation; | 
    
      
    
      Copilot
AI
    
    
    
      Oct 31, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting mutable fields to final fields and removing setters is a breaking change. Code that previously used withRetryAfter() or withAzureAsyncOperation() methods will no longer compile. This breaking change should be documented in the CHANGELOG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeSpec maybe wrong. We should not have retryAfter header for non-LRO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the secret data-plane lib, I think this is not LRO. And typically should not have this header in such API.
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/SecretClientImpl.java#L158-L178
Configurations: 'specification/keyvault/KeyVault.Management/tspconfig.yaml', API Version: 2025-05-01, SDK Release Type: stable, and CommitSHA: '0cb64d42641af4650a90a716afc321b3f0cb4057' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5500355 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.