Skip to content

Commit

Permalink
Automated build 'Automated commit 'Merge pull request #1831 from sail…
Browse files Browse the repository at this point in the history
…point/pchinchkar/CONSEALINK-5916

CONSEALINK-5916: Corrected Invalid request body for PATCH request in documentation' by github action: 11053668122' python sdk: 11053675925
  • Loading branch information
developer-relations-sp committed Sep 26, 2024
1 parent 41ac1ec commit c23c207
Show file tree
Hide file tree
Showing 32 changed files with 410 additions and 413 deletions.
4 changes: 2 additions & 2 deletions sailpoint/beta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@
from sailpoint.beta.models.invocation_status_type import InvocationStatusType
from sailpoint.beta.models.json_patch import JsonPatch
from sailpoint.beta.models.json_patch_operation import JsonPatchOperation
from sailpoint.beta.models.json_patch_operation_value import JsonPatchOperationValue
from sailpoint.beta.models.json_patch_operations import JsonPatchOperations
from sailpoint.beta.models.json_patch_operations_value import JsonPatchOperationsValue
from sailpoint.beta.models.kba_answer_request_item import KbaAnswerRequestItem
Expand Down Expand Up @@ -913,7 +912,8 @@
from sailpoint.beta.models.trigger_example_output import TriggerExampleOutput
from sailpoint.beta.models.trigger_type import TriggerType
from sailpoint.beta.models.update_access_profiles_in_bulk412_response import UpdateAccessProfilesInBulk412Response
from sailpoint.beta.models.update_multi_host_sources_request import UpdateMultiHostSourcesRequest
from sailpoint.beta.models.update_multi_host_sources_request_inner import UpdateMultiHostSourcesRequestInner
from sailpoint.beta.models.update_multi_host_sources_request_inner_value import UpdateMultiHostSourcesRequestInnerValue
from sailpoint.beta.models.usage_type import UsageType
from sailpoint.beta.models.user_app import UserApp
from sailpoint.beta.models.user_app_account import UserAppAccount
Expand Down
347 changes: 174 additions & 173 deletions sailpoint/beta/api/multi_host_integration_api.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sailpoint/beta/docs/JsonPatchOperation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**op** | **str** | The operation to be performed |
**path** | **str** | A string JSON Pointer representing the target path to an element to be affected by the operation |
**value** | [**JsonPatchOperationValue**](JsonPatchOperationValue.md) | | [optional]
**value** | [**UpdateMultiHostSourcesRequestInnerValue**](UpdateMultiHostSourcesRequestInnerValue.md) | | [optional]

## Example

Expand Down
29 changes: 0 additions & 29 deletions sailpoint/beta/docs/JsonPatchOperationValue.md

This file was deleted.

104 changes: 52 additions & 52 deletions sailpoint/beta/docs/MultiHostIntegrationApi.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sailpoint/beta/docs/PatchPotentialRoleRequestInner.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**op** | **str** | The operation to be performed | [optional]
**path** | **str** | A string JSON Pointer representing the target path to an element to be affected by the operation |
**value** | [**JsonPatchOperationValue**](JsonPatchOperationValue.md) | | [optional]
**value** | [**UpdateMultiHostSourcesRequestInnerValue**](UpdateMultiHostSourcesRequestInnerValue.md) | | [optional]

## Example

Expand Down
30 changes: 0 additions & 30 deletions sailpoint/beta/docs/UpdateMultiHostSourcesRequest.md

This file was deleted.

32 changes: 32 additions & 0 deletions sailpoint/beta/docs/UpdateMultiHostSourcesRequestInner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# UpdateMultiHostSourcesRequestInner

A JSONPatch Operation as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902)

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**op** | **str** | The operation to be performed |
**path** | **str** | A string JSON Pointer representing the target path to an element to be affected by the operation |
**value** | [**UpdateMultiHostSourcesRequestInnerValue**](UpdateMultiHostSourcesRequestInnerValue.md) | | [optional]

## Example

```python
from sailpoint.beta.models.update_multi_host_sources_request_inner import UpdateMultiHostSourcesRequestInner

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateMultiHostSourcesRequestInner from a JSON string
update_multi_host_sources_request_inner_instance = UpdateMultiHostSourcesRequestInner.from_json(json)
# print the JSON string representation of the object
print(UpdateMultiHostSourcesRequestInner.to_json())

# convert the object into a dict
update_multi_host_sources_request_inner_dict = update_multi_host_sources_request_inner_instance.to_dict()
# create an instance of UpdateMultiHostSourcesRequestInner from a dict
update_multi_host_sources_request_inner_from_dict = UpdateMultiHostSourcesRequestInner.from_dict(update_multi_host_sources_request_inner_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


29 changes: 29 additions & 0 deletions sailpoint/beta/docs/UpdateMultiHostSourcesRequestInnerValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# UpdateMultiHostSourcesRequestInnerValue

The value to be used for the operation, required for \"add\" and \"replace\" operations

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Example

```python
from sailpoint.beta.models.update_multi_host_sources_request_inner_value import UpdateMultiHostSourcesRequestInnerValue

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateMultiHostSourcesRequestInnerValue from a JSON string
update_multi_host_sources_request_inner_value_instance = UpdateMultiHostSourcesRequestInnerValue.from_json(json)
# print the JSON string representation of the object
print(UpdateMultiHostSourcesRequestInnerValue.to_json())

