Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADL Updates for errors and new endpoints #304

Merged
merged 63 commits into from
May 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
3c7555c
Remove requirement on subscriptionId
Mar 24, 2016
96c05a1
Need to make contents required since this is a PUT.
Mar 24, 2016
6b2d1e2
update documentation to reflect param required
Mar 24, 2016
d14dadc
undo this temp change
Mar 25, 2016
bb2178d
Change this name to be more descriptive.
Mar 25, 2016
e4a2b8c
does not need to be modeled as a string.
Mar 25, 2016
7bf762d
fix all enums to be enums.
Mar 25, 2016
b1563a5
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Mar 30, 2016
bd335c4
Add new API version for job
Mar 31, 2016
eafe1b0
missed version change here as well.
Mar 31, 2016
5f32e3f
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Apr 1, 2016
be8b7bf
temp commit to remove the required flag
Apr 1, 2016
7074192
Revert "temp commit to remove the required flag"
Apr 1, 2016
e121987
Add missing enum value
Apr 6, 2016
ed32520
Missed one.
Apr 6, 2016
799fedf
Add in new functionality
Apr 6, 2016
e99b99a
Work around for issue: 903
Apr 8, 2016
4cc7648
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Apr 11, 2016
1026b14
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Apr 12, 2016
c985596
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Apr 13, 2016
cabf298
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Apr 14, 2016
3086b7c
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
Apr 19, 2016
04f0052
addressed comments from Amar.
Apr 20, 2016
0298665
fix descriptions and add partition APIs
Apr 20, 2016
d226499
sync from master
Apr 27, 2016
275f42c
Add missing method to delete all secrets in db
Apr 27, 2016
15f769f
temporarily remove partition list for current ship.
Apr 27, 2016
6cd6d46
Add diagnostics to USqlJobProperties.
Apr 28, 2016
ed28f3a
Missing enum value.
Apr 28, 2016
aebb774
two more missing enums.
Apr 28, 2016
a68ceff
Put partitions back in for next release.
May 2, 2016
822fb58
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 2, 2016
e2150a5
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 4, 2016
8acf2fd
Test out composites.
May 4, 2016
105b888
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 5, 2016
042635b
add the log folder and logFilePattern to the sdk
May 5, 2016
5ed42e5
Remove composite specs since they don't work
May 6, 2016
3e72fe1
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 9, 2016
310b460
Error json fixes
May 9, 2016
4c883a2
bad syntax is bad.
May 9, 2016
54b862c
missed a boolean switch for readOnly,.
May 9, 2016
91f27c1
definition -> definitions
May 9, 2016
2b4962d
Change the name to be more descriptive
May 9, 2016
805a632
Following feedback from the slack forum
May 10, 2016
2675ff8
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 10, 2016
c8cba3e
Add discriminators for webhdfs
May 10, 2016
c17be3c
Further flatten and rename
May 10, 2016
8818a93
Rename to Adls
May 10, 2016
14c8726
nested exception discriminator
May 10, 2016
cdcb856
update the required piece.
May 11, 2016
76c2386
try not indexing
May 11, 2016
6b0d442
move it down to see if this fixes it.
May 11, 2016
20b445f
Try nesting again.
May 11, 2016
54e9046
Trying a work around.
May 11, 2016
c9a145b
Update to the work around
May 11, 2016
ac5f63b
Work around didn't work, going back to what did.
May 11, 2016
b17324c
Removed the unneccessary nesting.
May 12, 2016
5673cd0
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 12, 2016
b27cf5b
Add the accesscontrolexception
May 12, 2016
601cdd0
Sync to latest master
May 18, 2016
f95bf4c
remove extra next link stuff
May 19, 2016
78fcd72
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
May 20, 2016
b54f0bd
Remove currently unsupported API
May 20, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ node_modules

#### JetBrains
.idea

