-
Notifications
You must be signed in to change notification settings - Fork 2.1k
mgmt, local generation for Cosmos DB 2025-04-15 Stable SDK #45273
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?
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
API change check API changes are not detected in this pull request. |
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 Cosmos DB SDK to the 2025-04-15 Stable release by regenerating the code based on the latest swagger spec and adjusting model definitions. Key changes include:
- Disabling tests that rely on local authentication methods.
- Refactoring model classes (e.g., SqlDedicatedGatewayServiceResourceProperties, MaterializedViewsBuilderServiceResourceProperties, DataTransferServiceResourceProperties) to use fluent setters for properties like creationTime and status.
- Introducing a new FullTextPolicy model along with its integration in SqlContainerResource and related classes, and updating API version references in the client implementation and assets.
Reviewed Changes
Copilot reviewed 204 out of 204 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
CosmosDBTests.java | Disabled several tests that use local authentication methods. |
SqlDedicatedGatewayServiceResourceProperties.java, MaterializedViewsBuilderServiceResourceProperties.java, DataTransferServiceResourceProperties.java, GraphApiComputeServiceResourceProperties.java | Removed legacy fields and refactored property assignments to use fluent setters. |
SqlContainerResource.java, SqlContainerGetPropertiesResource.java, RestorableSqlContainerPropertiesResourceContainer.java | Integrated new FullTextPolicy support with corresponding JSON serialization/deserialization and validation logic. |
FullTextPolicy.java, FullTextPath.java | Added new models for handling full text search features in Cosmos DB. |
CosmosDBManagementClientImpl.java, assets.json, CHANGELOG.md, api-specs.json | Updated API version references and related metadata. |
Comments suppressed due to low confidence (2)
sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java:67
- Disabling tests for local authentication may reduce coverage for those scenarios. Consider adding alternative tests or documentation to ensure that local authentication behavior is adequately tested in other environments.
@Disabled("Local authentication methods are not allowed.")
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlContainerResource.java:420
- Since the FullTextPolicy integration is new, ensure there are comprehensive unit tests covering its serialization and deserialization to confirm consistent behavior across model classes.
jsonWriter.writeJsonField("fullTextPolicy", this.fullTextPolicy);
@@ -64,6 +64,7 @@ protected void cleanUpResources() { | |||
} | |||
|
|||
@Test | |||
@Disabled("Local authentication methods are not allowed.") |
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.
Find some way to enable the test then.
e.g. try portal to see what one can 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.
I see it reverted.
What is the cause of prior problem?
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 Cosmos DB management SDK to the 2025-04-15 stable API version with local generation and introduces fullTextPolicy support in container resource models while removing direct status and creationTime fields in favor of fluent setters.
- Removed direct fields (status, creationTime) from several service resource properties and replaced assignments with fluent setters.
- Added fullTextPolicy support (getter, setter, validation, and JSON serialization/deserialization) to container resource models.
- Updated the apiVersion in the management client and api-specs, and adjusted CHANGELOG accordingly.
Reviewed Changes
Copilot reviewed 202 out of 202 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlDedicatedGatewayServiceResourceProperties.java | Removed status and creationTime fields; updated JSON deserialization to use fluent setters. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlContainerResource.java | Added fullTextPolicy field and its getter, setter, JSON serialization/deserialization, and validation. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlContainerGetPropertiesResource.java | Extended fullTextPolicy support via fluent setter and updated JSON methods. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/RestorableSqlContainerPropertiesResourceContainer.java | Introduced fullTextPolicy fluent setter and integrated validation and JSON updates. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/MaterializedViewsBuilderServiceResourceProperties.java | Removed status and creationTime; updated deserialization to use fluent setters. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/GraphApiComputeServiceResourceProperties.java | Similar removal of direct fields with updates to use fluent setters in JSON deserialization. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/FullTextPolicy.java | New file implementing the full text policy model with appropriate JSON support and validation. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/FullTextPath.java | New file representing full text path specs with validation and JSON methods. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/DataTransferServiceResourceProperties.java | Removed obsolete fields; updated deserialization to use fluent setters. |
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBManagementClientImpl.java | Updated apiVersion from 2024-11-15 to 2025-04-15. |
sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md | Updated CHANGELOG to reflect the apiVersion change and other modifications. |
sdk/resourcemanager/api-specs.json | Updated generation arguments to use the new apiVersion. |
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines