diff --git a/configs/mpac.json b/configs/mpac.json index dd9a572a1..d8e5604d2 100644 --- a/configs/mpac.json +++ b/configs/mpac.json @@ -1,3 +1,4 @@ { - "JUNO_ENDPOINT": "https://tools-staging.cosmos.azure.com" -} + "JUNO_ENDPOINT": "https://tools-staging.cosmos.azure.com", + "enableSchemaAnalyzer": true +} \ No newline at end of file diff --git a/src/ConfigContext.ts b/src/ConfigContext.ts index dc7d5f887..a4413a265 100644 --- a/src/ConfigContext.ts +++ b/src/ConfigContext.ts @@ -27,6 +27,7 @@ export interface ConfigContext { hostedExplorerURL: string; armAPIVersion?: string; allowedJunoOrigins: string[]; + enableSchemaAnalyzer: boolean; } // Default configuration @@ -61,6 +62,7 @@ let configContext: Readonly = { "https://tools-staging.cosmos.azure.com", "https://localhost", ], + enableSchemaAnalyzer: false, }; export function resetConfigContext(): void { diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 6793e1194..eba6ee305 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -542,6 +542,10 @@ export default class Explorer { ], }); } + + if (configContext.enableSchemaAnalyzer) { + userContext.features.enableSchemaAnalyzer = true; + } } private onGitHubClientError = (error: any): void => {