Skip to content

Commit 2b929c2

Browse files
wip
1 parent 83c3e11 commit 2b929c2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/appConfigurationImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
CLIENT_FILTERS_KEY_NAME
4141
} from "./featureManagement/constants.js";
4242
import { FM_PACKAGE_NAME, AI_MIME_PROFILE, AI_CHAT_COMPLETION_MIME_PROFILE } from "./requestTracing/constants.js";
43-
import { parseContentType, isJsonContentType, isFeatureFlagContentType, isSecretReferenceContentType } from "./common/contentType.js";
43+
import { parseContentType, isJsonContentType, isFeatureFlagContentType, isSecretReferenceContentType, isSnapshotReferenceContentType } from "./common/contentType.js";
4444
import { AzureKeyVaultKeyValueAdapter } from "./keyvault/keyVaultKeyValueAdapter.js";
4545
import { RefreshTimer } from "./refresh/refreshTimer.js";
4646
import {

src/common/contentType.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,12 @@ export function isSecretReferenceContentType(contentType: ContentType | undefine
6060
}
6161
return mediaType === secretReferenceContentType;
6262
}
63+
64+
export function isSnapshotReferenceContentType(contentType: ContentType | undefined): boolean {
65+
const mediaType = contentType?.mediaType;
66+
if (!mediaType) {
67+
return false;
68+
}
69+
// TODO: replace with constant when available in Azure SDK
70+
return mediaType === "application/json; profile=\"https://azconfig.io/mime-profiles/snapshot-ref\"; charset=utf-8";
71+
}

0 commit comments

Comments
 (0)