Skip to content

Commit

Permalink
[Storage] File swagger updates (#6926)
Browse files Browse the repository at this point in the history
* Updating Storage Files swagger to 2019-02-02

This includes a few transform changes to set default values for new required
parameters and marked certain 8601 dates as strings when they use more precision
that Python's dates.

I'm seeing a few test failures that I'm hoping someone on the Python side can
investigate (mostly "The specified share is being deleted. Try operation later."
that I was seeing before my changes).  There are a few other failures related to
new service features that we can fix if easy or disable and file a work item to
get these changes in.  The recorded tests will also have to be updated, but we
don't need to block on that right now.

* swagger changes
  • Loading branch information
rakshith91 authored and zezha-msft committed Aug 23, 2019
1 parent dd9f07e commit ad35e58
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ async def set_properties(self, file_attributes="none", file_creation_time="now",
query_parameters = {}
if timeout is not None:
query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0)
query_parameters['restype'] = self._serialize.query("self.restype", self.restype, 'str')
query_parameters['comp'] = self._serialize.query("comp", comp, 'str')

# Construct headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ def set_properties(self, file_attributes="none", file_creation_time="now", file_
query_parameters = {}
if timeout is not None:
query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0)
query_parameters['restype'] = self._serialize.query("self.restype", self.restype, 'str')
query_parameters['comp'] = self._serialize.query("comp", comp, 'str')

# Construct headers
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/azure-storage-file/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ directive:
```
### FileRangeWriteFromUrl Constant
This value is supposed to be the constant value update and these changes turn it from a parameter into a constant.
``` yaml
directive:
- from: swagger-document
Expand Down
74 changes: 62 additions & 12 deletions sdk/storage/azure-storage-file/swagger/file-2019-02-02.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
"description": "A UTC date/time value generated by the service that indicates the time at which the response was initiated."
},
"x-ms-file-permission-key": {
"x-ms-client-name": "FilePermissonKey",
"x-ms-client-name": "FilePermissionKey",
"type": "string",
"description": "Key of the permission set for the directory/file."
}
Expand Down Expand Up @@ -1090,7 +1090,7 @@
"description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise."
},
"x-ms-file-permission-key": {
"x-ms-client-name": "FilePermissonKey",
"x-ms-client-name": "FilePermissionKey",
"type": "string",
"description": "Key of the permission set for the directory."
},
Expand Down Expand Up @@ -1428,15 +1428,26 @@
}
}
},
"parameters": [{
"name": "comp",
"in": "query",
"required": true,
"type": "string",
"enum": [
"properties"
]
}]
"parameters": [
{
"name": "restype",
"in": "query",
"required": true,
"type": "string",
"enum": [
"directory"
]
},
{
"name": "comp",
"in": "query",
"required": true,
"type": "string",
"enum": [
"properties"
]
}
]
},
"/{shareName}/{directory}?restype=directory&comp=metadata": {
"put": {
Expand Down Expand Up @@ -1500,7 +1511,8 @@
}
}
},
"parameters": [{
"parameters": [
{
"name": "restype",
"in": "query",
"required": true,
Expand Down Expand Up @@ -2236,6 +2248,44 @@
"x-ms-client-name": "IsServerEncrypted",
"type": "boolean",
"description": "The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the file is unencrypted, or if only parts of the file/application metadata are encrypted)."
},
"x-ms-file-attributes": {
"x-ms-client-name": "FileAttributes",
"type": "string",
"description": "Attributes set for the file."
},
"x-ms-file-creation-time": {
"x-ms-client-name": "FileCreationTime",
"type": "string",
"format": "date-time-rfc1123",
"description": "Creation time for the file."
},
"x-ms-file-last-write-time": {
"x-ms-client-name": "FileLastWriteTime",
"type": "string",
"format": "date-time-rfc1123",
"description": "Last write time for the file."
},
"x-ms-file-change-time": {
"x-ms-client-name": "FileChangeTime",
"type": "string",
"format": "date-time-rfc1123",
"description": "Change time for the file."
},
"x-ms-file-permission-key": {
"x-ms-client-name": "FilePermissionKey",
"type": "string",
"description": "Key of the permission set for the file."
},
"x-ms-file-id": {
"x-ms-client-name": "FileId",
"type": "string",
"description": "The fileId of the file."
},
"x-ms-file-parent-id": {
"x-ms-client-name": "FileParentId",
"type": "string",
"description": "The parent fileId of the file."
}
},
"schema": {
Expand Down

0 comments on commit ad35e58

Please sign in to comment.