Enable Schema Analyzer in MPAC (#805)

This commit is contained in:
Tanuj Mittal 2021-05-19 11:32:12 -07:00 committed by GitHub
parent c2de2f2eec
commit ac753b0780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,4 @@
{ {
"JUNO_ENDPOINT": "https://tools-staging.cosmos.azure.com" "JUNO_ENDPOINT": "https://tools-staging.cosmos.azure.com",
"enableSchemaAnalyzer": true
} }

View File

@ -27,6 +27,7 @@ export interface ConfigContext {
hostedExplorerURL: string; hostedExplorerURL: string;
armAPIVersion?: string; armAPIVersion?: string;
allowedJunoOrigins: string[]; allowedJunoOrigins: string[];
enableSchemaAnalyzer: boolean;
} }
// Default configuration // Default configuration
@ -61,6 +62,7 @@ let configContext: Readonly<ConfigContext> = {
"https://tools-staging.cosmos.azure.com", "https://tools-staging.cosmos.azure.com",
"https://localhost", "https://localhost",
], ],
enableSchemaAnalyzer: false,
}; };
export function resetConfigContext(): void { export function resetConfigContext(): void {

View File

@ -542,6 +542,10 @@ export default class Explorer {
], ],
}); });
} }
if (configContext.enableSchemaAnalyzer) {
userContext.features.enableSchemaAnalyzer = true;
}
} }
private onGitHubClientError = (error: any): void => { private onGitHubClientError = (error: any): void => {