App Configuration - Added Description#49351
Open
mrm9084 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the App Configuration data-plane library to surface the service’s new description field on key-values and snapshots, along with the supporting field-selection enums and (de)serialization plumbing, after updating the pinned REST API spec commit.
Changes:
- Update the pinned
azure-rest-api-specscommit and regenerate metadata to the2026-04-01API version. - Add
descriptionsupport acrossConfigurationSetting/ConfigurationSnapshotmodels, field enums (SettingFields/SnapshotFields), and internal conversion/deserialization helpers. - Extend tests and test helpers to include
descriptionin assertions/comparisons.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/appconfiguration/azure-data-appconfiguration/tsp-location.yaml | Updates the pinned REST API spec commit for regeneration. |
| sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/implementation/ConfigurationSettingDeserializerTest.java | Adds a unit test ensuring KeyValue.description is propagated to ConfigurationSetting, and updates assertions to compare description. |
| sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java | Updates test helpers to carry/compare description when cleaning responses and checking equality. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/resources/META-INF/azure-data-appconfiguration_metadata.json | Regenerated metadata reflecting the new API version and generated surface. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SnapshotFields.java | Adds SnapshotFields.DESCRIPTION for selecting the snapshot description field. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SettingFields.java | Adds SettingFields.DESCRIPTION for selecting the key-value description field. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSnapshot.java | Adds description field with getters/setters plus JSON (de)serialization support. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/ConfigurationSetting.java | Adds description field with getters/setters plus JSON (de)serialization support. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Utility.java | Propagates ConfigurationSetting.description into generated KeyValue requests. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/SnapshotFields.java | Adds generated SnapshotFields.DESCRIPTION (internal model). |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/Snapshot.java | Adds generated snapshot description with JSON (de)serialization (internal model). |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueFields.java | Adds generated KeyValueFields.DESCRIPTION (internal model). |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java | Adds generated key-value description with JSON (de)serialization (internal model). |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationSettingDeserializationHelper.java | Copies KeyValue.description into ConfigurationSetting during translation from generated models. |
| sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationClientImpl.java | Updates generated API docs to include description in model shapes. |
| sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md | Documents the new description properties and field constants. |
| sdk/appconfiguration/azure-data-appconfiguration/assets.json | Updates the test assets tag for the package. |
Comment on lines
283
to
+287
| setting.setReadOnly(reader.getBoolean()); | ||
| } else if ("tags".equals(fieldName)) { | ||
| setting.setTags(reader.readMap(JsonReader::getString)); | ||
| } else if ("description".equals(fieldName)) { | ||
| setting.setDescription(reader.getString()); |
Comment on lines
+212
to
+230
| /** | ||
| * Gets the description of this configuration setting. | ||
| * | ||
| * @return The description of this configuration setting. | ||
| */ | ||
| public String getDescription() { | ||
| return description; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the description of this configuration setting. | ||
| * | ||
| * @param description The description of this configuration setting. | ||
| * @return The updated ConfigurationSetting object. | ||
| */ | ||
| public ConfigurationSetting setDescription(String description) { | ||
| this.description = description; | ||
| return this; | ||
| } |
Comment on lines
+61
to
+66
| @Test | ||
| public void descriptionIsCopiedFromKeyValue() { | ||
| final String description = "the description"; | ||
| final KeyValue keyValue = new KeyValue().setKey(KEY).setValue(SETTING_VALUE).setDescription(description); | ||
| assertEquals(description, toConfigurationSetting(keyValue).getDescription()); | ||
| } |
Comment on lines
3
to
+8
| ## 1.10.0-beta.1 (Unreleased) | ||
|
|
||
| ### Features Added | ||
|
|
||
| - Added `checkConfigurationSettings` method to `ConfigurationClient` and `ConfigurationAsyncClient` that performs HEAD requests to efficiently check if configuration settings have changed by comparing page-level ETags without retrieving the full response body. | ||
| - Added `description` property to `ConfigurationSetting` and `ConfigurationSnapshot`, along with corresponding `DESCRIPTION` values on `SettingFields` and `SnapshotFields`. |
Comment on lines
293
to
+300
| public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { | ||
| jsonWriter.writeStartObject(); | ||
| jsonWriter.writeArrayField("filters", this.filters, (writer, element) -> writer.writeJson(element)); | ||
| jsonWriter.writeStringField("composition_type", | ||
| this.snapshotComposition == null ? null : this.snapshotComposition.toString()); | ||
| jsonWriter.writeNumberField("retention_period", this.retentionPeriod); | ||
| jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); | ||
| jsonWriter.writeStringField("description", this.description); |
Comment on lines
79
to
+83
| .setLabel(label) | ||
| .setContentType(contentType) | ||
| .setETag(etag) | ||
| .setTags(tags); | ||
| .setTags(tags) | ||
| .setDescription(keyValue.getDescription()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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