# convert the object into a dict
update_multi_host_sources_request_inner_value_dict = update_multi_host_sources_request_inner_value_instance.to_dict()
# create an instance of UpdateMultiHostSourcesRequestInnerValue from a dict
update_multi_host_sources_request_inner_value_from_dict = UpdateMultiHostSourcesRequestInnerValue.from_dict(update_multi_host_sources_request_inner_value_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


4 changes: 2 additions & 2 deletions sailpoint/beta/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@
from sailpoint.beta.models.invocation_status_type import InvocationStatusType
from sailpoint.beta.models.json_patch import JsonPatch
from sailpoint.beta.models.json_patch_operation import JsonPatchOperation
from sailpoint.beta.models.json_patch_operation_value import JsonPatchOperationValue
from sailpoint.beta.models.json_patch_operations import JsonPatchOperations
from sailpoint.beta.models.json_patch_operations_value import JsonPatchOperationsValue
from sailpoint.beta.models.kba_answer_request_item import KbaAnswerRequestItem
Expand Down Expand Up @@ -824,7 +823,8 @@
from sailpoint.beta.models.trigger_example_output import TriggerExampleOutput
from sailpoint.beta.models.trigger_type import TriggerType
from sailpoint.beta.models.update_access_profiles_in_bulk412_response import UpdateAccessProfilesInBulk412Response
from sailpoint.beta.models.update_multi_host_sources_request import UpdateMultiHostSourcesRequest
from sailpoint.beta.models.update_multi_host_sources_request_inner import UpdateMultiHostSourcesRequestInner
from sailpoint.beta.models.update_multi_host_sources_request_inner_value import UpdateMultiHostSourcesRequestInnerValue
from sailpoint.beta.models.usage_type import UsageType
from sailpoint.beta.models.user_app import UserApp
from sailpoint.beta.models.user_app_account import UserAppAccount
Expand Down
6 changes: 3 additions & 3 deletions sailpoint/beta/models/json_patch_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from sailpoint.beta.models.json_patch_operation_value import JsonPatchOperationValue
from sailpoint.beta.models.update_multi_host_sources_request_inner_value import UpdateMultiHostSourcesRequestInnerValue
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -29,7 +29,7 @@ class JsonPatchOperation(BaseModel):
""" # noqa: E501
op: StrictStr = Field(description="The operation to be performed")
path: StrictStr = Field(description="A string JSON Pointer representing the target path to an element to be affected by the operation")
value: Optional[JsonPatchOperationValue] = None
value: Optional[UpdateMultiHostSourcesRequestInnerValue] = None
__properties: ClassVar[List[str]] = ["op", "path", "value"]

@field_validator('op')
Expand Down Expand Up @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"op": obj.get("op"),
"path": obj.get("path"),
"value": JsonPatchOperationValue.from_dict(obj["value"]) if obj.get("value") is not None else None
"value": UpdateMultiHostSourcesRequestInnerValue.from_dict(obj["value"]) if obj.get("value") is not None else None
})
return _obj

Expand Down
6 changes: 3 additions & 3 deletions sailpoint/beta/models/patch_potential_role_request_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from sailpoint.beta.models.json_patch_operation_value import JsonPatchOperationValue
from sailpoint.beta.models.update_multi_host_sources_request_inner_value import UpdateMultiHostSourcesRequestInnerValue
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -29,7 +29,7 @@ class PatchPotentialRoleRequestInner(BaseModel):
""" # noqa: E501
op: Optional[StrictStr] = Field(default=None, description="The operation to be performed")
path: StrictStr = Field(description="A string JSON Pointer representing the target path to an element to be affected by the operation")
value: Optional[JsonPatchOperationValue] = None
value: Optional[UpdateMultiHostSourcesRequestInnerValue] = None
__properties: ClassVar[List[str]] = ["op", "path", "value"]

@field_validator('op')
Expand Down Expand Up @@ -98,7 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"op": obj.get("op"),
"path": obj.get("path"),
"value": JsonPatchOperationValue.from_dict(obj["value"]) if obj.get("value") is not None else None
"value": UpdateMultiHostSourcesRequestInnerValue.from_dict(obj["value"]) if obj.get("value") is not None else None
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,27 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from sailpoint.beta.models.json_patch_operation import JsonPatchOperation
from sailpoint.beta.models.update_multi_host_sources_request_inner_value import UpdateMultiHostSourcesRequestInnerValue
from typing import Optional, Set
from typing_extensions import Self

class UpdateMultiHostSourcesRequest(BaseModel):
class UpdateMultiHostSourcesRequestInner(BaseModel):
"""
A JSONPatch document as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902). Only `replace` operations are accepted by this endpoint.
A JSONPatch Operation as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902)
""" # noqa: E501
operations: Optional[List[JsonPatchOperation]] = Field(default=None, description="Operations to be applied.")
__properties: ClassVar[List[str]] = ["operations"]
op: StrictStr = Field(description="The operation to be performed")
path: StrictStr = Field(description="A string JSON Pointer representing the target path to an element to be affected by the operation")
value: Optional[UpdateMultiHostSourcesRequestInnerValue] = None
__properties: ClassVar[List[str]] = ["op", "path", "value"]

@field_validator('op')
def op_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['add', 'replace']):
raise ValueError("must be one of enum values ('add', 'replace')")
return value

