-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Core] aaz: Support Any type with full value shorthand syntax allowed
#30868
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
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @kairu-ms, |
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
aaz: Support AnyTypeaaz: Support Any type with full value shorthand syntax allowed
aaz: Support Any type with full value shorthand syntax allowedaaz: Support Any type with full value shorthand syntax allowed
69c75ba to
a6ccf0d
Compare
…owed (Azure#30868) * Support AnyType * Fix content builder * fix style issue
Related command
Description
This PR add support of
Anytype for aaz commands. The aaz runtime enhanced the shorthand syntax so that the full value can be supported forAnytype.The
Anytype is a type allowing a value instring,int,float,bool,listanddict, which are basic types used in json. Thenullvalue is also accepted for nullableAnytype.The shorthand syntax will try to convert the input string to possible types, for example
1will be convert as int type andfalsewill be convert as bool type. If you want to input a string of1, it can be wrapped in a single quote string. Below are some examples:1value1.1valuefalsevalueabcvalue1valueaz some-command create --any-type-arg "'1'"falsevalueThe shorthand syntan command:
az some-command create --any-type-arg "[1,1.1,false,strvalue,'5']"{ "a": 1, "b": 1.1, "c": false, "d": "strvalue", "e": "5" }The shorthand syntan command:
az some-command create --any-type-arg "{a:1,b:1.1,c:false,d:strvalue,e:'5'}"Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.