Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions sdk/purview/azure-purview-catalog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- Fix `delete_by_guids` to get rid of bad request error #22487

### Other Changes

## 1.0.0b2 (2021-09-29)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ async def list_by_guids(
) -> Any:
"""List entities in bulk identified by its GUIDs.

:keyword guids: An array of GUIDs of entities to create.
:keyword guids: An array of GUIDs of entities to list.
:paramtype guids: list[str]
:keyword min_ext_info: Whether to return minimal information for referred entities.
:paramtype min_ext_info: bool
Expand Down Expand Up @@ -9852,7 +9852,7 @@ async def query(
"filter": {}, # Optional. The filter for the search. See examples for the usage of supported filters.
"keywords": "str", # Optional. The keywords applied to all searchable fields.
"limit": 0, # Optional. The limit of the number of the search result. default value is 50; maximum value is 1000.
"offset": 0, # Optional. The offset. The default value is 0.
"offset": 0, # Optional. The offset. The default value is 0. The maximum value is 100000.
"taxonomySetting": {
"assetTypes": [
"str" # Optional.
Expand Down Expand Up @@ -10129,8 +10129,8 @@ async def browse(
# JSON input template you can fill out and use as your body input.
browse_request = {
"entityType": "str", # Optional. The entity type to browse as the root level entry point.
"limit": 0, # Optional. The number of browse items we hope to return.
"offset": 0, # Optional. The offset. The default value is 0.
"limit": 0, # Optional. The number of browse items we hope to return. The maximum value is 10000.
"offset": 0, # Optional. The offset. The default value is 0. The maximum value is 100000.
"path": "str" # Optional. The path to browse the next level child entities.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def build_entity_list_by_guids_request(

# Construct parameters
query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
query_parameters['guids'] = [_SERIALIZER.query("guids", q, 'str') if q is not None else '' for q in guids]
query_parameters['guid'] = [_SERIALIZER.query("guids", q, 'str') if q is not None else '' for q in guids]
if min_ext_info is not None:
query_parameters['minExtInfo'] = _SERIALIZER.query("min_ext_info", min_ext_info, 'bool')
if ignore_relationships is not None:
Expand Down Expand Up @@ -127,7 +127,7 @@ def build_entity_delete_by_guids_request(

# Construct parameters
query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
query_parameters['guids'] = [_SERIALIZER.query("guids", q, 'str') if q is not None else '' for q in guids]
query_parameters['guid'] = [_SERIALIZER.query("guids", q, 'str') if q is not None else '' for q in guids]

# Construct headers
header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
Expand Down Expand Up @@ -3197,7 +3197,7 @@ def list_by_guids(
# type: (...) -> Any
"""List entities in bulk identified by its GUIDs.

:keyword guids: An array of GUIDs of entities to create.
:keyword guids: An array of GUIDs of entities to list.
:paramtype guids: list[str]
:keyword min_ext_info: Whether to return minimal information for referred entities.
:paramtype min_ext_info: bool
Expand Down Expand Up @@ -12721,7 +12721,7 @@ def query(
"filter": {}, # Optional. The filter for the search. See examples for the usage of supported filters.
"keywords": "str", # Optional. The keywords applied to all searchable fields.
"limit": 0, # Optional. The limit of the number of the search result. default value is 50; maximum value is 1000.
"offset": 0, # Optional. The offset. The default value is 0.
"offset": 0, # Optional. The offset. The default value is 0. The maximum value is 100000.
"taxonomySetting": {
"assetTypes": [
"str" # Optional.
Expand Down Expand Up @@ -13000,8 +13000,8 @@ def browse(
# JSON input template you can fill out and use as your body input.
browse_request = {
"entityType": "str", # Optional. The entity type to browse as the root level entry point.
"limit": 0, # Optional. The number of browse items we hope to return.
"offset": 0, # Optional. The offset. The default value is 0.
"limit": 0, # Optional. The number of browse items we hope to return. The maximum value is 10000.
"offset": 0, # Optional. The offset. The default value is 0. The maximum value is 100000.
"path": "str" # Optional. The path to browse the next level child entities.
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/purview/azure-purview-catalog/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ autorest
### Settings

```yaml
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-05-01-preview/purviewcatalog.json
input-file: https://github.com/Azure/azure-rest-api-specs/blob/dc439efcfc15448824877603f66fc1578d1c71c5/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-05-01-preview/purviewcatalog.json
output-folder: ../azure/purview/catalog
namespace: azure.purview.catalog
package-name: azure-purview-catalog
Expand Down
10 changes: 10 additions & 0 deletions sdk/purview/azure-purview-catalog/tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# license information.
# --------------------------------------------------------------------------
from testcase import PurviewCatalogTest, PurviewCatalogPowerShellPreparer
from urllib.parse import urlparse
from azure.purview.catalog.operations._operations import build_entity_delete_by_guids_request, build_entity_list_by_guids_request


class PurviewCatalogSmokeTest(PurviewCatalogTest):
Expand All @@ -15,3 +17,11 @@ def test_basic_smoke_test(self, purviewcatalog_endpoint):
response = client.types.get_all_type_definitions()

assert set(response.keys()) == set(['enumDefs', 'structDefs', 'classificationDefs', 'entityDefs', 'relationshipDefs'])

def test_delete_by_guids(self):
request = build_entity_delete_by_guids_request(guids=["foo", "bar"])
assert urlparse(request.url).query == "guid=foo&guid=bar"

def test_list_by_guids(self):
request = build_entity_list_by_guids_request(guids=["foo", "bar"])
assert "guid=foo&guid=bar" in urlparse(request.url).query