change clicommon to cli
This commit is contained in:
Родитель
9b9739aae5
Коммит
342185431e
|
@ -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 */
|
||||
|
|
Загрузка…
Ссылка в новой задаче