model_config = ConfigDict(
populate_by_name=True,
Expand All @@ -48,7 +57,7 @@ def to_json(self) -> str:

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of UpdateMultiHostSourcesRequest from a JSON string"""
"""Create an instance of UpdateMultiHostSourcesRequestInner from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
Expand All @@ -69,26 +78,24 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in operations (list)
_items = []
if self.operations:
for _item_operations in self.operations:
if _item_operations:
_items.append(_item_operations.to_dict())
_dict['operations'] = _items
# override the default output from pydantic by calling `to_dict()` of value
if self.value:
_dict['value'] = self.value.to_dict()
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of UpdateMultiHostSourcesRequest from a dict"""
"""Create an instance of UpdateMultiHostSourcesRequestInner from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({
"operations": [JsonPatchOperation.from_dict(_item) for _item in obj["operations"]] if obj.get("operations") is not None else None
"op": obj.get("op"),
"path": obj.get("path"),
"value": UpdateMultiHostSourcesRequestInnerValue.from_dict(obj["value"]) if obj.get("value") is not None else None
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self

JSONPATCHOPERATIONVALUE_ONE_OF_SCHEMAS = ["List[ArrayInner]", "bool", "int", "object", "str"]
UPDATEMULTIHOSTSOURCESREQUESTINNERVALUE_ONE_OF_SCHEMAS = ["List[ArrayInner]", "bool", "int", "object", "str"]

class JsonPatchOperationValue(BaseModel):
class UpdateMultiHostSourcesRequestInnerValue(BaseModel):
"""
The value to be used for the operation, required for \"add\" and \"replace\" operations
"""
Expand Down Expand Up @@ -59,7 +59,7 @@ def __init__(self, *args, **kwargs) -> None:

@field_validator('actual_instance')
def actual_instance_must_validate_oneof(cls, v):
instance = JsonPatchOperationValue.model_construct()
instance = UpdateMultiHostSourcesRequestInnerValue.model_construct()
error_messages = []
match = 0
# validate data type: str
Expand Down Expand Up @@ -94,10 +94,10 @@ def actual_instance_must_validate_oneof(cls, v):
error_messages.append(str(e))
if match > 1:
# more than 1 match
raise ValueError("Multiple matches found when setting `actual_instance` in JsonPatchOperationValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
raise ValueError("Multiple matches found when setting `actual_instance` in UpdateMultiHostSourcesRequestInnerValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
raise ValueError("No match found when setting `actual_instance` in JsonPatchOperationValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
raise ValueError("No match found when setting `actual_instance` in UpdateMultiHostSourcesRequestInnerValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
else:
return v

Expand Down Expand Up @@ -160,10 +160,10 @@ def from_json(cls, json_str: str) -> Self:

if match > 1:
# more than 1 match
raise ValueError("Multiple matches found when deserializing the JSON string into JsonPatchOperationValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
raise ValueError("Multiple matches found when deserializing the JSON string into UpdateMultiHostSourcesRequestInnerValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
raise ValueError("No match found when deserializing the JSON string into JsonPatchOperationValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
raise ValueError("No match found when deserializing the JSON string into UpdateMultiHostSourcesRequestInnerValue with oneOf schemas: List[ArrayInner], bool, int, object, str. Details: " + ", ".join(error_messages))
else:
return instance

Expand Down
14 changes: 7 additions & 7 deletions sailpoint/beta/test/test_multi_host_integration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ def test_get_multi_host_integrations_list(self) -> None:
"""
pass

def test_get_multi_host_source_creation_errors(self) -> None:
"""Test case for get_multi_host_source_creation_errors
List Multi-Host Source Creation Errors
"""
pass

def test_get_multihost_integration_types(self) -> None:
"""Test case for get_multihost_integration_types
Expand All @@ -89,13 +96,6 @@ def test_get_sources_within_multi_host(self) -> None:
"""
pass

def test_get_sources_within_multi_host_0(self) -> None:
"""Test case for get_sources_within_multi_host_0
List Multi-Host Integration Sources Creation Errors
"""
pass

def test_test_connection_multi_host_sources(self) -> None:
"""Test case for test_connection_multi_host_sources
Expand Down
Loading

0 comments on commit c23c207

Please sign in to comment.