File: 1009.md

package info (click to toggle)
azure-cli 2.83.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,346,000 kB
  • sloc: python: 1,930,197; sh: 1,344; makefile: 407; cs: 145; javascript: 74; sql: 37; xml: 21
file content (85 lines) | stat: -rw-r--r-- 2,845 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
### 1009 - Parameter Property Removed

**Description**: Checks whether an existing property is removed from a cmd's parameter. 

**Analysis**: Not all configured properties removed from a cmd's parameter are considered breaking changes. The properties listed in PARA_PROPERTY_REMOVE_BREAK_LIST below are thought to influence or interrupt current workflow and be breaking changes. 
* PARA_PROPERTY_REMOVE_BREAK_LIST = ["options", "id_part", "nargs"]

**Example**: In new cli version, configuration `nargs` is being removed from `--categories` of cmd `az monitor log-profiles create` which caused incompatibility with current cmd's script input.

#### Before
```json5
{
  "module_name": "monitor",
  "name": "az",
  "commands": {},
  "sub_groups": {
      "monitor": {
          "name": "monitor",
          "commands": {},
          "sub_groups": {
              "monitor log-profiles": {
                  "name": "monitor log-profiles",
                  "commands": {
                      "monitor log-profiles create": {
                          "name": "monitor log-profiles create",
                          "is_aaz": true,
                          "parameters": [
                              {
                                  "name": "categories",
                                  "options": ["--categories"],
                                  "required": true,
                                  "nargs": "+",
                                  "aaz_type": "AAZListArg",
                                  "type": "List<String>"
                              }
                              ...
                              ...
                          ]
                      }
                  }
              }
          }
      },
    ...
  }
}
```

#### After
```json5
{
  "module_name": "monitor",
  "name": "az",
  "commands": {},
  "sub_groups": {
      "monitor": {
          "name": "monitor",
          "commands": {},
          "sub_groups": {
              "monitor log-profiles": {
                  "name": "monitor log-profiles",
                  "commands": {
                      "monitor log-profiles create": {
                          "name": "monitor log-profiles create",
                          "is_aaz": true,
                          "parameters": [
                              {
                                  "name": "categories",
                                  "options": ["--categories"],
                                  "required": true,
                                  "aaz_type": "AAZListArg",
                                  "type": "List<String>"
                              }
                              ...
                              ...
                          ]
                      }
                  }
              }
          }
      },
    ...
  }
}
```