Skip to content

Commit

Permalink
fix(Global Search): remove is_hidden param from search operation (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: francescadecicco <francescadecicco@it.ibm.com>
  • Loading branch information
francescadecicco authored Mar 7, 2023
1 parent 2843954 commit 548313c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
19 changes: 1 addition & 18 deletions ibm_platform_services/global_search_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# IBM OpenAPI SDK Code Generator Version: 3.63.0-5dae26c1-20230111-193039
# IBM OpenAPI SDK Code Generator Version: 3.67.0-df2073a1-20230222-221157

"""
Search for resources with the global and shared resource properties repository that is
Expand Down Expand Up @@ -101,7 +101,6 @@ def search(
is_public: str = None,
impersonate_user: str = None,
can_tag: str = None,
is_hidden: str = None,
**kwargs
) -> DetailedResponse:
"""
Expand Down Expand Up @@ -169,10 +168,6 @@ def search(
(only a GhoST admin can use this parameter). If false (default), only
resources user can view are returned; if true, only resources that user has
permissions for tagging are returned (_for administrators only_).
:param str is_hidden: (optional) Determines if the result set must return
only the visible resources or not. If false (default), only visible
resources are returned; if true, only hidden resources are returned; if
any, all resources are returned.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `ScanResult` object
Expand All @@ -197,7 +192,6 @@ def search(
'is_public': is_public,
'impersonate_user': impersonate_user,
'can_tag': can_tag,
'is_hidden': is_hidden,
}

data = {
Expand Down Expand Up @@ -318,17 +312,6 @@ class CanTag(str, Enum):
TRUE = 'true'
FALSE = 'false'

class IsHidden(str, Enum):
"""
Determines if the result set must return only the visible resources or not. If
false (default), only visible resources are returned; if true, only hidden
resources are returned; if any, all resources are returned.
"""

TRUE = 'true'
FALSE = 'false'
ANY = 'any'


##############################################################################
# Models
Expand Down
3 changes: 0 additions & 3 deletions test/unit/test_global_search_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def test_search_all_params(self):
is_public = 'false'
impersonate_user = 'testString'
can_tag = 'false'
is_hidden = 'false'

# Invoke method
response = _service.search(
Expand All @@ -143,7 +142,6 @@ def test_search_all_params(self):
is_public=is_public,
impersonate_user=impersonate_user,
can_tag=can_tag,
is_hidden=is_hidden,
headers={},
)

Expand All @@ -163,7 +161,6 @@ def test_search_all_params(self):
assert 'is_public={}'.format(is_public) in query_string
assert 'impersonate_user={}'.format(impersonate_user) in query_string
assert 'can_tag={}'.format(can_tag) in query_string
assert 'is_hidden={}'.format(is_hidden) in query_string
# Validate body params
req_body = json.loads(str(responses.calls[0].request.body, 'utf-8'))
assert req_body['query'] == 'testString'
Expand Down

0 comments on commit 548313c

Please sign in to comment.