Skip to content

Conversation

zhiyuanliang-ms
Copy link
Member

Packages impacted by this PR

@azure/app-configuration

Issues associated with this PR

Describe the problem that is addressed by this PR

Support new snapshot reference type

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@Copilot Copilot AI review requested due to automatic review settings October 2, 2025 17:16
@github-actions github-actions bot added the App Configuration Azure.ApplicationModel.Configuration label Oct 2, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 adds support for snapshot references in the Azure App Configuration SDK, introducing a new configuration setting type alongside existing feature flags and secret references.

Key Changes:

  • Adds new SnapshotReferenceValue type and supporting infrastructure
  • Implements parsing, serialization, and type checking utilities for snapshot references
  • Updates existing type definitions to include the new snapshot reference type

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/snapshotReference.ts Core implementation with types, helper functions, and content type definition
src/models.ts Updated generic type constraints to include SnapshotReferenceValue
src/internal/jsonModels.ts Added JsonSnapshotReferenceValue interface for serialization
src/internal/helpers.ts Added serialization logic for snapshot reference settings
src/appConfigurationClient.ts Updated method signatures to support snapshot reference parameters
src/index.ts Exported new snapshot reference utilities
test/public/snapshotReference.spec.ts Comprehensive test coverage for snapshot reference functionality
review/app-configuration-node.api.md Updated public API surface with new types and methods
CHANGELOG.md Added feature announcement
assets.json Updated asset tag


### Features Added

- Support snapshot referece.
Copy link
Preview

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'referece' to 'reference'.

Suggested change
- Support snapshot referece.
- Support snapshot reference.

Copilot uses AI. Check for mistakes.

Comment on lines +8 to +9
- New types for SnapshotReference - `ConfigurationSetting<SnapshotReferenceValue>` and `ConfigurationSetting<SecretReferenceValue>`
- Upon using `getConfigurationSetting`(or add/update), use `parseSnapshotReference` methods to access the properties(to translate `ConfigurationSetting` into the types above).
Copy link
Preview

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second type should be ConfigurationSetting<SnapshotReferenceValue> instead of ConfigurationSetting<SecretReferenceValue> as this is documenting snapshot reference support, not secret reference.

Suggested change
- New types for SnapshotReference - `ConfigurationSetting<SnapshotReferenceValue>` and `ConfigurationSetting<SecretReferenceValue>`
- Upon using `getConfigurationSetting`(or add/update), use `parseSnapshotReference` methods to access the properties(to translate `ConfigurationSetting` into the types above).
- New type for SnapshotReference - `ConfigurationSetting<SnapshotReferenceValue>`
- Upon using `getConfigurationSetting`(or add/update), use `parseSnapshotReference` methods to access the properties (to translate `ConfigurationSetting` into the type above).

Copilot uses AI. Check for mistakes.

*/
export const SnapshotReferenceHelper = {
/**
* Takes the SnapshotReference (JSON) and returns a ConfigurationSetting (with the props encodeed in the value).
Copy link
Preview

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'encodeed' to 'encoded'.

Suggested change
* Takes the SnapshotReference (JSON) and returns a ConfigurationSetting (with the props encodeed in the value).
* Takes the SnapshotReference (JSON) and returns a ConfigurationSetting (with the props encoded in the value).

Copilot uses AI. Check for mistakes.

Copy link

github-actions bot commented Oct 2, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

@azure/app-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant