Skip to content

Commit 1e26714

Browse files
authored
Fix Lint issues in ContainerApps.json (#24107)
* Fix lint issue * Fix format issue * Fix json format issue * Fix model validation * Fix lint error
1 parent dad7d3c commit 1e26714

File tree

3 files changed

+224
-4
lines changed

3 files changed

+224
-4
lines changed

specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/ContainerApps.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,10 @@
512512
],
513513
"responses": {
514514
"200": {
515-
"description": "Container App started successfully."
515+
"description": "Container App started successfully.",
516+
"schema": {
517+
"$ref": "#/definitions/ContainerApp"
518+
}
516519
},
517520
"202": {
518521
"description": "Start operation is in progress.",
@@ -568,7 +571,10 @@
568571
],
569572
"responses": {
570573
"200": {
571-
"description": "Container App stopped successfully."
574+
"description": "Container App stopped successfully.",
575+
"schema": {
576+
"$ref": "#/definitions/ContainerApp"
577+
}
572578
},
573579
"202": {
574580
"description": "Stop operation is in progress.",

specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Start.json

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,114 @@
66
"api-version": "2023-04-01-preview"
77
},
88
"responses": {
9-
"200": {},
9+
"200": {
10+
"headers": {},
11+
"body": {
12+
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0",
13+
"name": "testcontainerApp0",
14+
"type": "Microsoft.App/containerApps",
15+
"location": "East US",
16+
"properties": {
17+
"provisioningState": "Succeeded",
18+
"managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
19+
"workloadProfileName": "My-GP-01",
20+
"latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io",
21+
"latestReadyRevisionName": "testcontainerApp0-pjxhsye",
22+
"configuration": {
23+
"ingress": {
24+
"fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io",
25+
"external": true,
26+
"targetPort": 3000,
27+
"transport": "auto",
28+
"customDomains": [
29+
{
30+
"name": "www.my-name.com",
31+
"bindingType": "SniEnabled",
32+
"certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"
33+
},
34+
{
35+
"name": "www.my--other-name.com",
36+
"bindingType": "SniEnabled",
37+
"certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"
38+
}
39+
],
40+
"traffic": [
41+
{
42+
"weight": 80,
43+
"revisionName": "testcontainerApp0-ab1234"
44+
},
45+
{
46+
"weight": 20,
47+
"revisionName": "testcontainerApp0-ab4321",
48+
"label": "staging"
49+
}
50+
],
51+
"ipSecurityRestrictions": [
52+
{
53+
"name": "Allow work IP A subnet",
54+
"description": "Allowing all IP's within the subnet below to access containerapp",
55+
"ipAddressRange": "192.168.1.1/32",
56+
"action": "Allow"
57+
},
58+
{
59+
"name": "Allow work IP B subnet",
60+
"description": "Allowing all IP's within the subnet below to access containerapp",
61+
"ipAddressRange": "192.168.1.1/8",
62+
"action": "Allow"
63+
}
64+
]
65+
},
66+
"dapr": {
67+
"enabled": true,
68+
"appPort": 3000,
69+
"appProtocol": "http",
70+
"httpReadBufferSize": 30,
71+
"httpMaxRequestSize": 10,
72+
"logLevel": "debug",
73+
"enableApiLogging": true
74+
},
75+
"maxInactiveRevisions": 10
76+
},
77+
"template": {
78+
"containers": [
79+
{
80+
"image": "repo/testcontainerApp0:v4",
81+
"name": "testcontainerApp0",
82+
"resources": {
83+
"cpu": 0.2,
84+
"memory": "100Mi"
85+
}
86+
}
87+
],
88+
"initContainers": [
89+
{
90+
"image": "repo/testcontainerApp0:v4",
91+
"name": "testinitcontainerApp0",
92+
"resources": {
93+
"cpu": 0.2,
94+
"memory": "100Mi"
95+
}
96+
}
97+
],
98+
"scale": {
99+
"minReplicas": 1,
100+
"maxReplicas": 5,
101+
"rules": [
102+
{
103+
"name": "httpscalingrule",
104+
"http": {
105+
"metadata": {
106+
"concurrentRequests": "50"
107+
}
108+
}
109+
}
110+
]
111+
}
112+
},
113+
"eventStreamEndpoint": "testEndpoint"
114+
}
115+
}
116+
},
10117
"202": {
11118
"headers": {
12119
"location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/containerApps/testWorkerApp0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-04-01-preview"

specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Stop.json

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,114 @@
66
"api-version": "2023-04-01-preview"
77
},
88
"responses": {
9-
"200": {},
9+
"200": {
10+
"headers": {},
11+
"body": {
12+
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0",
13+
"name": "testcontainerApp0",
14+
"type": "Microsoft.App/containerApps",
15+
"location": "East US",
16+
"properties": {
17+
"provisioningState": "Succeeded",
18+
"managedEnvironmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
19+
"workloadProfileName": "My-GP-01",
20+
"latestRevisionFqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io",
21+
"latestReadyRevisionName": "testcontainerApp0-pjxhsye",
22+
"configuration": {
23+
"ingress": {
24+
"fqdn": "testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io",
25+
"external": true,
26+
"targetPort": 3000,
27+
"transport": "auto",
28+
"customDomains": [
29+
{
30+
"name": "www.my-name.com",
31+
"bindingType": "SniEnabled",
32+
"certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"
33+
},
34+
{
35+
"name": "www.my--other-name.com",
36+
"bindingType": "SniEnabled",
37+
"certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"
38+
}
39+
],
40+
"traffic": [
41+
{
42+
"weight": 80,
43+
"revisionName": "testcontainerApp0-ab1234"
44+
},
45+
{
46+
"weight": 20,
47+
"revisionName": "testcontainerApp0-ab4321",
48+
"label": "staging"
49+
}
50+
],
51+
"ipSecurityRestrictions": [
52+
{
53+
"name": "Allow work IP A subnet",
54+
"description": "Allowing all IP's within the subnet below to access containerapp",
55+
"ipAddressRange": "192.168.1.1/32",
56+
"action": "Allow"
57+
},
58+
{
59+
"name": "Allow work IP B subnet",
60+
"description": "Allowing all IP's within the subnet below to access containerapp",
61+
"ipAddressRange": "192.168.1.1/8",
62+
"action": "Allow"
63+
}
64+
]
65+
},
66+
"dapr": {
67+
"enabled": true,
68+
"appPort": 3000,
69+
"appProtocol": "http",
70+
"httpReadBufferSize": 30,
71+
"httpMaxRequestSize": 10,
72+
"logLevel": "debug",
73+
"enableApiLogging": true
74+
},
75+
"maxInactiveRevisions": 10
76+
},
77+
"template": {
78+
"containers": [
79+
{
80+
"image": "repo/testcontainerApp0:v4",
81+
"name": "testcontainerApp0",
82+
"resources": {
83+
"cpu": 0.2,
84+
"memory": "100Mi"
85+
}
86+
}
87+
],
88+
"initContainers": [
89+
{
90+
"image": "repo/testcontainerApp0:v4",
91+
"name": "testinitcontainerApp0",
92+
"resources": {
93+
"cpu": 0.2,
94+
"memory": "100Mi"
95+
}
96+
}
97+
],
98+
"scale": {
99+
"minReplicas": 1,
100+
"maxReplicas": 5,
101+
"rules": [
102+
{
103+
"name": "httpscalingrule",
104+
"http": {
105+
"metadata": {
106+
"concurrentRequests": "50"
107+
}
108+
}
109+
}
110+
]
111+
}
112+
},
113+
"eventStreamEndpoint": "testEndpoint"
114+
}
115+
}
116+
},
10117
"202": {
11118
"headers": {
12119
"location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/containerApps/testWorkerApp0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-04-01-preview"

0 commit comments

Comments
 (0)