Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Fixed required access policy
  • Loading branch information
annatisch committed Aug 15, 2019
commit 161102580dc5fb4ae7b507e038d652e3340172c9
Original file line number Diff line number Diff line change
Expand Up @@ -1407,13 +1407,12 @@ class SignedIdentifier(Model):

:param id: Required. a unique id
:type id: str
:param access_policy: Required.
:param access_policy:
:type access_policy: ~azure.storage.blob.models.AccessPolicy
"""

_validation = {
'id': {'required': True},
'access_policy': {'required': True},
}

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1407,13 +1407,12 @@ class SignedIdentifier(Model):

:param id: Required. a unique id
:type id: str
:param access_policy: Required.
:param access_policy:
:type access_policy: ~azure.storage.blob.models.AccessPolicy
"""

_validation = {
'id': {'required': True},
'access_policy': {'required': True},
}

_attribute_map = {
Expand All @@ -1424,7 +1423,7 @@ class SignedIdentifier(Model):
'name': 'SignedIdentifier'
}

def __init__(self, *, id: str, access_policy, **kwargs) -> None:
def __init__(self, *, id: str, access_policy=None, **kwargs) -> None:
super(SignedIdentifier, self).__init__(**kwargs)
self.id = id
self.access_policy = access_policy
Expand Down
8 changes: 8 additions & 0 deletions sdk/storage/azure-storage-blob/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ directive:
transform: >
$.properties.BlobPrefixes.xml = { "name": "BlobPrefix" };
$.properties.BlobItems.xml = { "name": "Blob" };
```

### SignedIdentifier shouldn't require an AccessPolicy, only ID
``` yaml
directive:
- from: swagger-document
where: $.definitions.SignedIdentifier
transform: >
$.required = [ "Id" ];
```

### Make AccessTier Unique
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- azsdk-python-storage-blob/12.0.0b2 Python/3.7.4 (Windows-10-10.0.17763-SP0)
content-type:
- application/xml; charset=utf-8
x-ms-client-request-id:
- 8c1085a2-bef4-11e9-bcad-b831b5891408
x-ms-date:
- Thu, 15 Aug 2019 00:35:14 GMT
x-ms-version:
- '2019-02-02'
method: PUT
uri: https://storagename.blob.core.windows.net/containerf22818cb?restype=container
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Thu, 15 Aug 2019 00:35:15 GMT
ETag:
- '"0x8D721187110842F"'
Last-Modified:
- Thu, 15 Aug 2019 00:35:15 GMT
Server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-client-request-id:
- 8c1085a2-bef4-11e9-bcad-b831b5891408
x-ms-request-id:
- 098af1ee-a01e-002e-7101-53e4c7000000
x-ms-version:
- '2019-02-02'
status:
code: 201
message: Created
- request:
body: '<?xml version=''1.0'' encoding=''utf-8''?>

<SignedIdentifiers><SignedIdentifier><Id>0</Id></SignedIdentifier><SignedIdentifier><Id>1</Id></SignedIdentifier></SignedIdentifiers>'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '172'
Content-Type:
- application/xml; charset=utf-8
User-Agent:
- azsdk-python-storage-blob/12.0.0b2 Python/3.7.4 (Windows-10-10.0.17763-SP0)
x-ms-client-request-id:
- 8cf0245e-bef4-11e9-ae3c-b831b5891408
x-ms-date:
- Thu, 15 Aug 2019 00:35:15 GMT
x-ms-version:
- '2019-02-02'
method: PUT
uri: https://storagename.blob.core.windows.net/containerf22818cb?restype=container&comp=acl
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Thu, 15 Aug 2019 00:35:15 GMT
ETag:
- '"0x8D72118713EA993"'
Last-Modified:
- Thu, 15 Aug 2019 00:35:15 GMT
Server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-client-request-id:
- 8cf0245e-bef4-11e9-ae3c-b831b5891408
x-ms-request-id:
- 098af281-a01e-002e-7801-53e4c7000000
x-ms-version:
- '2019-02-02'
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/xml, application/octet-stream, text/plain
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- azsdk-python-storage-blob/12.0.0b2 Python/3.7.4 (Windows-10-10.0.17763-SP0)
content-type:
- application/xml; charset=utf-8
x-ms-client-request-id:
- 8d2c88be-bef4-11e9-9b0a-b831b5891408
x-ms-date:
- Thu, 15 Aug 2019 00:35:16 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://storagename.blob.core.windows.net/containerf22818cb?restype=container&comp=acl
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><SignedIdentifiers><SignedIdentifier><Id>0</Id></SignedIdentifier><SignedIdentifier><Id>1</Id></SignedIdentifier></SignedIdentifiers>"
headers:
Content-Type:
- application/xml
Date:
- Thu, 15 Aug 2019 00:35:16 GMT
ETag:
- '"0x8D72118713EA993"'
Last-Modified:
- Thu, 15 Aug 2019 00:35:15 GMT
Server:
- Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Transfer-Encoding:
- chunked
Vary:
- Origin
x-ms-client-request-id:
- 8d2c88be-bef4-11e9-9b0a-b831b5891408
x-ms-request-id:
- 098af300-a01e-002e-6d01-53e4c7000000
x-ms-version:
- '2019-02-02'
status:
code: 200
message: OK
version: 1
Loading