# ignore code gen virtual env folder
SdkCodeGen
Original file line number Diff line number Diff line change
Expand Up @@ -330,64 +330,6 @@
}
}
},
"/{nextLink}": {
"get": {
"tags": [
"Account"
],
"operationId": "Account_StorageContainersListNext",
"description": "Gets the next page of Azure Storage containers, if any, within the specified Azure Storage account. The response includes a link to the next page of results, if any.",
"parameters": [
{
"name": "nextLink",
"in": "path",
"required": true,
"type": "string",
"description": "The URL to the next Azure Storage Container page.",
"x-ms-skip-url-encoding": true
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ListBlobContainersResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
},
"post": {
"tags": [
"Account"
],
"operationId": "Account_SasTokensListNext",
"description": "Gets the next page of the SAS token objects within the specified Azure Storage account and container, if any.",
"parameters": [
{
"name": "nextLink",
"in": "path",
"required": true,
"type": "string",
"description": "The URL to the next Azure Storage Container SAS token page.",
"x-ms-skip-url-encoding": true
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ListSasTokensResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens": {
"post": {
"tags": [
Expand Down
230 changes: 228 additions & 2 deletions arm-datalake-analytics/catalog/2015-10-01-preview/swagger/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,32 @@
}
}
},
"/catalog/usql/databases/{databaseName}/secrets": {
"delete": {
"tags": [
"Catalog"
],
"operationId": "Catalog_DeleteAllSecrets",
"description": "Deletes all secrets in the specified database",
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database containing the secret."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/catalog/usql/databases/{databaseName}/externaldatasources/{externalDataSourceName}": {
"get": {
"tags": [
Expand Down Expand Up @@ -835,7 +861,7 @@
"Catalog"
],
"operationId": "Catalog_GetTableStatistic",
"description": "Retrieves the specified table from the Data Lake Analytics catalog.",
"description": "Retrieves the specified table statistics from the Data Lake Analytics catalog.",
"parameters": [
{
"name": "databaseName",
Expand Down Expand Up @@ -885,7 +911,7 @@
"Catalog"
],
"operationId": "Catalog_ListTableStatistics",
"description": "Retrieves the list of tables from the Data Lake Analytics catalog.",
"description": "Retrieves the list of table statistics from the Data Lake Analytics catalog.",
"parameters": [
{
"name": "databaseName",
Expand Down Expand Up @@ -976,6 +1002,153 @@
}
}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}": {
"get": {
"tags": [
"Catalog"
],
"operationId": "Catalog_GetTablePartition",
"description": "Retrieves the specified table partition from the Data Lake Analytics catalog.",
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database containing the partition."
},
{
"name": "schemaName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the schema containing the partition."
},
{
"name": "tableName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table containing the partition."
},
{
"name": "partitionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table partition."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/USqlTablePartition"
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general comment: have default response everyewhere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of today AutoRest will atleast deserialized code and message into the CloudError object. Any extra properties will not be deserialized since default does not have a schema. Although you will get the raw request and response as properties of the Exception so you can do deserialized it your way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amarzavery that makes sense. Our errors actually adhere to the CloudError schema as it is right now, so it makes sense for us to use the default CloudException/CloudError setup. Below is the schema for all of our errors except Filesystem (which I updated). This should be properly deserialized by CloudError, right?

“error”: {
“code”: “string”,
“message”: “string”,
“target”: “optional string”,
“details”: [{
“code”: “string”,
“message”: “string”,
“target”: “optional string”
]},
“innerError”: {
“context”: “string”,
“trace”: “sdf”
}
}

Copy link
Contributor

@amarzavery amarzavery May 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will get deserialized correctly in node.js as the mapper has it defined.
It looks like this will be deserialized correctly in C# as well (even when the default schema is not specified).
@markcowl @hovsepm - Is my understanding correct?

}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions": {
"get": {
"tags": [
"Catalog"
],
"operationId": "Catalog_ListTablePartitions",
"description": "Retrieves the list of table partitions from the Data Lake Analytics catalog.",
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database containing the partitions."
},
{
"name": "schemaName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the schema containing the partitions."
},
{
"name": "tableName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table containing the partitions."
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "OData filter. Optional."
},
{
"name": "$top",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"description": "The number of items to return. Optional."
},
{
"name": "$skip",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"description": "The number of items to skip over before returning elements. Optional."
},
{
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional."
},
{
"name": "$select",
"in": "query",
"required": false,
"type": "string",
"description": "OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional."
},
{
"name": "$orderby",
"in": "query",
"required": false,
"type": "string",
"description": "OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional."
},
{
"name": "$count",
"in": "query",
"required": false,
"type": "boolean",
"description": "The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"default" response?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a new requirement? by default, anything that is not a 200 response gets generated into a cloudException, which is currently what we want for everything except our filesystem swagger. What should I be putting in the default response if I want to continue to have the current behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amarzavery for example, https://github.com/Azure/azure-rest-api-specs/blob/master/arm-resources/resources/2016-02-01/swagger/resources.json does not contain a single "default" either, since it uses the built in "everything that isn't explicitly specified is a CloudError" model.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be fine

"description": "",
"schema": {
"$ref": "#/definitions/USqlTablePartitionList"
}
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x-ms-odata ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the question is here. We support x-ms-odata types for one type "USqlType", but that is not at this line. Do I need to include it everywhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the doc the x-ms-odata extension is applied on the operation and not on the type. This will indicate AutoRest that it needs to handle odata parameters in a special way. As this operation has odata parameters and the x-ms-odata extension was missing hence high highlighted it.
@markcowl, @hovsepm - is my understanding correct?

"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/types": {
"get": {
"tags": [
Expand Down Expand Up @@ -2006,6 +2179,59 @@
},
"description": "A Data Lake Analytics catalog U-SQL view item list."
},
"USqlTablePartition": {
"allOf": [
{
"$ref": "#/definitions/CatalogItem"
}
],
"properties": {
"databaseName": {
"type": "string",
"description": "Gets or sets the name of the database."
},
"schemaName": {
"type": "string",
"description": "Gets or sets the name of the schema associated with this table partition and database."
},
"partitionName": {
"type": "string",
"x-ms-client-name": "name",
"description": "Gets or sets the name of the table partition."
},
"indexId": {
"type": "integer",
"format": "int32",
"description": "Gets or sets the index ID for this partition."
},
"label": {
"type": "array",
"items": {
"type": "string"
},
"description": "Gets or sets the list of labels associated with this partition."
}
},
"description": "A Data Lake Analytics catalog U-SQL table partition item."
},
"USqlTablePartitionList": {
"allOf": [
{
"$ref": "#/definitions/CatalogItemList"
}
],
"properties": {
"value": {
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/USqlTablePartition"
},
"description": "Gets the list of table partitions in the database, schema and table combination"
}
},
"description": "A Data Lake Analytics catalog U-SQL table partition item list."
},
"USqlTableStatistics": {
"allOf": [
{
Expand Down
Loading