Skip to content

Commit

Permalink
AAS - Swagger Linting and Correctness Fix (Azure#12176)
Browse files Browse the repository at this point in the history
* Fix R4013 IntegerTypeMustHaveFormat

* Fix R4010 RequiredDefaultResponse

* Fix R4007 DefaultErrorResponseSchema

* removed extra bracket

* fix semantic issue

* add type error

* Fix linting issue

* test to resolve model validation test

* Revert "test to resolve model validation test"

This reverts commit ab273df.

* Resolve Model Validation Issue

* Resolve Model Validation Issue v2

* test - add missing properties

(cherry picked from commit 48ec27c)

* fix format

* set default value

* add x-ms-enum

* fix nit

* Add missing property

* add missing properties

* add missing bracket

* change GatewayListStatusLive type

* add missing "origin" property

* fix model validation

* Revert "change GatewayListStatusLive type"

This reverts commit 4f3fa74.

* Revert "fix model validation"

This reverts commit 945bc23.
  • Loading branch information
david-msft authored and josuh committed Jan 6, 2021
1 parent 5e7652e commit c626d04
Show file tree
Hide file tree
Showing 6 changed files with 536 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
"schema": {
"$ref": "#/definitions/AnalysisServicesServer"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
Expand Down Expand Up @@ -132,6 +138,12 @@
"schema": {
"$ref": "#/definitions/AnalysisServicesServer"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -177,6 +189,12 @@
},
"202": {
"description": "Accepted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -234,6 +252,12 @@
"schema": {
"$ref": "#/definitions/AnalysisServicesServer"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -278,6 +302,12 @@
},
"202": {
"description": "Accepted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -322,6 +352,12 @@
},
"202": {
"description": "Accepted"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -356,6 +392,12 @@
"schema": {
"$ref": "#/definitions/AnalysisServicesServers"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -389,6 +431,12 @@
"schema": {
"$ref": "#/definitions/AnalysisServicesServers"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -419,6 +467,12 @@
"schema": {
"$ref": "#/definitions/SkuEnumerationForNewResourceResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
Expand Down Expand Up @@ -462,6 +516,12 @@
"schema": {
"$ref": "#/definitions/SkuEnumerationForExistingResourceResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
Expand Down Expand Up @@ -551,6 +611,12 @@
"responses": {
"200": {
"description": "OK."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
Expand Down Expand Up @@ -597,6 +663,12 @@
"schema": {
"$ref": "#/definitions/CheckServerNameAvailabilityResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
Expand Down Expand Up @@ -641,6 +713,12 @@
},
"202": {
"description": "Accepted. The operation is ongoing."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
Expand Down Expand Up @@ -691,6 +769,12 @@
"schema": {
"$ref": "#/definitions/OperationStatus"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
Expand Down Expand Up @@ -756,6 +840,11 @@
"readOnly": true
}
}
},
"origin": {
"description": "The origin",
"type": "string",
"readOnly": true
}
}
},
Expand Down Expand Up @@ -930,6 +1019,10 @@
"type": "string",
"readOnly": true,
"description": "The full name of the Analysis Services resource."
},
"sku": {
"$ref": "#/definitions/ResourceSku",
"description": "The SKU of the Analysis Services resource."
}
},
"allOf": [
Expand Down Expand Up @@ -961,6 +1054,7 @@
},
"capacity": {
"type": "integer",
"format": "int32",
"minimum": 1,
"maximum": 8,
"default": 1,
Expand Down Expand Up @@ -1003,6 +1097,34 @@
"name": "ConnectionMode"
},
"default": "All"
},
"managedMode": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
],
"x-ms-enum": {
"modelAsString": false,
"name": "ManagedMode"
},
"default": 1,
"description": "The managed mode of the server (0 = not managed, 1 = managed)."
},
"serverMonitorMode": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
],
"x-ms-enum": {
"modelAsString": false,
"name": "ServerMonitorMode"
},
"default": 1,
"description": "The server monitor mode for AS server"
}
}
},
Expand Down Expand Up @@ -1224,13 +1346,19 @@
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
"error": {
"type": "object",
"description": "The error object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
"azsdktest@microsoft.com",
"azsdktest2@microsoft.com"
]
},
"provisioningState": "Preparing",
"serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest",
"state": "Preparing"
}
}
}
},
Expand Down
Loading

0 comments on commit c626d04

Please sign in to comment.