This commit is contained in:
Rodge Fu 2020-03-05 23:11:03 +08:00
Родитель 9b9739aae5
Коммит 342185431e
4 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -43,7 +43,7 @@ modelerfour:
$host: $host
LRO: LRO
clicommon:
cli:
naming:
cli:
appliedTo:
@ -96,7 +96,7 @@ clicommon:
> so that it will be converted to correct naming convention in the output. Samples as below:
``` $(sample-cli-directive)
clicommon:
cli:
naming:
cli:
appliedTo:
@ -208,7 +208,7 @@ clicommon:
#### Samples
``` $(sample-cli-directive)
clicommon:
cli:
cli-directive:
# directive on operationGroup
- select: 'operationGroup'

Просмотреть файл

@ -32,7 +32,7 @@ export class CliDirectiveManager {
private directives: CliDirective[] = [];
public async LoadDirective(session: Session<CodeModel>) {
var arr: CliCommonSchema.CliDirective.Directive[] = await session.getValue(CliConst.CLI_DIRECTIVE, null);
var arr: CliCommonSchema.CliDirective.Directive[] = await session.getValue(CliConst.CLI_DIRECTIVE_KEY, null);
if (!isNullOrUndefined(arr) && !Array.isArray(arr)) {
throw Error("cli-directive is expected to be an array. Please check '-' is set property in yaml")

Просмотреть файл

@ -18,8 +18,8 @@ export class CommonNamer {
async init() {
// any configuration if necessary
this.cliNamingSettings = Helper.normalizeNamingSettings(await this.session.getValue("naming.cli", {}));
this.defaultNamingSettings = Helper.normalizeNamingSettings(await this.session.getValue("naming.default", {}));
this.cliNamingSettings = Helper.normalizeNamingSettings(await this.session.getValue("cli.naming.cli", {}));
this.defaultNamingSettings = Helper.normalizeNamingSettings(await this.session.getValue("cli.naming.default", {}));
return this;
}

Просмотреть файл

@ -12,6 +12,7 @@ export namespace CliConst {
export const CLI_FORMATTABLE: string = "formatTable";
export const CLI_FORMATTABLE_PROPERTIES: string = "properties";
export const CLI_DIRECTIVE: string = "cli-directive";
export const CLI_DIRECTIVE_KEY: string = 'cli.cli-directive';
export class NamingStyle {
/** camelCase */