Skip to content

Commit

Permalink
Import/Export enum fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathannfan committed Mar 2, 2017
1 parent 9339074 commit 1349c54
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 30 deletions.
23 changes: 23 additions & 0 deletions arm-sql/2014-04-01/examples/DatabaseCreateImportMin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-4799",
"serverName": "sqlcrudtest-5961",
"databaseName": "testdb",
"api-version": "2014-04-01",
"parameters": {
"databaseName":"TestDbImport",
"edition":"Basic",
"serviceObjectiveName":"Basic",
"maxSizeBytes":"2147483648",
"storageKeyType":"StorageAccessKey",
"storageKey": "sdlfkjdsf+sdlfkjsdlkfsjdfLDKFJSDLKFDFKLjsdfksjdflsdkfD2342309432849328479324/3RSD==",
"storageUri": "https://test.blob.core.windows.net/bacpacs/testbacpac.bacpac",
"administratorLogin":"dummyLogin",
"administratorLoginPassword":"Un53cuRE!"
}
},
"responses": {
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
}
},
"responses": {
"200": {
"body":{
"requestId": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
"requestType": "Export",
"queuedTime": "3/1/2017 12:14:25 AM",
"lastModifiedTime": "3/1/2017 12:16:33 AM",
"blobUri": "https://test.blob.core.windows.net/bacpacs/test.bacpac",
"serverName": "test",
"databaseName": "testdb",
"status": "Completed",
"errorMessage": null
}
},
"202": {}
}
}
35 changes: 35 additions & 0 deletions arm-sql/2014-04-01/examples/DatabaseUpdateImportMin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "sqlcrudtest-4799",
"serverName": "sqlcrudtest-5961",
"databaseName": "testdb",
"api-version": "2014-04-01",
"parameters": {
"properties": {
"operationMode": "Import",
"storageKeyType": "StorageAccessKey",
"storageKey": "sdlfkjdsf+sdlfkjsdlkfsjdfLDKFJSDLKFDFKLjsdfksjdflsdkfD2342309432849328479324/3RSD==",
"storageUri": "https://test.blob.core.windows.net/bacpacs/testbacpac.bacpac",
"administratorLogin": "dummyLogin",
"administratorLoginPassword": "Un53cuRE!"
}
}
},
"responses": {
"200": {
"body":{
"requestId": "f01d7bfe-7162-44e7-9350-f1c85ce83e4c",
"requestType": "Export",
"queuedTime": "3/1/2017 12:14:25 AM",
"lastModifiedTime": "3/1/2017 12:16:33 AM",
"blobUri": "https://test.blob.core.windows.net/bacpacs/test.bacpac",
"serverName": "test",
"databaseName": "testdb",
"status": "Completed",
"errorMessage": null
}
},
"202": {}
}
}
61 changes: 31 additions & 30 deletions arm-sql/2014-04-01/swagger/importExport.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
}
},
"x-ms-examples": {
"Import bacpac into new database": { "$ref": "../examples/DatabaseCreateImport.json" }
"Import bacpac into new database Max": { "$ref": "../examples/DatabaseCreateImportMax.json" },
"Import bacpac into new database Min": { "$ref": "../examples/DatabaseCreateImportMin.json" }
},
"x-ms-long-running-operation": true
}
Expand Down Expand Up @@ -95,12 +96,19 @@
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ImportExportOperationStatusResponseProperties"
}
},
"202": {
"description": "Accepted"
}
},
"x-ms-examples": {
"Import bacpac into an existing database": { "$ref": "../examples/DatabaseUpdateImport.json" }
"Import bacpac into an existing database Max": { "$ref": "../examples/DatabaseUpdateImportMax.json" },
"Import bacpac into an existing database Min": { "$ref": "../examples/DatabaseUpdateImportMin.json" }
},
"x-ms-long-running-operation": true
}
Expand Down Expand Up @@ -284,33 +292,18 @@
"properties": {
"operationMode": {
"type": "string",
"description": "The type of Import/Export opertion being performed"
},
"storageKeyType": {
"type": "string",
"description": "The type of the storage key to use. Valid values are StorageAccessKey and SharedAccessKey."
},
"storageKey": {
"type": "string",
"description": "The storage key to use."
},
"storageUri": {
"type": "string",
"description": "The storage uri to use."
},
"administratorLogin": {
"type": "string",
"description": "The name of the SQL administrator."
},
"administratorLoginPassword": {
"type": "string",
"description": "The password of the SQL administrator."
},
"authenticationType": {
"type": "string",
"description": "The authentication type."
"description": "The type of Import/Export operation being performed",
"enum":["Import"],
"x-ms-enum":{
"name": "OperationMode"
}
}
},
"allOf": [
{
"$ref": "#/definitions/ExportRequestParameters"
}
],
"description": "Represents the properties for an import operation"
},
"ImportExtensionRequestParameters": {
Expand Down Expand Up @@ -425,7 +418,11 @@
"properties": {
"storageKeyType": {
"type": "string",
"description": "The type of the storage key to use. Valid values are StorageAccessKey and SharedAccessKey."
"description": "The type of the storage key to use. Valid values are StorageAccessKey and SharedAccessKey.",
"enum": ["StorageAccessKey","SharedAccessKey"],
"x-ms-enum":{
"name": "StorageKeyType"
}
},
"storageKey": {
"type": "string",
Expand All @@ -445,10 +442,14 @@
},
"authenticationType": {
"type": "string",
"description": "The authentication type."
"description": "The authentication type.",
"enum": ["SQL","ADPassword"],
"x-ms-enum":{
"name": "AuthenticationType"
}
}
},
"required":["storageKeyType","storageKey","storageUri","administratorLogin","administratorLoginPassword","authenticationType"],
"required":["storageKeyType","storageKey","storageUri","administratorLogin","administratorLoginPassword"],
"description": "Export database parameters."
}
},
Expand Down

0 comments on commit 1349c54

Please sign in to comment.