Skip to content

Commit de7781a

Browse files
wip
1 parent e1d5e9a commit de7781a

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
@@ -41,7 +41,7 @@ import {
4141
CLIENT_FILTERS_KEY_NAME
4242
} from "./featureManagement/constants.js";
4343
import { FM_PACKAGE_NAME, AI_MIME_PROFILE, AI_CHAT_COMPLETION_MIME_PROFILE } from "./requestTracing/constants.js";
44-
import { parseContentType, isJsonContentType, isFeatureFlagContentType, isSecretReferenceContentType } from "./common/contentType.js";
44+
import { parseContentType, isJsonContentType, isFeatureFlagContentType, isSecretReferenceContentType, isSnapshotReferenceContentType } from "./common/contentType.js";
4545
import { AzureKeyVaultKeyValueAdapter } from "./keyvault/keyVaultKeyValueAdapter.js";
4646
import { RefreshTimer } from "./refresh/refreshTimer.js";
4747
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)