Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set app schema for generated dialogs #4834

Merged
merged 1 commit into from
Nov 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Composer/packages/server/src/models/bot/botProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,11 +564,22 @@ export class BotProject implements IBotProject {
console.log(`${type} - ${message}`);
};

// fix casing for case-sensitive schema paths
const schemaLocale = defaultLocale
.replace(/en-us/i, 'en-US')
.replace(/en-us-pseudo/i, 'en-US-pseudo')
.replace(/zh-hans/i, 'zh-Hans')
.replace(/zh-hant/i, 'zh-Hant')
.replace(/pt-br/i, 'pt-BR')
.replace(/pt-pt/i, 'pt-PT');

const metaSchema = `https://raw.githubusercontent.com/microsoft/BotFramework-Composer/main/Composer/packages/server/schemas/sdk.${schemaLocale}.schema`;

const generateParams = {
schemaPath,
prefix: name,
outDir,
metaSchema: undefined,
metaSchema: metaSchema,
allLocales: undefined,
templateDirs: templateDirs || [],
force: false,
Expand Down