Skip to content

Commit 48ac461

Browse files
najianNan Jiangmsyyc
authored andcommitted
[S360 fix ]add default value to containerAPP model (Azure#20931)
* add default value to containerAPP model * add default value for 2022-06-01-preview * python fix * python fix Co-authored-by: Nan Jiang <[email protected]> Co-authored-by: Yuchao Yan <[email protected]>
1 parent cd1eb60 commit 48ac461

File tree

5 files changed

+44
-9
lines changed

5 files changed

+44
-9
lines changed

specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@
686686
},
687687
"ignoreErrors": {
688688
"description": "Boolean describing if the component errors are ignores",
689-
"type": "boolean"
689+
"type": "boolean",
690+
"default": false
690691
},
691692
"initTimeout": {
692693
"description": "Initialization timeout",

specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ContainerApps.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@
485485
"x-ms-enum": {
486486
"name": "ActiveRevisionsMode",
487487
"modelAsString": true
488-
}
488+
},
489+
"default": "Single"
489490
},
490491
"ingress": {
491492
"$ref": "#/definitions/Ingress",
@@ -636,7 +637,8 @@
636637
"properties": {
637638
"enabled": {
638639
"description": "Boolean indicating if the Dapr side car is enabled",
639-
"type": "boolean"
640+
"type": "boolean",
641+
"default": false
640642
},
641643
"appId": {
642644
"description": "Dapr application identifier",
@@ -652,7 +654,8 @@
652654
"x-ms-enum": {
653655
"name": "appProtocol",
654656
"modelAsString": true
655-
}
657+
},
658+
"default": "http"
656659
},
657660
"appPort": {
658661
"format": "int32",
@@ -725,7 +728,8 @@
725728
"x-ms-enum": {
726729
"name": "IngressTransportMethod",
727730
"modelAsString": true
728-
}
731+
},
732+
"default": "auto"
729733
},
730734
"traffic": {
731735
"description": "Traffic weights for app's revisions",
@@ -749,7 +753,8 @@
749753
},
750754
"allowInsecure": {
751755
"description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections",
752-
"type": "boolean"
756+
"type": "boolean",
757+
"default": "false"
753758
},
754759
"ipSecurityRestrictions": {
755760
"description": "Rules to restrict incoming IP address.",

specification/app/resource-manager/Microsoft.App/stable/2022-03-01/ContainerApps.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@
432432
"Single"
433433
],
434434
"type": "string",
435+
"default": "Single",
435436
"x-ms-enum": {
436437
"name": "ActiveRevisionsMode",
437438
"modelAsString": true
@@ -561,7 +562,8 @@
561562
"properties": {
562563
"enabled": {
563564
"description": "Boolean indicating if the Dapr side car is enabled",
564-
"type": "boolean"
565+
"type": "boolean",
566+
"default": false
565567
},
566568
"appId": {
567569
"description": "Dapr application identifier",
@@ -574,6 +576,7 @@
574576
"grpc"
575577
],
576578
"type": "string",
579+
"default": "http",
577580
"x-ms-enum": {
578581
"name": "appProtocol",
579582
"modelAsString": true
@@ -616,7 +619,8 @@
616619
"x-ms-enum": {
617620
"name": "IngressTransportMethod",
618621
"modelAsString": true
619-
}
622+
},
623+
"default": "auto"
620624
},
621625
"traffic": {
622626
"description": "Traffic weights for app's revisions",
@@ -640,7 +644,8 @@
640644
},
641645
"allowInsecure": {
642646
"description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections",
643-
"type": "boolean"
647+
"type": "boolean",
648+
"default": "false"
644649
}
645650
}
646651
},

specification/app/resource-manager/Microsoft.App/stable/2022-03-01/DaprComponents.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@
331331
},
332332
"ignoreErrors": {
333333
"description": "Boolean describing if the component errors are ignores",
334+
"default": false,
334335
"type": "boolean"
335336
},
336337
"initTimeout": {

specification/app/resource-manager/readme.python.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,26 @@ clear-output-folder: true
1616
no-namespace-folders: true
1717
output-folder: $(python-sdks-folder)/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers
1818
```
19+
20+
``` yaml $(python)
21+
directive:
22+
- from: CommonDefinitions.json
23+
where: $.definitions.DaprComponent.properties.ignoreErrors
24+
transform: $['default'] = 'False'
25+
26+
- from: ContainerApps.json
27+
where: $.definitions.Dapr.properties.enabled
28+
transform: $['default'] = 'False'
29+
30+
- from: ContainerApps.json
31+
where: $.definitions.Ingress.properties.external
32+
transform: $['default'] = 'False'
33+
34+
- from: ContainerApps.json
35+
where: $.definitions.TrafficWeight.properties.latestRevision
36+
transform: $['default'] = 'False'
37+
38+
- from: ContainerApps.json
39+
where: $.definitions.Ingress.properties.allowInsecure
40+
transform: $['default'] = 'False'
41+
```

0 commit comments

Comments
 (0)