Skip to content

Commit

Permalink
Automated build 'Automated commit 'Merge pull request #1537 from sail…
Browse files Browse the repository at this point in the history
…point/philc/IDNDENALI-9007

IDNDENALI-9007 - Updated V3 SDIM Patch description to match implementation' by github action: 7616000011' powershell sdk: 7616004282
  • Loading branch information
developer-relations-sp committed Jan 22, 2024
1 parent 0c53fd7 commit 7f5a725
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 38 deletions.
9 changes: 5 additions & 4 deletions PSSailpoint/PSSailpoint.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ FunctionsToExport = 'New-AccessProfile', 'Remove-AccessProfile',
'Initialize-IndexOf', 'ConvertFrom-JsonToIndexOf',
'Initialize-InnerHit', 'ConvertFrom-JsonToInnerHit',
'Initialize-ISO3166', 'ConvertFrom-JsonToISO3166',
'Initialize-JsonPatch', 'ConvertFrom-JsonToJsonPatch',
'Initialize-JsonPatchOperation',
'ConvertFrom-JsonToJsonPatchOperation',
'ConvertFrom-JsonToJsonPatchOperationValue', 'Initialize-LeftPad',
Expand Down Expand Up @@ -586,9 +585,11 @@ FunctionsToExport = 'New-AccessProfile', 'Remove-AccessProfile',
'Initialize-PasswordOrgConfig',
'ConvertFrom-JsonToPasswordOrgConfig', 'Initialize-PasswordStatus',
'ConvertFrom-JsonToPasswordStatus', 'Initialize-PasswordSyncGroup',
'ConvertFrom-JsonToPasswordSyncGroup', 'Initialize-PatOwner',
'ConvertFrom-JsonToPatOwner', 'Initialize-PendingApproval',
'ConvertFrom-JsonToPendingApproval',
'ConvertFrom-JsonToPasswordSyncGroup',
'Initialize-PatchServiceDeskIntegrationRequest',
'ConvertFrom-JsonToPatchServiceDeskIntegrationRequest',
'Initialize-PatOwner', 'ConvertFrom-JsonToPatOwner',
'Initialize-PendingApproval', 'ConvertFrom-JsonToPendingApproval',
'Initialize-PendingApprovalOwner',
'ConvertFrom-JsonToPendingApprovalOwner',
'Initialize-PermissionDto', 'ConvertFrom-JsonToPermissionDto',
Expand Down
6 changes: 3 additions & 3 deletions PSSailpoint/v3/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ docs/ImportObject.md
docs/Index.md
docs/IndexOf.md
docs/InnerHit.md
docs/JsonPatch.md
docs/JsonPatchOperation.md
docs/JsonPatchOperationValue.md
docs/LeftPad.md
Expand Down Expand Up @@ -304,6 +303,7 @@ docs/PasswordStatus.md
docs/PasswordSyncGroup.md
docs/PasswordSyncGroupsApi.md
docs/PatOwner.md
docs/PatchServiceDeskIntegrationRequest.md
docs/PendingApproval.md
docs/PendingApprovalAction.md
docs/PendingApprovalOwner.md
Expand Down Expand Up @@ -751,7 +751,6 @@ src/PSSailpoint/Model/ImportObject.ps1
src/PSSailpoint/Model/Index.ps1
src/PSSailpoint/Model/IndexOf.ps1
src/PSSailpoint/Model/InnerHit.ps1
src/PSSailpoint/Model/JsonPatch.ps1
src/PSSailpoint/Model/JsonPatchOperation.ps1
src/PSSailpoint/Model/JsonPatchOperationValue.ps1
src/PSSailpoint/Model/LeftPad.ps1
Expand Down Expand Up @@ -821,6 +820,7 @@ src/PSSailpoint/Model/PasswordOrgConfig.ps1
src/PSSailpoint/Model/PasswordStatus.ps1
src/PSSailpoint/Model/PasswordSyncGroup.ps1
src/PSSailpoint/Model/PatOwner.ps1
src/PSSailpoint/Model/PatchServiceDeskIntegrationRequest.ps1
src/PSSailpoint/Model/PendingApproval.ps1
src/PSSailpoint/Model/PendingApprovalAction.ps1
src/PSSailpoint/Model/PendingApprovalOwner.ps1
Expand Down Expand Up @@ -1256,7 +1256,6 @@ tests/Model/ImportObject.Tests.ps1
tests/Model/Index.Tests.ps1
tests/Model/IndexOf.Tests.ps1
tests/Model/InnerHit.Tests.ps1
tests/Model/JsonPatch.Tests.ps1
tests/Model/JsonPatchOperation.Tests.ps1
tests/Model/JsonPatchOperationValue.Tests.ps1
tests/Model/LeftPad.Tests.ps1
Expand Down Expand Up @@ -1326,6 +1325,7 @@ tests/Model/PasswordOrgConfig.Tests.ps1
tests/Model/PasswordStatus.Tests.ps1
tests/Model/PasswordSyncGroup.Tests.ps1
tests/Model/PatOwner.Tests.ps1
tests/Model/PatchServiceDeskIntegrationRequest.Tests.ps1
tests/Model/PendingApproval.Tests.ps1
tests/Model/PendingApprovalAction.Tests.ps1
tests/Model/PendingApprovalOwner.Tests.ps1
Expand Down
2 changes: 1 addition & 1 deletion PSSailpoint/v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ Class | Method | HTTP request | Description
- [PSSailpoint\Model.Index](docs/Index.md)
- [PSSailpoint\Model.IndexOf](docs/IndexOf.md)
- [PSSailpoint\Model.InnerHit](docs/InnerHit.md)
- [PSSailpoint\Model.JsonPatch](docs/JsonPatch.md)
- [PSSailpoint\Model.JsonPatchOperation](docs/JsonPatchOperation.md)
- [PSSailpoint\Model.JsonPatchOperationValue](docs/JsonPatchOperationValue.md)
- [PSSailpoint\Model.LeftPad](docs/LeftPad.md)
Expand Down Expand Up @@ -602,6 +601,7 @@ Class | Method | HTTP request | Description
- [PSSailpoint\Model.PasswordStatus](docs/PasswordStatus.md)
- [PSSailpoint\Model.PasswordSyncGroup](docs/PasswordSyncGroup.md)
- [PSSailpoint\Model.PatOwner](docs/PatOwner.md)
- [PSSailpoint\Model.PatchServiceDeskIntegrationRequest](docs/PatchServiceDeskIntegrationRequest.md)
- [PSSailpoint\Model.PendingApproval](docs/PendingApproval.md)
- [PSSailpoint\Model.PendingApprovalAction](docs/PendingApprovalAction.md)
- [PSSailpoint\Model.PendingApprovalOwner](docs/PendingApprovalOwner.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JsonPatch
# PatchServiceDeskIntegrationRequest
## Properties

Name | Type | Description | Notes
Expand All @@ -9,12 +9,12 @@ Name | Type | Description | Notes

- Prepare the resource
```powershell
$JsonPatch = Initialize-PSSailpointJsonPatch -Operations null
$PatchServiceDeskIntegrationRequest = Initialize-PSSailpointPatchServiceDeskIntegrationRequest -Operations null
```

- Convert the resource to JSON
```powershell
$JsonPatch | ConvertTo-JSON
$PatchServiceDeskIntegrationRequest | ConvertTo-JSON
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
8 changes: 4 additions & 4 deletions PSSailpoint/v3/docs/ServiceDeskIntegrationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ This endpoint does not need any parameter.
# **Update-ServiceDeskIntegration**
> ServiceDeskIntegrationDto Update-ServiceDeskIntegration<br>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Id] <String><br>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-JsonPatch] <PSCustomObject><br>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-PatchServiceDeskIntegrationRequest] <PSCustomObject><br>
Service Desk Integration Update PATCH

Expand All @@ -408,11 +408,11 @@ $Id = "anId" # String | ID of the Service Desk integration to update
$JsonPatchOperationValue = Initialize-JsonPatchOperationValue
$JsonPatchOperation = Initialize-JsonPatchOperation -Op "add" -Path "/description" -Value $JsonPatchOperationValue
$JsonPatch = Initialize-JsonPatch -Operations $JsonPatchOperation # JsonPatch | A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. PATCH can only be applied to the following fields: * `beforeProvisioningRule` * `description` * `ownerRef` A 403 Forbidden Error indicates that you attempted to PATCH a field that is not allowed.
$PatchServiceDeskIntegrationRequest = Initialize-PatchServiceDeskIntegrationRequest -Operations $JsonPatchOperation # PatchServiceDeskIntegrationRequest | A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Only `replace` operations are accepted by this endpoint. A 403 Forbidden Error indicates that you attempted to PATCH a operation that is not allowed.
# Service Desk Integration Update PATCH
try {
$Result = Update-ServiceDeskIntegration -Id $Id -JsonPatch $JsonPatch
$Result = Update-ServiceDeskIntegration -Id $Id -PatchServiceDeskIntegrationRequest $PatchServiceDeskIntegrationRequest
} catch {
Write-Host ("Exception occurred when calling Update-ServiceDeskIntegration: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
Expand All @@ -424,7 +424,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**Id** | **String**| ID of the Service Desk integration to update |
**JsonPatch** | [**JsonPatch**](JsonPatch.md)| A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. PATCH can only be applied to the following fields: * &#x60;beforeProvisioningRule&#x60; * &#x60;description&#x60; * &#x60;ownerRef&#x60; A 403 Forbidden Error indicates that you attempted to PATCH a field that is not allowed. |
**PatchServiceDeskIntegrationRequest** | [**PatchServiceDeskIntegrationRequest**](PatchServiceDeskIntegrationRequest.md)| A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Only &#x60;replace&#x60; operations are accepted by this endpoint. A 403 Forbidden Error indicates that you attempted to PATCH a operation that is not allowed. |

### Return type

Expand Down
14 changes: 7 additions & 7 deletions PSSailpoint/v3/src/PSSailpoint/Api/ServiceDeskIntegrationApi.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ Update an existing ServiceDeskIntegration by ID with a PATCH request.
.PARAMETER Id
ID of the Service Desk integration to update
.PARAMETER JsonPatch
A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. PATCH can only be applied to the following fields: * `beforeProvisioningRule` * `description` * `ownerRef` A 403 Forbidden Error indicates that you attempted to PATCH a field that is not allowed.
.PARAMETER PatchServiceDeskIntegrationRequest
A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Only `replace` operations are accepted by this endpoint. A 403 Forbidden Error indicates that you attempted to PATCH a operation that is not allowed.
.PARAMETER WithHttpInfo
Expand All @@ -590,7 +590,7 @@ function Update-ServiceDeskIntegration {
${Id},
[Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
[PSCustomObject]
${JsonPatch},
${PatchServiceDeskIntegrationRequest},
[Switch]
$WithHttpInfo
)
Expand Down Expand Up @@ -620,14 +620,14 @@ function Update-ServiceDeskIntegration {
}
$LocalVarUri = $LocalVarUri.replace('{id}', [System.Web.HTTPUtility]::UrlEncode($Id))

if (!$JsonPatch) {
throw "Error! The required parameter `JsonPatch` missing when calling patchServiceDeskIntegration."
if (!$PatchServiceDeskIntegrationRequest) {
throw "Error! The required parameter `PatchServiceDeskIntegrationRequest` missing when calling patchServiceDeskIntegration."
}

if ($LocalVarContentTypes.Contains('application/json-patch+json')) {
$LocalVarBodyParameter = $JsonPatch | ConvertTo-Json -AsArray -Depth 100
$LocalVarBodyParameter = $PatchServiceDeskIntegrationRequest | ConvertTo-Json -AsArray -Depth 100
} else {
$LocalVarBodyParameter = $JsonPatch | ForEach-Object {
$LocalVarBodyParameter = $PatchServiceDeskIntegrationRequest | ForEach-Object {
# Get array of names of object properties that can be cast to boolean TRUE
# PSObject.Properties - https://msdn.microsoft.com/en-us/library/system.management.automation.psobject.properties.aspx
$NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-Object -ExpandProperty Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ No summary available.
.DESCRIPTION
A JSONPatch document as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902)
A JSONPatch document as defined by [RFC 6902 - JSON Patch](https://tools.ietf.org/html/rfc6902). Only `replace` operations are accepted by this endpoint.
.PARAMETER Operations
Operations to be applied
.OUTPUTS
JsonPatch<PSCustomObject>
PatchServiceDeskIntegrationRequest<PSCustomObject>
#>

function Initialize-JsonPatch {
function Initialize-PatchServiceDeskIntegrationRequest {
[CmdletBinding()]
Param (
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
Expand All @@ -30,7 +30,7 @@ function Initialize-JsonPatch {
)

Process {
'Creating PSCustomObject: PSSailpoint => JsonPatch' | Write-Debug
'Creating PSCustomObject: PSSailpoint => PatchServiceDeskIntegrationRequest' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug


Expand All @@ -46,33 +46,33 @@ function Initialize-JsonPatch {
<#
.SYNOPSIS
Convert from JSON to JsonPatch<PSCustomObject>
Convert from JSON to PatchServiceDeskIntegrationRequest<PSCustomObject>
.DESCRIPTION
Convert from JSON to JsonPatch<PSCustomObject>
Convert from JSON to PatchServiceDeskIntegrationRequest<PSCustomObject>
.PARAMETER Json
Json object
.OUTPUTS
JsonPatch<PSCustomObject>
PatchServiceDeskIntegrationRequest<PSCustomObject>
#>
function ConvertFrom-JsonToJsonPatch {
function ConvertFrom-JsonToPatchServiceDeskIntegrationRequest {
Param(
[AllowEmptyString()]
[string]$Json
)

Process {
'Converting JSON to PSCustomObject: PSSailpoint => JsonPatch' | Write-Debug
'Converting JSON to PSCustomObject: PSSailpoint => PatchServiceDeskIntegrationRequest' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug

$JsonParameters = ConvertFrom-Json -InputObject $Json

# check if Json contains properties not defined in JsonPatch
# check if Json contains properties not defined in PatchServiceDeskIntegrationRequest
$AllProperties = ("operations")
foreach ($name in $JsonParameters.PsObject.Properties.Name) {
if (!($AllProperties.Contains($name))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Describe -tag 'PSSailpoint' -name 'ServiceDeskIntegrationApi' {

Context 'Update-ServiceDeskIntegration' {
It 'Test Update-ServiceDeskIntegration' {
#$TestResult = Update-ServiceDeskIntegration -Id "TEST_VALUE" -JsonPatch "TEST_VALUE"
#$TestResult = Update-ServiceDeskIntegration -Id "TEST_VALUE" -PatchServiceDeskIntegrationRequest "TEST_VALUE"
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

Describe -tag 'PSSailpoint' -name 'JsonPatch' {
Context 'JsonPatch' {
It 'Initialize-JsonPatch' {
Describe -tag 'PSSailpoint' -name 'PatchServiceDeskIntegrationRequest' {
Context 'PatchServiceDeskIntegrationRequest' {
It 'Initialize-PatchServiceDeskIntegrationRequest' {
# a simple test to create an object
#$NewObject = Initialize-JsonPatch -Operations "TEST_VALUE"
#$NewObject | Should -BeOfType JsonPatch
#$NewObject = Initialize-PatchServiceDeskIntegrationRequest -Operations "TEST_VALUE"
#$NewObject | Should -BeOfType PatchServiceDeskIntegrationRequest
#$NewObject.property | Should -Be 0
}
}
Expand Down

0 comments on commit 7f5a725

Please sign in to comment.