-
Notifications
You must be signed in to change notification settings - Fork 20
Manual config feature gap after refactor #827
Manual config feature gap after refactor #827
Conversation
src/generate/codemodel/Command.ts
Outdated
@@ -25,8 +25,8 @@ export interface CommandModel { | |||
Command_Mode: string; | |||
Command_Type: string; | |||
Command_GenericSetterArgName: string; | |||
// Command_Features: [string, string]; | |||
// Command_Imports: [string, string[]]; | |||
Command_Features: Record<string, any>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value type of Features is a string? wondering is it necessary to use 'any'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly. I don't want to rule out the possiblity of other complex cases. For example
directive:
command: some-command-name
feature:
some_feature:
- a
- 'b'
some_feature1:
a1: a2
'b1': 'b2'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this works for both string or number type, I need to add logic about the complex scenario I mentioned above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, if it's also supposed to by a number, it will be better to use "prop: string|number"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed,
features: | ||
exception_handler: handle_template_based_exception | ||
imports: | ||
azure.cli.core.exception: handle_template_based_exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As other pairs are using name-value format, and this seems to be a different pattern, need to verify whether it would cause confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will discuss with CLI team about it
} | ||
importValues.forEach((val) => { | ||
if (list.indexOf(val) === -1) { | ||
list.push(val); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does CLI have the requirement to order all the import values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
* command-interfaces-user-cases-document * document update * group change * bugfixes and doc improvement * update group description * remove new sdk release impact on scenario test * autorest directive and cli directive document * refactor of code model impl * fix codemoel layer * refactor fixes * refactor * reserve work * refactor the codemodel * example refactor * resolve conflict part * resolve conflicts * Manual config feature gap after refactor (#827) * manual-config-feature-gap-after-refactor * fix-test * add test config * manual config features and tests * scenario test * add array type example * feature type * remove unused reference
No description provided.