Skip to content

Commit 636fe83

Browse files
sallasindhujaSindhuja Salla
authored andcommitted
Adding Guardrails version to public swagger (#25085)
* Adding Guardrails version to public swagger * renamed GetGuardrailsVersions.json * Applied GetCollectionResponseSchema rule * Ran prettier fix * Minor change * moving parametre into managedClusters.json * GuardrailsAvailableVersion model change * Updated version param reference * Swagger SemanticValidation fix * model changes * prettier fix * Added version in list response * Changed to resource in GET and added descriptions where needed * Removed identifier in GuardrailsAvailableVersionsList --------- Co-authored-by: Sindhuja Salla <[email protected]>
1 parent 3291c9b commit 636fe83

File tree

3 files changed

+209
-0
lines changed

3 files changed

+209
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-07-02-preview",
4+
"subscriptionId": "subid1",
5+
"location": "location1",
6+
"version": "v1.0.0"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/guardrailsVersions/v1.0.0",
12+
"type": "Microsoft.ContainerService/locations/guardrailsVersions",
13+
"name": "v1.0.0",
14+
"properties": {
15+
"isDefaultVersion": true,
16+
"support": "Preview"
17+
}
18+
}
19+
}
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-07-02-preview",
4+
"subscriptionId": "subid1",
5+
"location": "location1"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/guardrailsVersions/v1.0.0",
13+
"type": "Microsoft.ContainerService/locations/guardrailsVersions",
14+
"name": "v1.0.0",
15+
"properties": {
16+
"isDefaultVersion": true,
17+
"support": "Preview"
18+
}
19+
}
20+
]
21+
}
22+
}
23+
}
24+
}

specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/managedClusters.json

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,6 +3162,92 @@
31623162
"x-ms-long-running-operation": true
31633163
}
31643164
},
3165+
"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}": {
3166+
"get": {
3167+
"tags": [
3168+
"ManagedClusters"
3169+
],
3170+
"operationId": "ManagedClusters_GetGuardrailsVersions",
3171+
"summary": "Gets supported Guardrails version in the specified subscription and location.",
3172+
"description": "Contains Guardrails version along with its support info and whether it is a default version.",
3173+
"parameters": [
3174+
{
3175+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
3176+
},
3177+
{
3178+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
3179+
},
3180+
{
3181+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/LocationParameter"
3182+
},
3183+
{
3184+
"$ref": "#/parameters/VersionParameter"
3185+
}
3186+
],
3187+
"responses": {
3188+
"200": {
3189+
"description": "OK",
3190+
"schema": {
3191+
"$ref": "#/definitions/GuardrailsAvailableVersion"
3192+
}
3193+
},
3194+
"default": {
3195+
"description": "Error response describing why the operation failed",
3196+
"schema": {
3197+
"$ref": "#/definitions/CloudError"
3198+
}
3199+
}
3200+
},
3201+
"x-ms-examples": {
3202+
"Get guardrails available versions": {
3203+
"$ref": "./examples/GetGuardrailsVersions.json"
3204+
}
3205+
}
3206+
}
3207+
},
3208+
"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions": {
3209+
"get": {
3210+
"tags": [
3211+
"ManagedClusters"
3212+
],
3213+
"operationId": "ManagedClusters_ListGuardrailsVersions",
3214+
"summary": "Gets a list of supported Guardrails versions in the specified subscription and location.",
3215+
"description": "Contains list of Guardrails version along with its support info and whether it is a default version.",
3216+
"parameters": [
3217+
{
3218+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
3219+
},
3220+
{
3221+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
3222+
},
3223+
{
3224+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/LocationParameter"
3225+
}
3226+
],
3227+
"responses": {
3228+
"200": {
3229+
"description": "OK",
3230+
"schema": {
3231+
"$ref": "#/definitions/GuardrailsAvailableVersionsList"
3232+
}
3233+
},
3234+
"default": {
3235+
"description": "Error response describing why the operation failed.",
3236+
"schema": {
3237+
"$ref": "#/definitions/CloudError"
3238+
}
3239+
}
3240+
},
3241+
"x-ms-pageable": {
3242+
"nextLinkName": "nextLink"
3243+
},
3244+
"x-ms-examples": {
3245+
"List Guardrails Versions": {
3246+
"$ref": "./examples/ListGuardrailsVersions.json"
3247+
}
3248+
}
3249+
}
3250+
},
31653251
"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles": {
31663252
"get": {
31673253
"tags": [
@@ -7016,6 +7102,74 @@
70167102
],
70177103
"description": "The OS option profile."
70187104
},
7105+
"GuardrailsAvailableVersionsProperties": {
7106+
"type": "object",
7107+
"description": "Whether the version is default or not and support info.",
7108+
"properties": {
7109+
"isDefaultVersion": {
7110+
"type": "boolean",
7111+
"readOnly": true
7112+
},
7113+
"support": {
7114+
"type": "string",
7115+
"enum": [
7116+
"Preview",
7117+
"Stable"
7118+
],
7119+
"x-ms-enum": {
7120+
"name": "GuardrailsSupport",
7121+
"modelAsString": true,
7122+
"values": [
7123+
{
7124+
"value": "Preview",
7125+
"description": "The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases."
7126+
},
7127+
{
7128+
"value": "Stable",
7129+
"description": "The version is stable and can be used on critical production clusters."
7130+
}
7131+
]
7132+
},
7133+
"description": "Whether the version is preview or stable.",
7134+
"readOnly": true
7135+
}
7136+
}
7137+
},
7138+
"GuardrailsAvailableVersion": {
7139+
"type": "object",
7140+
"description": "Available Guardrails Version",
7141+
"allOf": [
7142+
{
7143+
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/Resource"
7144+
}
7145+
],
7146+
"properties": {
7147+
"properties": {
7148+
"$ref": "#/definitions/GuardrailsAvailableVersionsProperties"
7149+
}
7150+
},
7151+
"required": [
7152+
"properties"
7153+
]
7154+
},
7155+
"GuardrailsAvailableVersionsList": {
7156+
"type": "object",
7157+
"description": "Hold values properties, which is array of GuardrailsVersions",
7158+
"properties": {
7159+
"value": {
7160+
"type": "array",
7161+
"items": {
7162+
"$ref": "#/definitions/GuardrailsAvailableVersion"
7163+
},
7164+
"description": "Array of AKS supported Guardrails versions."
7165+
},
7166+
"nextLink": {
7167+
"type": "string",
7168+
"description": "The URL to get the next Guardrails available version.",
7169+
"readOnly": true
7170+
}
7171+
}
7172+
},
70197173
"EndpointDependency": {
70207174
"description": "A domain name that AKS agent nodes are reaching at.",
70217175
"type": "object",
@@ -8670,6 +8824,16 @@
86708824
"required": true,
86718825
"pattern": "^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$",
86728826
"x-ms-parameter-location": "method"
8827+
},
8828+
"VersionParameter": {
8829+
"name": "version",
8830+
"in": "path",
8831+
"required": true,
8832+
"type": "string",
8833+
"minLength": 1,
8834+
"maxLength": 24,
8835+
"description": "Guardrails version",
8836+
"x-ms-parameter-location": "method"
86738837
}
86748838
}
86758839
}

0 commit comments

Comments
 (0)