Skip to content

Commit 323a977

Browse files
authored
add validate config server(stable) (#10858)
* add validate config server(stable) * prettier * typo
1 parent d4d7ea6 commit 323a977

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2020-07-01/appplatform.json

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,67 @@
563563
}
564564
}
565565
},
566+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate": {
567+
"post": {
568+
"tags": [
569+
"AppPlatform"
570+
],
571+
"description": "Check if the config server settings are valid.",
572+
"operationId": "ConfigServers_Validate",
573+
"parameters": [
574+
{
575+
"$ref": "#/parameters/ApiVersionParameter"
576+
},
577+
{
578+
"$ref": "#/parameters/SubscriptionIdParameter"
579+
},
580+
{
581+
"$ref": "#/parameters/ResourceGroupNameParameter"
582+
},
583+
{
584+
"$ref": "#/parameters/ServiceNameParameter"
585+
},
586+
{
587+
"name": "configServerSettings",
588+
"in": "body",
589+
"description": "Config server settings to be validated",
590+
"required": true,
591+
"schema": {
592+
"$ref": "#/definitions/ConfigServerSettings"
593+
}
594+
}
595+
],
596+
"responses": {
597+
"200": {
598+
"description": "Success. The response describes the validation result of Config Server.",
599+
"schema": {
600+
"$ref": "#/definitions/ConfigServerSettingsValidateResult"
601+
}
602+
},
603+
"202": {
604+
"description": "Accepted. The response indicates the ConfigServerSetting is validating.",
605+
"schema": {
606+
"$ref": "#/definitions/ConfigServerSettingsValidateResult"
607+
}
608+
},
609+
"default": {
610+
"description": "Error response describing why the operation failed.",
611+
"schema": {
612+
"$ref": "#/definitions/CloudError"
613+
}
614+
}
615+
},
616+
"x-ms-long-running-operation": true,
617+
"x-ms-long-running-operation-options": {
618+
"final-state-via": "location"
619+
},
620+
"x-ms-examples": {
621+
"ConfigServers_Validate": {
622+
"$ref": "./examples/ConfigServers_Validate.json"
623+
}
624+
}
625+
}
626+
},
566627
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default": {
567628
"get": {
568629
"tags": [
@@ -2833,6 +2894,44 @@
28332894
}
28342895
}
28352896
},
2897+
"ConfigServerSettingsValidateResult": {
2898+
"description": "Validation result for config server settings",
2899+
"type": "object",
2900+
"properties": {
2901+
"isValid": {
2902+
"description": "Indicate if the config server settings are valid",
2903+
"type": "boolean"
2904+
},
2905+
"details": {
2906+
"description": "The detail validation results",
2907+
"type": "array",
2908+
"items": {
2909+
"$ref": "#/definitions/ConfigServerSettingsErrorRecord"
2910+
}
2911+
}
2912+
}
2913+
},
2914+
"ConfigServerSettingsErrorRecord": {
2915+
"description": "Error record of the config server settings",
2916+
"type": "object",
2917+
"properties": {
2918+
"name": {
2919+
"description": "The name of the config server settings error record",
2920+
"type": "string"
2921+
},
2922+
"uri": {
2923+
"description": "The uri of the config server settings error record",
2924+
"type": "string"
2925+
},
2926+
"messages": {
2927+
"description": "The detail error messages of the record",
2928+
"type": "array",
2929+
"items": {
2930+
"type": "string"
2931+
}
2932+
}
2933+
}
2934+
},
28362935
"ConfigServerResource": {
28372936
"description": "Config Server resource",
28382937
"type": "object",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parameters": {
3+
"configServerSettings": {
4+
"gitProperty": {
5+
"uri": "https://github.com/fake-user/fake-repository.git",
6+
"label": "master",
7+
"searchPaths": [
8+
"/"
9+
]
10+
}
11+
},
12+
"api-version": "2020-07-01",
13+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
14+
"resourceGroupName": "myResourceGroup",
15+
"serviceName": "myservice"
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"isValid": true
21+
}
22+
},
23+
"202": {
24+
"body": {}
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)